Changeset View
Changeset View
Standalone View
Standalone View
core/document_p.h
1 | /*************************************************************************** | 1 | /*************************************************************************** | ||
---|---|---|---|---|---|
2 | * Copyright (C) 2004-2005 by Enrico Ros <eros.kde@email.it> * | 2 | * Copyright (C) 2004-2005 by Enrico Ros <eros.kde@email.it> * | ||
3 | * Copyright (C) 2004-2007 by Albert Astals Cid <aacid@kde.org> * | 3 | * Copyright (C) 2004-2007 by Albert Astals Cid <aacid@kde.org> * | ||
4 | * * | 4 | * * | ||
5 | * This program is free software; you can redistribute it and/or modify * | 5 | * This program is free software; you can redistribute it and/or modify * | ||
6 | * it under the terms of the GNU General Public License as published by * | 6 | * it under the terms of the GNU General Public License as published by * | ||
7 | * the Free Software Foundation; either version 2 of the License, or * | 7 | * the Free Software Foundation; either version 2 of the License, or * | ||
8 | * (at your option) any later version. * | 8 | * (at your option) any later version. * | ||
9 | ***************************************************************************/ | 9 | ***************************************************************************/ | ||
10 | 10 | | |||
11 | #ifndef _OKULAR_DOCUMENT_P_H_ | 11 | #ifndef _OKULAR_DOCUMENT_P_H_ | ||
12 | #define _OKULAR_DOCUMENT_P_H_ | 12 | #define _OKULAR_DOCUMENT_P_H_ | ||
13 | 13 | | |||
14 | #include "document.h" | 14 | #include "document.h" | ||
15 | #include "script/event_p.h" | ||||
15 | 16 | | |||
16 | #include "synctex/synctex_parser.h" | 17 | #include "synctex/synctex_parser.h" | ||
18 | #include <memory> | ||||
17 | 19 | | |||
18 | // qt/kde/system includes | 20 | // qt/kde/system includes | ||
19 | #include <QHash> | 21 | #include <QHash> | ||
20 | #include <QLinkedList> | 22 | #include <QLinkedList> | ||
21 | #include <QMap> | 23 | #include <QMap> | ||
22 | #include <QMutex> | 24 | #include <QMutex> | ||
23 | #include <QPointer> | 25 | #include <QPointer> | ||
24 | #include <QUrl> | 26 | #include <QUrl> | ||
Show All 11 Lines | |||||
36 | class QTemporaryFile; | 38 | class QTemporaryFile; | ||
37 | class KPluginMetaData; | 39 | class KPluginMetaData; | ||
38 | 40 | | |||
39 | struct AllocatedPixmap; | 41 | struct AllocatedPixmap; | ||
40 | struct ArchiveData; | 42 | struct ArchiveData; | ||
41 | struct RunningSearch; | 43 | struct RunningSearch; | ||
42 | 44 | | |||
43 | namespace Okular { | 45 | namespace Okular { | ||
46 | class ScriptAction; | ||||
44 | class ConfigInterface; | 47 | class ConfigInterface; | ||
45 | class PageController; | 48 | class PageController; | ||
46 | class SaveInterface; | 49 | class SaveInterface; | ||
47 | class Scripter; | 50 | class Scripter; | ||
48 | class View; | 51 | class View; | ||
49 | } | 52 | } | ||
50 | 53 | | |||
51 | struct GeneratorInfo | 54 | struct GeneratorInfo | ||
▲ Show 20 Lines • Show All 134 Lines • ▼ Show 20 Line(s) | 106 | public: | |||
186 | void refreshPixmaps( int ); | 189 | void refreshPixmaps( int ); | ||
187 | void _o_configChanged(); | 190 | void _o_configChanged(); | ||
188 | void doContinueDirectionMatchSearch(void *doContinueDirectionMatchSearchStruct); | 191 | void doContinueDirectionMatchSearch(void *doContinueDirectionMatchSearchStruct); | ||
189 | void doContinueAllDocumentSearch(void *pagesToNotifySet, void *pageMatchesMap, int currentPage, int searchID); | 192 | void doContinueAllDocumentSearch(void *pagesToNotifySet, void *pageMatchesMap, int currentPage, int searchID); | ||
190 | void doContinueGooglesDocumentSearch(void *pagesToNotifySet, void *pageMatchesMap, int currentPage, int searchID, const QStringList & words); | 193 | void doContinueGooglesDocumentSearch(void *pagesToNotifySet, void *pageMatchesMap, int currentPage, int searchID, const QStringList & words); | ||
191 | 194 | | |||
192 | void doProcessSearchMatch( RegularAreaRect *match, RunningSearch *search, QSet< int > *pagesToNotify, int currentPage, int searchID, bool moveViewport, const QColor & color ); | 195 | void doProcessSearchMatch( RegularAreaRect *match, RunningSearch *search, QSet< int > *pagesToNotify, int currentPage, int searchID, bool moveViewport, const QColor & color ); | ||
193 | 196 | | |||
197 | /** | ||||
198 | * Executes a JavaScript script from the setInterval function. | ||||
199 | * | ||||
200 | * @since 1.9 | ||||
201 | */ | ||||
202 | void executeScript( const QString &function ); | ||||
203 | | ||||
194 | // generators stuff | 204 | // generators stuff | ||
195 | /** | 205 | /** | ||
196 | * This method is used by the generators to signal the finish of | 206 | * This method is used by the generators to signal the finish of | ||
197 | * the pixmap generation @p request. | 207 | * the pixmap generation @p request. | ||
198 | */ | 208 | */ | ||
199 | void requestDone( PixmapRequest * request ); | 209 | void requestDone( PixmapRequest * request ); | ||
200 | void textGenerationDone( Page *page ); | 210 | void textGenerationDone( Page *page ); | ||
201 | /** | 211 | /** | ||
Show All 13 Lines | |||||
215 | */ | 225 | */ | ||
216 | bool isNormalizedRectangleFullyVisible( const Okular::NormalizedRect & rectOfInterest, int rectPage ); | 226 | bool isNormalizedRectangleFullyVisible( const Okular::NormalizedRect & rectOfInterest, int rectPage ); | ||
217 | 227 | | |||
218 | // For sync files | 228 | // For sync files | ||
219 | void loadSyncFile( const QString & filePath ); | 229 | void loadSyncFile( const QString & filePath ); | ||
220 | 230 | | |||
221 | void clearAndWaitForRequests(); | 231 | void clearAndWaitForRequests(); | ||
222 | 232 | | |||
233 | | ||||
234 | /* | ||||
235 | * Executes a ScriptAction with the event passed as parameter. | ||||
236 | */ | ||||
237 | void executeScriptEvent( const std::shared_ptr< Event > &event, const Okular::ScriptAction * linkscript ); | ||||
238 | | ||||
239 | /* | ||||
240 | * Find the corresponding page number for the form field passed as parameter. | ||||
241 | */ | ||||
242 | int findFieldPageNumber( Okular::FormField *field ); | ||||
243 | | ||||
223 | // member variables | 244 | // member variables | ||
224 | Document *m_parent; | 245 | Document *m_parent; | ||
225 | QPointer<QWidget> m_widget; | 246 | QPointer<QWidget> m_widget; | ||
226 | 247 | | |||
227 | // find descriptors, mapped by ID (we handle multiple searches) | 248 | // find descriptors, mapped by ID (we handle multiple searches) | ||
228 | QMap< int, RunningSearch * > m_searches; | 249 | QMap< int, RunningSearch * > m_searches; | ||
229 | bool m_searchCancelled; | 250 | bool m_searchCancelled; | ||
230 | 251 | | |||
▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines |