]> Shamusworld >> Repos - architektonas/blob - src/widgets/qg_pentoolbar.h
Initial import
[architektonas] / src / widgets / qg_pentoolbar.h
1 #ifndef QG_PENTOOLBAR_H
2 #define QG_PENTOOLBAR_H
3
4 #include <QtGui>
5 #include "rs_layerlistlistener.h"
6 #include "rs_pen.h"
7
8 class QG_ColorBox;
9 class QG_WidthBox;
10 class QG_LineTypeBox;
11
12 /**
13  * A toolbar that offers all widgets for choosing a pen.
14  */
15 class QG_PenToolBar: public QToolBar, public RS_LayerListListener
16 {
17         Q_OBJECT
18
19         public:
20                 QG_PenToolBar(QMainWindow * parent = NULL, const char * name = NULL);
21                 virtual ~QG_PenToolBar();
22
23                 RS_Pen getPen();
24
25                 // Methods from RS_LayerListListener Interface:
26                 virtual void layerActivated(RS_Layer *);
27                 virtual void layerEdited(RS_Layer *);
28
29         public slots:
30                 void slotColorChanged(const RS_Color & color);
31                 void slotWidthChanged(RS2::LineWidth w);
32                 void slotLineTypeChanged(RS2::LineType w);
33
34         signals:
35                 void penChanged(RS_Pen);
36
37         private:
38                 RS_Pen currentPen;
39                 QG_ColorBox * colorBox;
40                 QG_WidthBox * widthBox;
41                 QG_LineTypeBox * lineTypeBox;
42 };
43
44 #endif