]> SALOME platform Git repositories - modules/shaper.git/blob - src/XGUI/XGUI_Command.h
Salome HOME
Merge branch 'master' of newgeom:newgeom.git
[modules/shaper.git] / src / XGUI / XGUI_Command.h
1 #ifndef XGUI_Command_H
2 #define XGUI_Command_H
3
4 #include "XGUI_Interfaces.h"
5
6 #include <QWidgetAction>
7
8 #define MIN_BUTTON_HEIGHT 18
9 #define MIN_BUTTON_WIDTH 40
10
11
12 class XGUI_Command : public QWidgetAction, public IFeatureMenu
13 {
14     Q_OBJECT
15 public:
16     XGUI_Command(const QString& theId, QObject * parent);
17     XGUI_Command(const QString& theId, const QIcon& icon, const QString& text, QObject* parent);
18     ~XGUI_Command();
19
20     virtual bool enabled() const;
21     virtual void enable();
22     virtual void disable();
23     virtual QString getId() const { return myId; }
24
25     virtual void connectTo(const QObject* theResiver, const char* theSlot);
26
27 protected:
28     virtual QWidget* createWidget(QWidget* theParent);
29
30 private:
31     QString myId;
32 };
33
34 #endif