Diffstat (limited to 'noncore/graphics/drawpad/page.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/drawpad/page.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/noncore/graphics/drawpad/page.h b/noncore/graphics/drawpad/page.h index 20a37b5..8ce7bc9 100644 --- a/noncore/graphics/drawpad/page.h +++ b/noncore/graphics/drawpad/page.h | |||
@@ -1,41 +1,55 @@ | |||
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 PAGE_H | 14 | #ifndef PAGE_H |
15 | #define PAGE_H | 15 | #define PAGE_H |
16 | 16 | ||
17 | #include <qpixmap.h> | 17 | #include <qobject.h> |
18 | 18 | ||
19 | #include <qdatetime.h> | 19 | #include <qdatetime.h> |
20 | #include <qlist.h> | ||
21 | #include <qpixmap.h> | ||
20 | 22 | ||
21 | class Page : public QPixmap | 23 | class Page : public QObject |
22 | { | 24 | { |
23 | public: | 25 | public: |
24 | Page(); | 26 | Page(); |
25 | Page(QString title, int w, int h); | 27 | Page(QString title, int w, int h); |
26 | Page(QString title, const QSize& size); | 28 | Page(QString title, const QSize& size); |
27 | 29 | ||
28 | ~Page(); | 30 | ~Page(); |
29 | 31 | ||
30 | QString title() const; | 32 | QString title() const; |
31 | QDateTime lastModified() const; | 33 | QDateTime lastModified() const; |
34 | QPixmap* pixmap() const; | ||
32 | 35 | ||
33 | void setTitle(QString title); | 36 | void setTitle(QString title); |
34 | void setLastModified(QDateTime lastModified); | 37 | void setLastModified(QDateTime lastModified); |
35 | 38 | ||
39 | bool undoEnabled(); | ||
40 | bool redoEnabled(); | ||
41 | |||
42 | void backup(); | ||
43 | void undo(); | ||
44 | void redo(); | ||
45 | |||
36 | private: | 46 | private: |
37 | QString m_title; | 47 | QString m_title; |
38 | QDateTime m_lastModified; | 48 | QDateTime m_lastModified; |
49 | QPixmap* m_pPixmap; | ||
50 | |||
51 | QList<QPixmap> m_backHistory; | ||
52 | QList<QPixmap> m_forwardHistory; | ||
39 | }; | 53 | }; |
40 | 54 | ||
41 | #endif // PAGE_H | 55 | #endif // PAGE_H |