2 * NewGeom_NestedButton.h
4 * Created on: Apr 13, 2015
8 #ifndef SRC_NEWGEOM_NEWGEOM_NESTEDBUTTON_H_
9 #define SRC_NEWGEOM_NEWGEOM_NESTEDBUTTON_H_
11 #include <QWidgetAction>
20 * Custom (nested) button in salome mode.
22 class NewGeom_NestedButton : public QWidgetAction
27 /// \param theParent a parent objects
28 /// \param theNestedActions a list of nested actions
29 NewGeom_NestedButton(QObject* theParent, const QList<QAction*>& theNestedActions);
30 virtual ~NewGeom_NestedButton();
33 /// Shows/hides the additional buttons widget
34 void showAdditionalButtons(bool);
36 /// Slot called on action state
37 void actionStateChanged();
40 /// Creates the button representation
41 /// \param theParent a parent widget
42 virtual QWidget * createWidget(QWidget * theParent);
44 virtual bool event(QEvent* theEvent);
47 QList<QAction*> myNestedActions; ///< list of nested actions
48 QWidget* myAdditionalButtonsWidget; ///< widget to precess additional buttons visibility
49 QFrame* myButtonFrame; ///< frame arround button representation
50 QToolButton* myThisButton; ///< main button
53 #endif /* SRC_NEWGEOM_NEWGEOM_NESTEDBUTTON_H_ */