]> Shamusworld >> Repos - architektonas/blob - src/penwidget.h
Added pen and dropper tools, and printing support.
[architektonas] / src / penwidget.h
1 #ifndef __PENWIDGET_H__
2 #define __PENWIDGET_H__
3
4 #include <QtWidgets>
5 #include "structs.h"
6
7 class PenWidget: public QWidget
8 {
9         Q_OBJECT
10
11         public:
12                 PenWidget(void);
13                 ~PenWidget();
14
15         public slots:
16                 void SetFields(Object *);
17
18         private slots:
19                 void HandleWidthSelected(QString);
20                 void HandleStyleSelected(int);
21                 void HandleRedSelected(QString);
22                 void HandleGreenSelected(QString);
23                 void HandleBlueSelected(QString);
24 //              void HandleStamp(QAction *);
25 //              void HandleDropper(QAction *);
26
27         signals:
28                 void WidthSelected(float);
29                 void StyleSelected(int);
30                 void ColorSelected(uint32_t);
31                 void StampSelected(void);
32                 void DropperSelected(void);
33
34         private:
35                 QLineEdit * width;
36                 QLineEdit * red;
37                 QLineEdit * green;
38                 QLineEdit * blue;
39                 QComboBox * style;
40                 int r, g, b;
41                 bool programChange;
42
43         public:
44                 QAction * stampAction;
45                 QAction * dropperAction;
46                 QToolButton * tbStamp;
47                 QToolButton * tbDropper;
48 };
49
50 #endif  // __PENWIDGET_H__