]> Shamusworld >> Repos - architektonas/blob - src/widgets/pentoolbar.h
Bugfixes related to removing Snapper class.
[architektonas] / src / widgets / pentoolbar.h
1 #ifndef __PENTOOLBAR_H__
2 #define __PENTOOLBAR_H__
3
4 #include <QtGui>
5 //#include "layerlistlistener.h"
6 #include "pen.h"
7
8 class ColorBox;
9 class WidthBox;
10 class LineTypeBox;
11 class Layer;
12
13 /**
14  * A toolbar that offers all widgets for choosing a pen.
15  */
16 class PenToolBar: public QToolBar//, public LayerListListener
17 {
18         Q_OBJECT
19
20         public:
21                 PenToolBar(QMainWindow * parent = NULL, const char * name = NULL);
22                 virtual ~PenToolBar();
23
24                 Pen getPen();
25
26                 // Methods from LayerListListener Interface:
27                 virtual void layerActivated(Layer *);
28                 virtual void layerEdited(Layer *);
29
30         public slots:
31                 void slotColorChanged(const Color & color);
32                 void slotWidthChanged(RS2::LineWidth w);
33                 void slotLineTypeChanged(RS2::LineType w);
34
35         signals:
36                 void penChanged(Pen);
37
38         private:
39                 Pen currentPen;
40                 ColorBox * colorBox;
41                 WidthBox * widthBox;
42                 LineTypeBox * lineTypeBox;
43 };
44
45 #endif  // __PENTOOLBAR_H__