]> Shamusworld >> Repos - architektonas/blob - src/widgets/layerbox.h
Fixed problem with MDI activation.
[architektonas] / src / widgets / layerbox.h
1 #ifndef __LAYERBOX_H__
2 #define __LAYERBOX_H__
3
4 #include <QtGui>
5
6 class Layer;
7 class LayerList;
8
9 /**
10  * A combobox for choosing a layer.
11  */
12 class LayerBox: public QComboBox
13 {
14         Q_OBJECT
15
16         public:
17                 LayerBox(QWidget * parent = 0, const char * name = 0);
18                 virtual ~LayerBox();
19
20                 Layer * getLayer();
21                 void setLayer(Layer & layer);
22                 void setLayer(QString & layer);
23                 void init(LayerList & layerList, bool showByBlock, bool showUnchanged);
24                 bool isUnchanged();
25
26         private slots:
27                 void slotLayerChanged(int index);
28
29         signals:
30                 void layerChanged(Layer * layer);
31
32         private:
33                 LayerList * layerList;
34                 Layer * currentLayer;
35                 bool showByBlock;
36                 bool showUnchanged;
37                 bool unchanged;
38 };
39
40 #endif  // __LAYERBOX_H__