Warning, file /office/calligra/libs/main/KoFindText_p.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* This file is part of the KDE project 0002 * 0003 * Copyright (c) 2010 Arjen Hiemstra <ahiemstra@heimr.nl> 0004 * Copyright (C) 2011 Thorsten Zachmann <zachmann@kde.org> 0005 * 0006 * This library is free software; you can redistribute it and/or 0007 * modify it under the terms of the GNU Library General Public 0008 * License as published by the Free Software Foundation; either 0009 * version 2 of the License, or (at your option) any later version. 0010 * 0011 * This library is distributed in the hope that it will be useful, 0012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0014 * Library General Public License for more details. 0015 * 0016 * You should have received a copy of the GNU Library General Public License 0017 * along with this library; see the file COPYING.LIB. If not, write to 0018 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0019 * Boston, MA 02110-1301, USA. 0020 */ 0021 #ifndef KoFindText_p_h 0022 #define KoFindText_p_h 0023 0024 #include "KoFindText.h" 0025 0026 #include <QTextDocument> 0027 #include <QTextCursor> 0028 #include <QTextBlock> 0029 #include <QTextLayout> 0030 #include <QPalette> 0031 #include <QStyle> 0032 #include <QAbstractTextDocumentLayout> 0033 0034 #include <MainDebug.h> 0035 #include <klocalizedstring.h> 0036 0037 #include <KoText.h> 0038 #include <KoTextDocument.h> 0039 #include <KoShape.h> 0040 #include <KoShapeContainer.h> 0041 0042 #include "KoFindOptionSet.h" 0043 #include "KoFindOption.h" 0044 #include "KoDocument.h" 0045 0046 class Q_DECL_HIDDEN KoFindText::Private 0047 { 0048 public: 0049 Private(KoFindText* qq) : q(qq), selectionStart(-1), selectionEnd(-1) { } 0050 0051 void updateSelections(); 0052 void updateDocumentList(); 0053 void documentDestroyed(QObject *document); 0054 void updateCurrentMatch(int position); 0055 static void initializeFormats(); 0056 0057 KoFindText *q; 0058 0059 QList<QTextDocument*> documents; 0060 0061 QTextCursor currentCursor; 0062 QTextCursor selection; 0063 QHash<QTextDocument*, QVector<QAbstractTextDocumentLayout::Selection> > selections; 0064 0065 int selectionStart; 0066 int selectionEnd; 0067 0068 static QTextCharFormat highlightFormat; 0069 static QTextCharFormat currentMatchFormat; 0070 static QTextCharFormat currentSelectionFormat; 0071 static QTextCharFormat replacedFormat; 0072 static bool formatsInitialized; 0073 0074 QPair<QTextDocument*, int> currentMatch; 0075 }; 0076 0077 #endif