Salome HOME
855dbb91f6dfab95000ec072ef273fb1c1b3ec5b
[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 class XGUI_Command: public QWidgetAction
10 {
11 Q_OBJECT
12 public:
13   XGUI_Command(const QString& theId, QObject * parent);
14   XGUI_Command(const QString& theId, const QIcon& icon, const QString& text, QObject* parent);
15   ~XGUI_Command();
16
17   virtual bool enabled() const;
18   virtual void enable();
19   virtual void disable();
20   virtual QString getId() const
21   {
22     return myId;
23   }
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