Diffstat (limited to 'noncore/graphics/drawpad/drawpad.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/drawpad/drawpad.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/noncore/graphics/drawpad/drawpad.h b/noncore/graphics/drawpad/drawpad.h index 48d5225..8ba6e58 100644 --- a/noncore/graphics/drawpad/drawpad.h +++ b/noncore/graphics/drawpad/drawpad.h | |||
@@ -1,113 +1,112 @@ | |||
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 DRAWPAD_H | 14 | #ifndef DRAWPAD_H |
15 | #define DRAWPAD_H | 15 | #define DRAWPAD_H |
16 | 16 | ||
17 | #include <qmainwindow.h> | 17 | #include <qmainwindow.h> |
18 | |||
19 | #include <qpen.h> | 18 | #include <qpen.h> |
20 | 19 | ||
21 | class DrawPadCanvas; | 20 | class DrawPadCanvas; |
22 | class Tool; | 21 | class Tool; |
23 | 22 | ||
24 | class QAction; | 23 | class QAction; |
25 | class QColor; | 24 | class QColor; |
26 | class QSpinBox; | 25 | class QSpinBox; |
27 | class QToolButton; | 26 | class QToolButton; |
28 | class QWidgetStack; | 27 | class QWidgetStack; |
29 | 28 | ||
30 | class DrawPad : public QMainWindow | 29 | class DrawPad : public QMainWindow |
31 | { | 30 | { |
32 | Q_OBJECT | 31 | Q_OBJECT |
33 | 32 | ||
34 | public: | 33 | public: |
35 | DrawPad(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); | 34 | DrawPad(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); |
36 | ~DrawPad(); | 35 | ~DrawPad(); |
37 | 36 | ||
38 | static QString appName() { return QString::fromLatin1("drawpad"); } | 37 | static QString appName() { return QString::fromLatin1("drawpad"); } |
39 | 38 | ||
40 | Tool* tool() { return m_pTool; } | 39 | Tool* tool() { return m_pTool; } |
41 | QPen pen() { return m_pen; } | 40 | QPen pen() { return m_pen; } |
42 | QBrush brush() { return m_brush; } | 41 | QBrush brush() { return m_brush; } |
43 | 42 | ||
44 | bool antiAliasing(); | 43 | bool antiAliasing(); |
45 | void finishStartup(); | 44 | void finishStartup(); |
46 | 45 | ||
47 | private slots: | 46 | private slots: |
48 | void newPage(); | 47 | void newPage(); |
49 | void clearPage(); | 48 | void clearPage(); |
50 | void deletePage(); | 49 | void deletePage(); |
51 | 50 | ||
52 | void setPointTool(); | 51 | void setPointTool(); |
53 | void setLineTool(); | 52 | void setLineTool(); |
54 | void setRectangleTool(); | 53 | void setRectangleTool(); |
55 | void setFilledRectangleTool(); | 54 | void setFilledRectangleTool(); |
56 | void setEllipseTool(); | 55 | void setEllipseTool(); |
57 | void setFilledEllipseTool(); | 56 | void setFilledEllipseTool(); |
58 | void setTextTool(); | 57 | void setTextTool(); |
59 | void setFillTool(); | 58 | void setFillTool(); |
60 | void setEraseTool(); | 59 | void setEraseTool(); |
61 | 60 | ||
62 | void changePenWidth(int value); | 61 | void changePenWidth(int value); |
63 | void changePenColor(const QColor& color); | 62 | void changePenColor(const QColor& color); |
64 | void changeBrushColor(const QColor& color); | 63 | void changeBrushColor(const QColor& color); |
65 | 64 | ||
66 | void updateView(); | 65 | void updateView(); |
67 | 66 | ||
68 | void deleteAll(); | 67 | void deleteAll(); |
69 | void importPage(); | 68 | void importPage(); |
70 | void exportPage(); | 69 | void exportPage(); |
71 | void thumbnailView(); | 70 | void thumbnailView(); |
72 | void pageInformation(); | 71 | void pageInformation(); |
73 | 72 | ||
74 | private: | 73 | private: |
75 | void loadConfig(); | 74 | void loadConfig(); |
76 | void saveConfig(); | 75 | void saveConfig(); |
77 | 76 | ||
78 | DrawPadCanvas* m_pDrawPadCanvas; | 77 | DrawPadCanvas* m_pDrawPadCanvas; |
79 | 78 | ||
80 | Tool* m_pTool; | 79 | Tool* m_pTool; |
81 | QPen m_pen; | 80 | QPen m_pen; |
82 | QBrush m_brush; | 81 | QBrush m_brush; |
83 | 82 | ||
84 | QAction* m_pAntiAliasingAction; | 83 | QAction* m_pAntiAliasingAction; |
85 | 84 | ||
86 | QAction* m_pUndoAction; | 85 | QAction* m_pUndoAction; |
87 | QAction* m_pRedoAction; | 86 | QAction* m_pRedoAction; |
88 | 87 | ||
89 | QAction* m_pFirstPageAction; | 88 | QAction* m_pFirstPageAction; |
90 | QAction* m_pPreviousPageAction; | 89 | QAction* m_pPreviousPageAction; |
91 | QAction* m_pNextPageAction; | 90 | QAction* m_pNextPageAction; |
92 | QAction* m_pLastPageAction; | 91 | QAction* m_pLastPageAction; |
93 | 92 | ||
94 | QAction* m_pPointToolAction; | 93 | QAction* m_pPointToolAction; |
95 | QAction* m_pLineToolAction; | 94 | QAction* m_pLineToolAction; |
96 | QAction* m_pRectangleToolAction; | 95 | QAction* m_pRectangleToolAction; |
97 | QAction* m_pFilledRectangleToolAction; | 96 | QAction* m_pFilledRectangleToolAction; |
98 | QAction* m_pEllipseToolAction; | 97 | QAction* m_pEllipseToolAction; |
99 | QAction* m_pFilledEllipseToolAction; | 98 | QAction* m_pFilledEllipseToolAction; |
100 | QAction* m_pTextToolAction; | 99 | QAction* m_pTextToolAction; |
101 | QAction* m_pFillToolAction; | 100 | QAction* m_pFillToolAction; |
102 | QAction* m_pEraseToolAction; | 101 | QAction* m_pEraseToolAction; |
103 | 102 | ||
104 | QToolButton* m_pLineToolButton; | 103 | QToolButton* m_pLineToolButton; |
105 | QToolButton* m_pRectangleToolButton; | 104 | QToolButton* m_pRectangleToolButton; |
106 | QToolButton* m_pEllipseToolButton; | 105 | QToolButton* m_pEllipseToolButton; |
107 | QToolButton* m_pPenColorToolButton; | 106 | QToolButton* m_pPenColorToolButton; |
108 | QToolButton* m_pBrushColorToolButton; | 107 | QToolButton* m_pBrushColorToolButton; |
109 | 108 | ||
110 | QSpinBox* m_pPenWidthSpinBox; | 109 | QSpinBox* m_pPenWidthSpinBox; |
111 | }; | 110 | }; |
112 | 111 | ||
113 | #endif // DRAWPAD_H | 112 | #endif // DRAWPAD_H |