5 #include <QWidgetAction>
7 #define MIN_BUTTON_HEIGHT 18
8 #define MIN_BUTTON_WIDTH 40
10 /**\class XGUI_Command
12 * \brief Represents a command item in the application menu (Workbench)
14 class XGUI_EXPORT XGUI_Command: public QWidgetAction
18 XGUI_Command(const QString& theId, QObject * parent);
19 XGUI_Command(const QString& theId, const QIcon& icon, const QString& text, QObject* parent);
22 //! Returns true if the command is enabled
23 virtual bool enabled() const;
25 //! Set the command enabled
26 virtual void enable();
28 //! Set the command disabled
29 virtual void disable();
31 //! Returns Id of the command
32 virtual QString id() const
37 //! Connect the command to a slot
38 virtual void connectTo(const QObject* theResiver, const char* theSlot);
41 //! Creates a command representation widget dependently on parent widget type
42 virtual QWidget* createWidget(QWidget* theParent);