Salome HOME
Auto-formatting according to the defined code standard.
[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   QMap<XGUI_Command*, QWidget*> myActions;
28   QGridLayout* myLayout;
29   int myNewRow;
30   int myNewCol;
31   int myMaxRow;
32 };
33
34 #endif