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