1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ModuleBase_ToolBox.h
4 // Created: 10 August 2015
5 // Author: Alexandre SOLOVYOV
7 #ifndef ModuleBase_ToolBox_H
8 #define ModuleBase_ToolBox_H
10 #include <ModuleBase.h>
19 * \class ModuleBase_ToolBox
21 * \brief An extension of QFrame object
23 class MODULEBASE_EXPORT ModuleBase_ToolBox : public QFrame
29 /// \param theParent a parent widget
30 ModuleBase_ToolBox( QWidget* theParent );
31 virtual ~ModuleBase_ToolBox();
33 /// Add a new item to the tool box
34 /// \param thePage a widget of the new item
35 /// \param theName a name of the item
36 /// \param theIcon an icon of the item
37 void addItem( QWidget* thePage, const QString& theName, const QPixmap& theIcon );
39 /// \return number of items
42 /// \return index of current widget
43 int currentIndex() const;
46 /// \param theIdx an index
47 void setCurrentIndex( const int theIdx);
50 /// A signal which is emited on current item changed
51 void currentChanged( int );
54 /// A slot called on button press
58 QButtonGroup* myButtonsGroup;
59 QFrame* myButtonsFrame;
60 QHBoxLayout* myButtonsLayout;
61 QStackedWidget* myStack;