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