]> Shamusworld >> Repos - architektonas/blob - src/forms/cadtoolbarselect.h
Refactored CAD tool bars to use predefined actions.
[architektonas] / src / forms / cadtoolbarselect.h
1 #ifndef __CADTOOLBARSELECT_H__
2 #define __CADTOOLBARSELECT_H__
3
4 #include <QtGui>
5
6 class CadToolBar;
7 class QG_ActionHandler;
8 class RS_ActionInterface;
9
10 class CadToolBarSelect: public QWidget
11 {
12         Q_OBJECT
13
14         public:
15                 CadToolBarSelect(CadToolBar * parent, Qt::WindowFlags flags = 0);
16                 ~CadToolBarSelect();
17
18                 void setSelectAction(RS_ActionInterface * selectAction);
19                 void setNextAction(int nextAction);
20
21         public slots:
22                 void runNextAction();
23
24         protected slots:
25                 void back();
26
27         private:
28                 QToolButton * CreateToolButton(QAction * action);
29
30         protected:
31                 CadToolBar * cadToolBar;
32
33         private:
34                 QToolButton * doit;
35                 QG_ActionHandler * actionHandler;
36                 RS_ActionInterface * selectAction;
37                 int nextAction;
38 };
39
40 #endif  // __CADTOOLBARSELECT_H__