summaryrefslogtreecommitdiff
path: root/noncore/graphics/drawpad/drawpad.h
Side-by-side diff
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 @@
+/***************************************************************************
+ * *
+ * DrawPad - a drawing program for Opie Environment *
+ * *
+ * (C) 2002 by S. Prud'homme <prudhomme@laposte.net> *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef DRAWPAD_H
+#define DRAWPAD_H
+
+#include <qmainwindow.h>
+
+#include <qpen.h>
+
+class DrawMode;
+class DrawPadCanvas;
+
+class QAction;
+class QColor;
+class QToolButton;
+class QWidgetStack;
+
+class DrawPad : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ DrawPad(QWidget* parent = 0, const char* name = 0, WFlags f = WType_TopLevel);
+ ~DrawPad();
+
+ DrawMode* drawMode() { return m_pDrawMode; }
+ QPen pen() { return m_pen; }
+ QBrush brush() { return m_brush; }
+
+private slots:
+ void clearAll();
+ void newPage();
+ void deletePage();
+
+ void goFirstPage();
+ void goPreviousPage();
+ void goNextPage();
+ void goLastPage();
+
+ void setPointDrawMode();
+ void setLineDrawMode();
+ void setRectangleDrawMode();
+ void setEllipseDrawMode();
+ void setFillDrawMode();
+ void setEraseDrawMode();
+
+ void changePenWidth(int value);
+ void changePenColor(int index);
+ void changeBrushColor(int index);
+
+private:
+ void updateNavigationToolBar();
+
+ DrawPadCanvas* m_pDrawPadCanvas;
+ QArray<QColor> m_colors;
+
+ DrawMode* m_pDrawMode;
+ QPen m_pen;
+ QBrush m_brush;
+
+ QAction* m_pFirstPageAction;
+ QAction* m_pPreviousPageAction;
+ QAction* m_pNextPageAction;
+ QAction* m_pLastPageAction;
+
+ QAction* m_pPointDrawModeAction;
+ QAction* m_pLineDrawModeAction;
+ QAction* m_pRectangleDrawModeAction;
+ QAction* m_pEllipseDrawModeAction;
+ QAction* m_pFillDrawModeAction;
+ QAction* m_pEraseDrawModeAction;
+
+ QToolButton* m_pPenColorToolButton;
+ QToolButton* m_pBrushColorToolButton;
+};
+
+#endif // DRAWPAD_H