X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_ToolBox.h;h=280f5d7f9582f06c8aadadc5a02f05ec9fe00228;hb=3e6012473696e5fd94e3c8240e2e1eda8def1743;hp=2b48b0849d7fe9c436a2d955678a5ec17c82800d;hpb=41695176c748943485f8844fea6e89cef9a0b6f5;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_ToolBox.h b/src/ModuleBase/ModuleBase_ToolBox.h index 2b48b0849..280f5d7f9 100644 --- a/src/ModuleBase/ModuleBase_ToolBox.h +++ b/src/ModuleBase/ModuleBase_ToolBox.h @@ -14,25 +14,54 @@ class QButtonGroup; class QFrame; class QHBoxLayout; class QStackedWidget; +class ModuleBase_ModelWidget; +/** + * \class ModuleBase_ToolBox + * \ingroup GUI + * \brief An extension of QFrame object + */ class MODULEBASE_EXPORT ModuleBase_ToolBox : public QFrame { Q_OBJECT public: - ModuleBase_ToolBox( QWidget* theParent ); + /// Constructor + /// \param theParent a parent widget + /// \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(); - void addItem( QWidget* thePage, const QString& theName, const QIcon& theIcon ); + /// 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); + + /// \return number of items int count() const; + + /// \return index of current widget int currentIndex() const; - void setCurrentIndex( const int ); + + /// Set current item + /// \param theIdx an index + 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: - void currentChanged( int ); + /// A signal which is emited on current item changed + void currentChanged(int); private slots: - void onButton( int ); + /// A slot called on button press + void onButton(int); private: QButtonGroup* myButtonsGroup;