Changeset View
Changeset View
Standalone View
Standalone View
ui/pageviewannotator.h
1 | /*************************************************************************** | 1 | /*************************************************************************** | ||
---|---|---|---|---|---|
2 | * Copyright (C) 2005 by Enrico Ros <eros.kde@email.it> * | 2 | * Copyright (C) 2005 by Enrico Ros <eros.kde@email.it> * | ||
3 | * * | 3 | * * | ||
4 | * This program is free software; you can redistribute it and/or modify * | 4 | * This program is free software; you can redistribute it and/or modify * | ||
5 | * it under the terms of the GNU General Public License as published by * | 5 | * it under the terms of the GNU General Public License as published by * | ||
6 | * the Free Software Foundation; either version 2 of the License, or * | 6 | * the Free Software Foundation; either version 2 of the License, or * | ||
7 | * (at your option) any later version. * | 7 | * (at your option) any later version. * | ||
8 | ***************************************************************************/ | 8 | ***************************************************************************/ | ||
9 | 9 | | |||
10 | #ifndef _OKULAR_PAGEVIEWANNOTATOR_H_ | 10 | #ifndef _OKULAR_PAGEVIEWANNOTATOR_H_ | ||
11 | #define _OKULAR_PAGEVIEWANNOTATOR_H_ | 11 | #define _OKULAR_PAGEVIEWANNOTATOR_H_ | ||
12 | 12 | | |||
13 | #include <qaction.h> | ||||
13 | #include <qobject.h> | 14 | #include <qobject.h> | ||
14 | #include <qdom.h> | 15 | #include <qdom.h> | ||
15 | #include <qlinkedlist.h> | 16 | #include <qlinkedlist.h> | ||
16 | 17 | | |||
18 | #include <kactioncollection.h> | ||||
19 | | ||||
17 | #include "pageviewutils.h" | 20 | #include "pageviewutils.h" | ||
18 | #include "annotationtools.h" | 21 | #include "annotationtools.h" | ||
19 | 22 | | |||
20 | class QKeyEvent; | 23 | class QKeyEvent; | ||
21 | class QMouseEvent; | 24 | class QMouseEvent; | ||
22 | class QPainter; | 25 | class QPainter; | ||
23 | 26 | | |||
24 | namespace Okular | 27 | namespace Okular | ||
Show All 24 Lines | |||||
49 | */ | 52 | */ | ||
50 | class PageViewAnnotator : public QObject | 53 | class PageViewAnnotator : public QObject | ||
51 | { | 54 | { | ||
52 | Q_OBJECT | 55 | Q_OBJECT | ||
53 | public: | 56 | public: | ||
54 | PageViewAnnotator( PageView * parent, Okular::Document * storage ); | 57 | PageViewAnnotator( PageView * parent, Okular::Document * storage ); | ||
55 | ~PageViewAnnotator(); | 58 | ~PageViewAnnotator(); | ||
56 | 59 | | |||
60 | void setupActions( KActionCollection *ac ); | ||||
61 | | ||||
57 | // called to show/hide the editing toolbar | 62 | // called to show/hide the editing toolbar | ||
58 | void setEnabled( bool enabled ); | 63 | void setEnabled( bool enabled ); | ||
59 | 64 | | |||
60 | // called to toggle the usage of text annotating tools | 65 | // called to toggle the usage of text annotating tools | ||
61 | void setTextToolsEnabled( bool enabled ); | 66 | void setTextToolsEnabled( bool enabled ); | ||
62 | 67 | | |||
63 | void setToolsEnabled( bool enabled ); | 68 | void setToolsEnabled( bool enabled ); | ||
64 | 69 | | |||
Show All 20 Lines | |||||
85 | 90 | | |||
86 | void reparseConfig(); | 91 | void reparseConfig(); | ||
87 | 92 | | |||
88 | static QString defaultToolName( const QDomElement &toolElement ); | 93 | static QString defaultToolName( const QDomElement &toolElement ); | ||
89 | static QPixmap makeToolPixmap( const QDomElement &toolElement ); | 94 | static QPixmap makeToolPixmap( const QDomElement &toolElement ); | ||
90 | 95 | | |||
91 | private Q_SLOTS: | 96 | private Q_SLOTS: | ||
92 | void slotToolSelected( int toolID ); | 97 | void slotToolSelected( int toolID ); | ||
98 | void slotAnnotationColorChanged(); | ||||
93 | void slotSaveToolbarOrientation( int side ); | 99 | void slotSaveToolbarOrientation( int side ); | ||
94 | void slotToolDoubleClicked( int toolID ); | 100 | void slotPinAnnotationToolToggled( bool enabled ); | ||
95 | 101 | | |||
96 | private: | 102 | private: | ||
97 | void detachAnnotation(); | 103 | void detachAnnotation(); | ||
98 | 104 | | |||
99 | // global class pointers | 105 | // global class pointers | ||
100 | Okular::Document * m_document; | 106 | Okular::Document * m_document; | ||
101 | PageView * m_pageView; | 107 | PageView * m_pageView; | ||
102 | PageViewToolBar * m_toolBar; | 108 | PageViewToolBar * m_toolBar; | ||
Show All 19 Lines |