5 #include <QWidgetAction>
7 #define MIN_BUTTON_HEIGHT 25
8 #define MIN_BUTTON_WIDTH 60
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, const QString& theDocumentKind,
19 QObject * parent, bool isCheckable = false);
20 XGUI_Command(const QString& theId, const QString& theDocumentKind,
21 const QIcon& icon, const QString& text, QObject* parent,
22 bool isCheckable = false);
25 const QString& documentKind() const;
26 const QStringList& nestedCommands() const;
27 void setNestedCommands(const QStringList& myUnblockableCommands);
29 //! Connect the command to a slot
30 virtual void connectTo(const QObject* theResiver, const char* theSlot);
33 //! Creates a command representation widget dependently on parent widget type
34 virtual QWidget* createWidget(QWidget* theParent);
39 QString myDocumentKind;
40 //! List of Ids of commands which WILL NOT be blocked when the command is on.
41 QStringList myNestedCommands;