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.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/noncore/graphics/drawpad/drawpad.h b/noncore/graphics/drawpad/drawpad.h
new file mode 100644
index 0000000..0ece408
--- a/dev/null
+++ b/noncore/graphics/drawpad/drawpad.h
@@ -0,0 +1,88 @@
1/***************************************************************************
2 * *
3 * DrawPad - a drawing program for Opie Environment *
4 * *
5 * (C) 2002 by S. Prud'homme <prudhomme@laposte.net> *
6 * *
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 *
9 * the Free Software Foundation; either version 2 of the License, or *
10 * (at your option) any later version. *
11 * *
12 ***************************************************************************/
13
14#ifndef DRAWPAD_H
15#define DRAWPAD_H
16
17#include <qmainwindow.h>
18
19#include <qpen.h>
20
21class DrawMode;
22class DrawPadCanvas;
23
24class QAction;
25class QColor;
26class QToolButton;
27class QWidgetStack;
28
29class DrawPad : public QMainWindow
30{
31 Q_OBJECT
32
33public:
34 DrawPad(QWidget* parent = 0, const char* name = 0, WFlags f = WType_TopLevel);
35 ~DrawPad();
36
37 DrawMode* drawMode() { return m_pDrawMode; }
38 QPen pen() { return m_pen; }
39 QBrush brush() { return m_brush; }
40
41private slots:
42 void clearAll();
43 void newPage();
44 void deletePage();
45
46 void goFirstPage();
47 void goPreviousPage();
48 void goNextPage();
49 void goLastPage();
50
51 void setPointDrawMode();
52 void setLineDrawMode();
53 void setRectangleDrawMode();
54 void setEllipseDrawMode();
55 void setFillDrawMode();
56 void setEraseDrawMode();
57
58 void changePenWidth(int value);
59 void changePenColor(int index);
60 void changeBrushColor(int index);
61
62private:
63 void updateNavigationToolBar();
64
65 DrawPadCanvas* m_pDrawPadCanvas;
66 QArray<QColor> m_colors;
67
68 DrawMode* m_pDrawMode;
69 QPen m_pen;
70 QBrush m_brush;
71
72 QAction* m_pFirstPageAction;
73 QAction* m_pPreviousPageAction;
74 QAction* m_pNextPageAction;
75 QAction* m_pLastPageAction;
76
77 QAction* m_pPointDrawModeAction;
78 QAction* m_pLineDrawModeAction;
79 QAction* m_pRectangleDrawModeAction;
80 QAction* m_pEllipseDrawModeAction;
81 QAction* m_pFillDrawModeAction;
82 QAction* m_pEraseDrawModeAction;
83
84 QToolButton* m_pPenColorToolButton;
85 QToolButton* m_pBrushColorToolButton;
86};
87
88#endif // DRAWPAD_H