1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
4 * SHAPERGUI_NestedButton.h
6 * Created on: Apr 13, 2015
10 #ifndef SRC_SHAPERGUI_NESTEDBUTTON_H_
11 #define SRC_SHAPERGUI_NESTEDBUTTON_H_
13 #include <QWidgetAction>
22 * Custom (nested) button in salome mode.
24 class SHAPERGUI_NestedButton : public QWidgetAction
29 /// \param theParent a parent objects
30 /// \param theNestedActions a list of nested actions
31 SHAPERGUI_NestedButton(QObject* theParent, const QList<QAction*>& theNestedActions);
32 virtual ~SHAPERGUI_NestedButton();
35 /// Shows/hides the additional buttons widget
36 void showAdditionalButtons(bool);
38 /// Slot called on action state
39 void actionStateChanged();
42 /// Creates the button representation
43 /// \param theParent a parent widget
44 virtual QWidget * createWidget(QWidget * theParent);
46 virtual bool event(QEvent* theEvent);
49 QList<QAction*> myNestedActions; ///< list of nested actions
50 QWidget* myAdditionalButtonsWidget; ///< widget to precess additional buttons visibility
51 QFrame* myButtonFrame; ///< frame arround button representation
52 QToolButton* myThisButton; ///< main button
55 #endif /* SRC_SHAPERGUI_NESTEDBUTTON_H_ */