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