4 #include <QWidgetAction>
6 #define MIN_BUTTON_HEIGHT 18
7 #define MIN_BUTTON_WIDTH 40
11 * \brief Represents a command item in the application menu (Workbench)
13 class XGUI_Command: public QWidgetAction
17 XGUI_Command(const QString& theId, QObject * parent);
18 XGUI_Command(const QString& theId, const QIcon& icon, const QString& text, QObject* parent);
21 //! Returns true if the command is enabled
22 virtual bool enabled() const;
24 //! Set the command enabled
25 virtual void enable();
27 //! Set the command disabled
28 virtual void disable();
30 //! Returns Id of the command
31 virtual QString getId() const
36 //! Connect the command to a slot
37 virtual void connectTo(const QObject* theResiver, const char* theSlot);
40 //! Creates a command representation widget dependently on parent widget type
41 virtual QWidget* createWidget(QWidget* theParent);