Changeset View
Changeset View
Standalone View
Standalone View
libs/pageapp/KoPAView.h
Show All 39 Lines | |||||
40 | class KoZoomController; | 40 | class KoZoomController; | ||
41 | class QUrl; | 41 | class QUrl; | ||
42 | class QAction; | 42 | class QAction; | ||
43 | 43 | | |||
44 | class QTextDocument; | 44 | class QTextDocument; | ||
45 | class QTabBar; | 45 | class QTabBar; | ||
46 | class KoCopyController; | 46 | class KoCopyController; | ||
47 | class KoCutController; | 47 | class KoCutController; | ||
48 | class KoCanvasController; | ||||
48 | 49 | | |||
49 | /// Creates a view with a KoPACanvasBase and rulers | 50 | /// Creates a view with a KoPACanvasBase and rulers | ||
50 | class KOPAGEAPP_EXPORT KoPAView : public KoView, public KoPAViewBase | 51 | class KOPAGEAPP_EXPORT KoPAView : public KoView, public KoPAViewBase | ||
51 | { | 52 | { | ||
52 | Q_OBJECT | 53 | Q_OBJECT | ||
53 | public: | 54 | public: | ||
54 | enum KoPAAction | 55 | enum KoPAAction | ||
55 | { | 56 | { | ||
Show All 32 Lines | |||||
88 | 89 | | |||
89 | QAction * deleteSelectionAction() const; | 90 | QAction * deleteSelectionAction() const; | ||
90 | 91 | | |||
91 | void updateReadWrite( bool readwrite ); | 92 | void updateReadWrite( bool readwrite ); | ||
92 | 93 | | |||
93 | KoRuler *horizontalRuler(); | 94 | KoRuler *horizontalRuler(); | ||
94 | KoRuler *verticalRuler(); | 95 | KoRuler *verticalRuler(); | ||
95 | 96 | | |||
97 | KoCanvasController *canvasController() const; | ||||
96 | /// @return the canvas for the application | 98 | /// @return the canvas for the application | ||
97 | KoPACanvasBase * kopaCanvas() const; | 99 | KoPACanvasBase * kopaCanvas() const; | ||
98 | /// @return the document for the application | 100 | /// @return the document for the application | ||
99 | KoPADocument * kopaDocument() const; | 101 | KoPADocument * kopaDocument() const; | ||
100 | /// @return Page that is shown in the canvas | 102 | /// @return Page that is shown in the canvas | ||
101 | KoPAPageBase* activePage() const; | 103 | KoPAPageBase* activePage() const; | ||
102 | 104 | | |||
103 | /// Set page shown in the canvas to @p page | 105 | /// Set page shown in the canvas to @p page | ||
104 | void setActivePage( KoPAPageBase * page ); | 106 | void setActivePage( KoPAPageBase * page ); | ||
105 | 107 | | |||
106 | void navigatePage( KoPageApp::PageNavigation pageNavigation ); | 108 | void navigatePage( KoPageApp::PageNavigation pageNavigation ); | ||
107 | 109 | | |||
108 | /// @return the shape manager used for this view | 110 | /// @return the shape manager used for this view | ||
109 | KoShapeManager* shapeManager() const; | 111 | KoShapeManager* shapeManager() const; | ||
110 | 112 | | |||
111 | /// @return the master shape manager used for this view | 113 | /// @return the master shape manager used for this view | ||
112 | KoShapeManager* masterShapeManager() const; | 114 | KoShapeManager* masterShapeManager() const; | ||
113 | 115 | | |||
114 | /** | 116 | /** | ||
115 | * @brief Enables/Disables the given actions | | |||
116 | * | | |||
117 | * The actions are of Type KoPAAction | | |||
118 | * | | |||
119 | * @param actions which should be enabled/disabled | | |||
120 | * @param enable new state of the actions | | |||
121 | */ | | |||
122 | void setActionEnabled( int actions, bool enable ); | | |||
123 | | ||||
124 | /** | | |||
125 | * @brief Set the view mode | 117 | * @brief Set the view mode | ||
126 | * | 118 | * | ||
127 | * @param mode the new view mode | 119 | * @param mode the new view mode | ||
128 | */ | 120 | */ | ||
129 | void setViewMode( KoPAViewMode* mode ); | 121 | void setViewMode( KoPAViewMode* mode ); | ||
130 | 122 | | |||
131 | /** | 123 | /** | ||
132 | * Set the active page and updates the UI | 124 | * Set the active page and updates the UI | ||
▲ Show 20 Lines • Show All 72 Lines • ▼ Show 20 Line(s) | 189 | protected: | |||
205 | KoPADocumentStructureDocker* documentStructureDocker() const; | 197 | KoPADocumentStructureDocker* documentStructureDocker() const; | ||
206 | 198 | | |||
207 | bool isMasterUsed( KoPAPageBase * page ); | 199 | bool isMasterUsed( KoPAPageBase * page ); | ||
208 | void editPaste(); | 200 | void editPaste(); | ||
209 | 201 | | |||
210 | void hideCustomCentralWidget(); | 202 | void hideCustomCentralWidget(); | ||
211 | 203 | | |||
212 | public Q_SLOTS: | 204 | public Q_SLOTS: | ||
205 | /** | ||||
206 | * @brief Enables/Disables the given actions | ||||
207 | * | ||||
208 | * The actions are of Type KoPAAction | ||||
209 | * | ||||
210 | * @param actions which should be enabled/disabled | ||||
211 | * @param enable new state of the actions | ||||
212 | */ | ||||
213 | void setActionEnabled( int actions, bool enable ); | ||||
213 | 214 | | |||
214 | /// Copy Page | 215 | /// Copy Page | ||
215 | void copyPage(); | 216 | void copyPage(); | ||
216 | 217 | | |||
217 | /// Delete the current page | 218 | /// Delete the current page | ||
218 | void deletePage(); | 219 | void deletePage(); | ||
219 | 220 | | |||
220 | /// Make sure the canvas size matches the content | 221 | /// Make sure the canvas size matches the content | ||
▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Line(s) | 227 | protected Q_SLOTS: | |||
292 | */ | 293 | */ | ||
293 | void configure(); | 294 | void configure(); | ||
294 | 295 | | |||
295 | /** | 296 | /** | ||
296 | * This is called when the unit of the document changes | 297 | * This is called when the unit of the document changes | ||
297 | */ | 298 | */ | ||
298 | void updateUnit(const KoUnit &unit); | 299 | void updateUnit(const KoUnit &unit); | ||
299 | 300 | | |||
301 | protected: | ||||
302 | /// Re-implement this if you need special configuration control | ||||
303 | virtual void openConfiguration(); | ||||
304 | | ||||
300 | private: | 305 | private: | ||
301 | class Private; | 306 | class Private; | ||
302 | Private * const d; | 307 | Private * const d; | ||
303 | }; | 308 | }; | ||
304 | 309 | | |||
305 | #endif /* KOPAVIEW_H */ | 310 | #endif /* KOPAVIEW_H */ |