]> Shamusworld >> Repos - architektonas/blob - src/widgets/layerwidget.h
Bugfixes related to removing Snapper class.
[architektonas] / src / widgets / layerwidget.h
1 #ifndef __LAYERWIDGET_H__
2 #define __LAYERWIDGET_H__
3
4 #include <QtGui>
5
6 class ActionHandler;
7 class Layer;
8 class LayerList;
9
10 /**
11  * This is the Qt implementation of a widget which can view a
12  * layer list and provides a user interface for basic layer actions.
13  */
14 class LayerWidget: public QWidget
15 {
16     Q_OBJECT
17
18         public:
19                 LayerWidget(ActionHandler * ah, QWidget * parent,
20                         const char * name = 0, Qt::WindowFlags f = 0);
21                 ~LayerWidget();
22
23                 void setLayerList(LayerList *, bool showByBlock);
24                 void update();
25                 void highlightLayer(Layer *);
26                 void highlightLayer(const QString &);
27
28                 void layerActivated(Layer *);
29                 void layerAdded(Layer *);
30                 void layerEdited(Layer *);
31                 void layerRemoved(Layer *);
32                 void layerToggled(Layer *);
33
34         signals:
35                 void escape();
36
37         public slots:
38                 void slotActivated(void);
39 //              void slotMouseButtonClicked(int button, Q3ListBoxItem * item, const QPoint & pos);
40                 void slotMouseButtonClicked(QListWidgetItem *);
41
42         protected:
43                 void contextMenuEvent(QContextMenuEvent *);
44                 virtual void keyPressEvent(QKeyEvent *);
45
46         private:
47                 LayerList * layerList;
48                 bool showByBlock;
49 //              Q3ListBox * listBox;
50                 QListWidget * listBox;
51                 Layer * lastLayer;
52                 QPixmap pxmLayerStatus00;
53                 QPixmap pxmLayerStatus01;
54                 QPixmap pxmLayerStatus10;
55                 QPixmap pxmLayerStatus11;
56                 QPixmap pxmVisible;
57                 QPixmap pxmHidden;
58                 QPixmap pxmAdd;
59                 QPixmap pxmRemove;
60                 QPixmap pxmEdit;
61                 QPixmap pxmDefreezeAll;
62                 QPixmap pxmFreezeAll;
63                 ActionHandler * actionHandler;
64 };
65
66 #endif  // __LAYERWIDGET_H__