]> SALOME platform Git repositories - modules/shaper.git/blob - src/XGUI/XGUI_MenuGroupPanel.h
Salome HOME
Merge branch 'master' of newgeom:newgeom.git
[modules/shaper.git] / src / XGUI / XGUI_MenuGroupPanel.h
1
2 #ifndef XGUI_MenuGroupPanel_H
3 #define XGUI_MenuGroupPanel_H
4
5 #include "XGUI_Interfaces.h"
6
7 #include <QWidget>
8 #include <QMap>
9
10 class QGridLayout;
11 class XGUI_Command;
12
13 class XGUI_MenuGroupPanel : public QWidget, public IMenuGroup
14 {
15     Q_OBJECT
16 public:
17     explicit XGUI_MenuGroupPanel(QWidget *parent = 0);
18
19     virtual IFeatureMenu* addFeature(const QString& theId, 
20                                      const QString& theTitle, 
21                                      const QString& theTip, 
22                                      const QIcon& theIcon, 
23                                      const QKeySequence& theKeys = QKeySequence());
24
25 protected:
26     virtual void resizeEvent(QResizeEvent *theEvent);
27
28 private:
29     void addWidget(QWidget* theWgt);
30     void placeWidget(QWidget* theWgt);
31     void addCommand(XGUI_Command* theAction);
32
33     QMap<XGUI_Command*, QWidget*> myActions;
34     QGridLayout* myLayout;
35     int myNewRow;
36     int myNewCol;
37     int myMaxRow;
38 };
39
40 #endif