X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_Command.h;h=0f5aa627159862b360ea38b44e0ec56c38600fa7;hb=81e0a6c31838fd3f276d6b44ae24a2acc831a8f4;hp=dbd45b43207d969a93b67916a3768bdffbe04d12;hpb=7de345ac623f20ab2f2e3405066c75c86f8e662a;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_Command.h b/src/XGUI/XGUI_Command.h index dbd45b432..0f5aa6271 100644 --- a/src/XGUI/XGUI_Command.h +++ b/src/XGUI/XGUI_Command.h @@ -4,41 +4,41 @@ #include "XGUI.h" #include -#define MIN_BUTTON_HEIGHT 18 -#define MIN_BUTTON_WIDTH 40 +#define MIN_BUTTON_HEIGHT 25 +#define MIN_BUTTON_WIDTH 60 /**\class XGUI_Command * \ingroup GUI * \brief Represents a command item in the application menu (Workbench) */ -class XGUI_EXPORT XGUI_Command: public QWidgetAction +class XGUI_EXPORT XGUI_Command : public QWidgetAction { Q_OBJECT -public: - XGUI_Command(const QString& theId, QObject * parent, bool isCheckable = false); - XGUI_Command(const QString& theId, const QIcon& icon, const QString& text, QObject* parent, bool isCheckable = false); + public: + XGUI_Command(const QString& theId, const QString& theDocumentKind, + QObject * parent, bool isCheckable = false); + XGUI_Command(const QString& theId, const QString& theDocumentKind, + const QIcon& icon, const QString& text, QObject* parent, + bool isCheckable = false); ~XGUI_Command(); - //VSV: Don't use this method for compatibility with SALOME. Use the construction below - /*virtual QString id() const - { - return data().toString(); - }*/ - - const QStringList& unblockableCommands() const; - void setUnblockableCommands(const QStringList& myUnblockableCommands); + const QString& documentKind() const; + const QStringList& nestedCommands() const; + void setNestedCommands(const QStringList& myUnblockableCommands); //! Connect the command to a slot virtual void connectTo(const QObject* theResiver, const char* theSlot); -protected: + protected: //! Creates a command representation widget dependently on parent widget type virtual QWidget* createWidget(QWidget* theParent); -private: + private: bool myCheckable; + + QString myDocumentKind; //! List of Ids of commands which WILL NOT be blocked when the command is on. - QStringList myUnblockableCommands; + QStringList myNestedCommands; }; #endif