]> Shamusworld >> Repos - architektonas/blob - src/widgets/qg_colorbox.h
Removed useless *Listener class and references.
[architektonas] / src / widgets / qg_colorbox.h
1 #ifndef QG_COLORBOX_H
2 #define QG_COLORBOX_H
3
4 #include <QtGui>
5 #include "rs_color.h"
6
7 /**
8  * A combobox for choosing a color.
9  */
10 class QG_ColorBox: public QComboBox
11 {
12         Q_OBJECT
13
14         public:
15                 QG_ColorBox(QWidget * parent = 0, const char * name = 0);
16                 QG_ColorBox(bool showByLayer, bool showUnchanged,
17                         QWidget * parent = 0, const char * name = 0);
18                 virtual ~QG_ColorBox();
19
20                 RS_Color getColor();
21                 void setColor(const RS_Color & color);
22                 void setLayerColor(const RS_Color & color);
23                 void init(bool showByLayer, bool showUnchanged);
24                 bool isUnchanged();
25
26         private slots:
27                 void slotColorChanged(int index);
28
29         signals:
30                 void colorChanged(const RS_Color & color);
31
32         private:
33                 RS_Color currentColor;
34                 bool showByLayer;
35                 bool showUnchanged;
36                 bool unchanged;
37 };
38
39 #endif