]> Shamusworld >> Repos - architektonas/blob - src/widgets/widthbox.h
Bugfixes related to removing Snapper class.
[architektonas] / src / widgets / widthbox.h
1 #ifndef __WIDTHBOX_H__
2 #define __WIDTHBOX_H__
3
4 #include <QtGui>
5 #include "enums.h"
6
7 /**
8  * A combobox for choosing a line width.
9  */
10 class WidthBox: public QComboBox
11 {
12         Q_OBJECT
13
14         public:
15                 WidthBox(QWidget * parent = 0, const char * name = 0);
16                 WidthBox(bool showByLayer, bool showUnchanged, QWidget * parent = 0, const char * name = 0);
17                 virtual ~WidthBox();
18
19                 void init(bool showByLayer, bool showUnchanged);
20                 RS2::LineWidth getWidth();
21                 void setWidth(RS2::LineWidth w);
22                 void setLayerWidth(RS2::LineWidth w);
23                 bool isUnchanged();
24
25         private slots:
26                 void slotWidthChanged(int index);
27
28         signals:
29                 void widthChanged(RS2::LineWidth);
30
31         private:
32                 RS2::LineWidth currentWidth;
33                 bool showByLayer;
34                 bool showUnchanged;
35                 bool unchanged;
36 };
37
38 #endif  // __WIDTHBOX_H__