]> Shamusworld >> Repos - architektonas/blob - src/widgets/blockwidget.h
Removed useless *Listener class and references.
[architektonas] / src / widgets / blockwidget.h
1 #ifndef __BLOCKWIDGET_H__
2 #define __BLOCKWIDGET_H__
3
4 #include <QtGui>
5
6 class RS_Block;
7 class RS_BlockList;
8 class QG_ActionHandler;
9
10 /**
11  * This is the Qt implementation of a widget which can view a
12  * block list.
13  */
14 class QG_BlockWidget: public QWidget
15 {
16     Q_OBJECT
17
18         public:
19                 QG_BlockWidget(QG_ActionHandler * ah, QWidget * parent,
20                         const char * name = 0, Qt::WFlags f = 0);
21                 ~QG_BlockWidget();
22
23                 void setBlockList(RS_BlockList * blockList);
24                 RS_BlockList * getBlockList();
25                 void update();
26                 void highlightBlock(RS_Block * block);
27
28                 virtual void blockAdded(RS_Block *);
29                 virtual void blockEdited(RS_Block *);
30                 virtual void blockRemoved(RS_Block *);
31                 virtual void blockToggled(RS_Block *);
32
33         signals:
34                 void escape();
35
36         public slots:
37                 //void slotToggleView(QListBoxItem* item);
38 //              void slotActivated(const QString & blockName);
39                 void slotActivated(void);
40 //              void slotMouseButtonClicked(int button, Q3ListBoxItem * item, const QPoint & pos);
41                 void slotMouseButtonClicked(QListWidgetItem * item);
42
43         protected:
44                 void contextMenuEvent(QContextMenuEvent * e);
45                 virtual void keyPressEvent(QKeyEvent * e);
46
47         private:
48                 RS_BlockList * blockList;
49 //              Q3ListBox * listBox;
50                 QListWidget * listBox;
51                 RS_Block * lastBlock;
52                 QPixmap pxmVisible;
53                 QPixmap pxmHidden;
54                 QPixmap pxmAdd;
55                 QPixmap pxmRemove;
56                 QPixmap pxmAttributes;
57                 QPixmap pxmEdit;
58                 QPixmap pxmInsert;
59                 QPixmap pxmDefreezeAll;
60                 QPixmap pxmFreezeAll;
61                 QG_ActionHandler * actionHandler;
62 };
63
64 #endif  // __BLOCKWIDGET_H__