1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ModuleBase_WidgetAction.h
4 // Created: 15 Apr 2016
5 // Author: Natalia Ermolaeva
7 #ifndef ModuleBase_WidgetAction_H
8 #define ModuleBase_WidgetAction_H
10 #include "ModuleBase.h"
11 #include "ModuleBase_ModelWidget.h"
13 class Config_WidgetAPI;
19 * Implementation of widget for feature action (tool button)
21 class MODULEBASE_EXPORT ModuleBase_WidgetAction : public ModuleBase_ModelWidget
26 /// \param theParent the parent object
27 /// \param theData the widget configuation. The attribute of the model widget is obtained from
28 ModuleBase_WidgetAction(QWidget* theParent, const Config_WidgetAPI* theData);
30 virtual ~ModuleBase_WidgetAction();
32 /// Returns list of widget controls
33 /// \return a control list
34 virtual QList<QWidget*> getControls() const;
38 /// \return True in success
39 virtual bool storeValueCustom();
42 virtual bool restoreValueCustom();
45 /// Listens the button click and call the customAction function of the current feature
46 void onActionClicked();
49 QToolButton* myButton; ///< action button
50 std::string myActionID; ///< action index