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