Salome HOME
Issue #591 - Highlight of the first argument of constraints
[modules/shaper.git] / src / NewGeom / NewGeom_NestedButton.h
1 /*
2  * NewGeom_NestedButton.h
3  *
4  *  Created on: Apr 13, 2015
5  *      Author: sbh
6  */
7
8 #ifndef SRC_NEWGEOM_NEWGEOM_NESTEDBUTTON_H_
9 #define SRC_NEWGEOM_NEWGEOM_NESTEDBUTTON_H_
10
11 #include <QWidgetAction>
12
13 class QFrame;
14 class QAction;
15 class QWidget;
16 class QToolButton;
17
18 /*!
19  * \ingroup Salome
20  * Custom (nested) button in salome mode.
21  */
22 class NewGeom_NestedButton : public QWidgetAction
23 {
24   Q_OBJECT
25  public:
26   NewGeom_NestedButton(QObject *parent, const QList<QAction*>& theNestedActions);
27   virtual ~NewGeom_NestedButton();
28
29  public slots:
30   /// Shows/hides the additional buttons widget
31   void showAdditionalButtons(bool);
32   void actionStateChanged();
33
34  protected:
35   /// Creates the button representation
36   virtual QWidget * createWidget(QWidget * theParent);
37
38  private:
39   QList<QAction*> myNestedActions; ///< list of nested actions
40   QWidget* myAdditionalButtonsWidget; ///< widget to precess additional buttons visibility
41   QFrame* myButtonFrame; ///< frame arround button representation
42   QToolButton* myThisButton; ///< main button
43 };
44
45 #endif /* SRC_NEWGEOM_NEWGEOM_NESTEDBUTTON_H_ */