1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ModuleBase_WidgetChoice.h
4 // Created: 03 Sept 2014
5 // Author: Vitaly Smetannikov
7 #ifndef ModuleBase_WidgetChoice_H
8 #define ModuleBase_WidgetChoice_H
10 #include "ModuleBase.h"
11 #include "ModuleBase_ModelWidget.h"
17 class MODULEBASE_EXPORT ModuleBase_WidgetChoice : public ModuleBase_ModelWidget
21 ModuleBase_WidgetChoice(QWidget* theParent, const Config_WidgetAPI* theData,
22 const std::string& theParentId);
24 virtual ~ModuleBase_WidgetChoice();
26 /// Saves the internal parameters to the given feature
27 /// \param theObject a model feature to be changed
28 virtual bool storeValue() const;
30 virtual bool restoreValue();
32 virtual bool focusTo();
34 /// Returns the internal parent wiget control, that can be shown anywhere
35 /// \returns the widget
36 QWidget* getControl() const
41 /// Returns list of widget controls
42 /// \return a control list
43 virtual QList<QWidget*> getControls() const;
46 void onCurrentIndexChanged(int theIndex);