summaryrefslogtreecommitdiff
path: root/noncore/graphics/drawpad/drawpadcanvas.h
Unidiff
Diffstat (limited to 'noncore/graphics/drawpad/drawpadcanvas.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/drawpad/drawpadcanvas.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/noncore/graphics/drawpad/drawpadcanvas.h b/noncore/graphics/drawpad/drawpadcanvas.h
index 4836a3f..90dd951 100644
--- a/noncore/graphics/drawpad/drawpadcanvas.h
+++ b/noncore/graphics/drawpad/drawpadcanvas.h
@@ -1,77 +1,80 @@
1/*************************************************************************** 1/***************************************************************************
2 * * 2 * *
3 * DrawPad - a drawing program for Opie Environment * 3 * DrawPad - a drawing program for Opie Environment *
4 * * 4 * *
5 * (C) 2002 by S. Prud'homme <prudhomme@laposte.net> * 5 * (C) 2002 by S. Prud'homme <prudhomme@laposte.net> *
6 * * 6 * *
7 * This program is free software; you can redistribute it and/or modify * 7 * This program is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by * 8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation; either version 2 of the License, or * 9 * the Free Software Foundation; either version 2 of the License, or *
10 * (at your option) any later version. * 10 * (at your option) any later version. *
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
22class DrawPad; 22class DrawPad;
23 23
24class QPixmap; 24class QPixmap;
25 25
26class DrawPadCanvas : public QScrollView 26class DrawPadCanvas : public QScrollView
27{ 27{
28 Q_OBJECT 28 Q_OBJECT
29 29
30public: 30public:
31 DrawPadCanvas(DrawPad* drawPad, QWidget* parent = 0, const char* name = 0); 31 DrawPadCanvas(DrawPad* drawPad, QWidget* parent = 0, const char* name = 0);
32 ~DrawPadCanvas(); 32 ~DrawPadCanvas();
33 33
34 void load(QIODevice* ioDevice); 34 void load(QIODevice* ioDevice);
35 void initialPage(); 35 void initialPage();
36 void save(QIODevice* ioDevice); 36 void save(QIODevice* ioDevice);
37 37
38 void importPage(const QString& fileName);
39 void exportPage(uint fromPage, uint toPage, const QString& name, const QString& format);
40
38 bool undoEnabled(); 41 bool undoEnabled();
39 bool redoEnabled(); 42 bool redoEnabled();
40 bool goPreviousPageEnabled(); 43 bool goPreviousPageEnabled();
41 bool goNextPageEnabled(); 44 bool goNextPageEnabled();
42 45
43 QPixmap* currentPage(); 46 QPixmap* currentPage();
44 uint pagePosition(); 47 uint pagePosition();
45 uint pageCount(); 48 uint pageCount();
46 49
47public slots: 50public slots:
48 void clearAll(); 51 void deleteAll();
49 void newPage(); 52 void newPage();
50 void clearPage(); 53 void clearPage();
51 void deletePage(); 54 void deletePage();
52 55
53 void undo(); 56 void undo();
54 void redo(); 57 void redo();
55 58
56 void goFirstPage(); 59 void goFirstPage();
57 void goPreviousPage(); 60 void goPreviousPage();
58 void goNextPage(); 61 void goNextPage();
59 void goLastPage(); 62 void goLastPage();
60 63
61signals: 64signals:
62 void pagesChanged(); 65 void pagesChanged();
63 void pageBackupsChanged(); 66 void pageBackupsChanged();
64 67
65protected: 68protected:
66 void contentsMousePressEvent(QMouseEvent* e); 69 void contentsMousePressEvent(QMouseEvent* e);
67 void contentsMouseReleaseEvent(QMouseEvent* e); 70 void contentsMouseReleaseEvent(QMouseEvent* e);
68 void contentsMouseMoveEvent(QMouseEvent* e); 71 void contentsMouseMoveEvent(QMouseEvent* e);
69 void drawContents(QPainter* p, int cx, int cy, int cw, int ch); 72 void drawContents(QPainter* p, int cx, int cy, int cw, int ch);
70 73
71private: 74private:
72 DrawPad* m_pDrawPad; 75 DrawPad* m_pDrawPad;
73 QList<QPixmap> m_pages; 76 QList<QPixmap> m_pages;
74 QList<QPixmap> m_pageBackups; 77 QList<QPixmap> m_pageBackups;
75}; 78};
76 79
77#endif // DRAWPADCANVAS_H 80#endif // DRAWPADCANVAS_H