Diffstat (limited to 'noncore/graphics/drawpad/drawpadcanvas.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/graphics/drawpad/drawpadcanvas.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/noncore/graphics/drawpad/drawpadcanvas.h b/noncore/graphics/drawpad/drawpadcanvas.h index e05ce8a..47763f9 100644 --- a/noncore/graphics/drawpad/drawpadcanvas.h +++ b/noncore/graphics/drawpad/drawpadcanvas.h | |||
@@ -11,49 +11,48 @@ | |||
11 | * * | 11 | * * |
12 | ***************************************************************************/ | 12 | ***************************************************************************/ |
13 | 13 | ||
14 | #ifndef DRAWPADCANVAS_H | 14 | #ifndef DRAWPADCANVAS_H |
15 | #define DRAWPADCANVAS_H | 15 | #define DRAWPADCANVAS_H |
16 | 16 | ||
17 | #include <qscrollview.h> | 17 | #include <qscrollview.h> |
18 | 18 | ||
19 | #include <qlist.h> | 19 | #include <qlist.h> |
20 | #include <qpointarray.h> | 20 | #include <qpointarray.h> |
21 | 21 | ||
22 | class DrawPad; | 22 | class DrawPad; |
23 | 23 | class Page; | |
24 | class QPixmap; | ||
25 | 24 | ||
26 | class DrawPadCanvas : public QScrollView | 25 | class DrawPadCanvas : public QScrollView |
27 | { | 26 | { |
28 | Q_OBJECT | 27 | Q_OBJECT |
29 | 28 | ||
30 | public: | 29 | public: |
31 | DrawPadCanvas(DrawPad* drawPad, QWidget* parent = 0, const char* name = 0); | 30 | DrawPadCanvas(DrawPad* drawPad, QWidget* parent = 0, const char* name = 0); |
32 | ~DrawPadCanvas(); | 31 | ~DrawPadCanvas(); |
33 | 32 | ||
34 | void load(QIODevice* ioDevice); | 33 | void load(QIODevice* ioDevice); |
35 | void initialPage(); | 34 | void initialPage(); |
36 | void save(QIODevice* ioDevice); | 35 | void save(QIODevice* ioDevice); |
37 | 36 | ||
38 | void importPage(const QString& fileName); | 37 | void importPage(const QString& fileName); |
39 | void exportPage(uint fromPage, uint toPage, const QString& name, const QString& format); | 38 | void exportPage(uint fromPage, uint toPage, const QString& name, const QString& format); |
40 | 39 | ||
41 | bool undoEnabled(); | 40 | bool undoEnabled(); |
42 | bool redoEnabled(); | 41 | bool redoEnabled(); |
43 | bool goPreviousPageEnabled(); | 42 | bool goPreviousPageEnabled(); |
44 | bool goNextPageEnabled(); | 43 | bool goNextPageEnabled(); |
45 | 44 | ||
46 | QPixmap* currentPage(); | 45 | Page* currentPage(); |
47 | QList<QPixmap> pages(); | 46 | QList<Page> pages(); |
48 | uint pagePosition(); | 47 | uint pagePosition(); |
49 | uint pageCount(); | 48 | uint pageCount(); |
50 | 49 | ||
51 | void backupPage(); | 50 | void backupPage(); |
52 | 51 | ||
53 | public slots: | 52 | public slots: |
54 | void deleteAll(); | 53 | void deleteAll(); |
55 | void newPage(); | 54 | void newPage(); |
56 | void clearPage(); | 55 | void clearPage(); |
57 | void deletePage(); | 56 | void deletePage(); |
58 | 57 | ||
59 | void undo(); | 58 | void undo(); |
@@ -67,17 +66,17 @@ public slots: | |||
67 | signals: | 66 | signals: |
68 | void pagesChanged(); | 67 | void pagesChanged(); |
69 | void pageBackupsChanged(); | 68 | void pageBackupsChanged(); |
70 | 69 | ||
71 | protected: | 70 | protected: |
72 | void contentsMousePressEvent(QMouseEvent* e); | 71 | void contentsMousePressEvent(QMouseEvent* e); |
73 | void contentsMouseReleaseEvent(QMouseEvent* e); | 72 | void contentsMouseReleaseEvent(QMouseEvent* e); |
74 | void contentsMouseMoveEvent(QMouseEvent* e); | 73 | void contentsMouseMoveEvent(QMouseEvent* e); |
75 | void drawContents(QPainter* p, int cx, int cy, int cw, int ch); | 74 | void drawContents(QPainter* p, int cx, int cy, int cw, int ch); |
76 | 75 | ||
77 | private: | 76 | private: |
78 | DrawPad* m_pDrawPad; | 77 | DrawPad* m_pDrawPad; |
79 | QList<QPixmap> m_pages; | 78 | QList<Page> m_pages; |
80 | QList<QPixmap> m_pageBackups; | 79 | QList<Page> m_pageBackups; |
81 | }; | 80 | }; |
82 | 81 | ||
83 | #endif // DRAWPADCANVAS_H | 82 | #endif // DRAWPADCANVAS_H |