X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_ToolBox.h;h=280f5d7f9582f06c8aadadc5a02f05ec9fe00228;hb=423f6b0a08a86d5e47115b87603cddeae4468b49;hp=1c2c1ef7d37df2cf6cc859207c2311589ccfe076;hpb=3b6472899555f2186d09f45f4f1fde38b3af969a;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_ToolBox.h b/src/ModuleBase/ModuleBase_ToolBox.h index 1c2c1ef7d..280f5d7f9 100644 --- a/src/ModuleBase/ModuleBase_ToolBox.h +++ b/src/ModuleBase/ModuleBase_ToolBox.h @@ -14,6 +14,7 @@ class QButtonGroup; class QFrame; class QHBoxLayout; class QStackedWidget; +class ModuleBase_ModelWidget; /** * \class ModuleBase_ToolBox @@ -27,14 +28,16 @@ class MODULEBASE_EXPORT ModuleBase_ToolBox : public QFrame public: /// Constructor /// \param theParent a parent widget - ModuleBase_ToolBox( QWidget* theParent ); + /// \param theUseFrameStyleBox a flag if the tool box should have box covered + /// buttons and current page + ModuleBase_ToolBox(QWidget* theParent, const bool theUseFrameStyleBox = false); virtual ~ModuleBase_ToolBox(); /// Add a new item to the tool box /// \param thePage a widget of the new item /// \param theName a name of the item /// \param theIcon an icon of the item - void addItem( QWidget* thePage, const QString& theName, const QPixmap& theIcon ); + void addItem(QWidget* thePage, const QString& theName, const QPixmap& theIcon); /// \return number of items int count() const; @@ -44,15 +47,21 @@ public: /// Set current item /// \param theIdx an index - void setCurrentIndex( const int theIdx); + void setCurrentIndex(const int theIdx); + + /// Found in the controls of the model widget parent in Stacked Widget + /// returns whether this controls are in the current widget of the stacked widgets + /// \param theWidget a model widget + /// \return boolean result + static bool isOffToolBoxParent(ModuleBase_ModelWidget* theWidget); signals: /// A signal which is emited on current item changed - void currentChanged( int ); + void currentChanged(int); private slots: /// A slot called on button press - void onButton( int ); + void onButton(int); private: QButtonGroup* myButtonsGroup;