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