5 #include <QWidgetAction>
8 #define MIN_BUTTON_HEIGHT 25
9 #define MIN_BUTTON_WIDTH 60
11 class XGUI_EXPORT XGUI_MenuButton: public QPushButton
15 XGUI_MenuButton(const QIcon & icon, const QString & text, QWidget * parent = 0);
18 // virtual void enterEvent(QEvent * event);
19 // virtual void leaveEvent(QEvent * event);
23 /**\class XGUI_Command
25 * \brief Represents a command item in the application menu (Workbench)
27 class XGUI_EXPORT XGUI_Command: public QWidgetAction
31 XGUI_Command(const QString& theId, QObject * parent, bool isCheckable = false);
32 XGUI_Command(const QString& theId, const QIcon& icon, const QString& text, QObject* parent, bool isCheckable = false);
35 //VSV: Don't use this method for compatibility with SALOME. Use the construction below
36 /*virtual QString id() const
38 return data().toString();
41 const QStringList& nestedCommands() const;
42 void setNestedCommands(const QStringList& myUnblockableCommands);
44 //! Connect the command to a slot
45 virtual void connectTo(const QObject* theResiver, const char* theSlot);
48 //! Creates a command representation widget dependently on parent widget type
49 virtual QWidget* createWidget(QWidget* theParent);
53 //! List of Ids of commands which WILL NOT be blocked when the command is on.
54 QStringList myNestedCommands;