]> Shamusworld >> Repos - architektonas/blob - src/widgets/qg_layerwidget.h
Added missing readme and GPL license file.
[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 /**
10  * This is the Qt implementation of a widget which can view a
11  * layer list and provides a user interface for basic layer actions.
12  */
13 class QG_LayerWidget: public QWidget, public RS_LayerListListener
14 {
15     Q_OBJECT
16
17         public:
18                 QG_LayerWidget(QG_ActionHandler * ah, QWidget * parent,
19                         const char * name = 0, Qt::WindowFlags f = 0);
20                 ~QG_LayerWidget();
21
22                 void setLayerList(RS_LayerList *, bool showByBlock);
23                 void update();
24                 void highlightLayer(RS_Layer *);
25                 void highlightLayer(const QString &);
26
27                 virtual void layerActivated(RS_Layer *);
28                 virtual void layerAdded(RS_Layer *);
29                 virtual void layerEdited(RS_Layer *);
30                 virtual void layerRemoved(RS_Layer *);
31                 virtual void layerToggled(RS_Layer *);
32
33         signals:
34                 void escape();
35
36         public slots:
37 //              void slotActivated(const QString & layerName);
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                 QG_ActionHandler * actionHandler;
64 };
65
66 #endif