]> Shamusworld >> Repos - architektonas/blob - src/widgets/layerwidget.h
Sanity check stage II: rename classes...
[architektonas] / src / widgets / layerwidget.h
1 #ifndef __LAYERWIDGET_H__
2 #define __LAYERWIDGET_H__
3
4 #include <QtGui>
5
6 class ActionHandler;
7 class RS_Layer;
8 class RS_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(RS_LayerList *, bool showByBlock);
24                 void update();
25                 void highlightLayer(RS_Layer *);
26                 void highlightLayer(const QString &);
27
28                 virtual void layerActivated(RS_Layer *);
29                 virtual void layerAdded(RS_Layer *);
30                 virtual void layerEdited(RS_Layer *);
31                 virtual void layerRemoved(RS_Layer *);
32                 virtual void layerToggled(RS_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                 RS_LayerList * layerList;
48                 bool showByBlock;
49 //              Q3ListBox * listBox;
50                 QListWidget * listBox;
51                 RS_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__