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, bool isCheckable = false);
19 XGUI_Command(const QString& theId, const QIcon& icon, const QString& text, QObject* parent, bool isCheckable = false);
22 //VSV: Don't use this method for compatibility with SALOME. Use the construction below
23 /*virtual QString id() const
25 return data().toString();
28 const QStringList& unblockableCommands() const;
29 void setUnblockableCommands(const QStringList& myUnblockableCommands);
31 //! Connect the command to a slot
32 virtual void connectTo(const QObject* theResiver, const char* theSlot);
35 //! Creates a command representation widget dependently on parent widget type
36 virtual QWidget* createWidget(QWidget* theParent);
40 //! List of Ids of commands which WILL NOT be blocked when the command is on.
41 QStringList myUnblockableCommands;