1 // File: ModuleBase_WidgetChoice.h
2 // Created: 03 Sept 2014
3 // Author: Vitaly Smetannikov
5 #ifndef ModuleBase_WidgetChoice_H
6 #define ModuleBase_WidgetChoice_H
8 #include "ModuleBase.h"
9 #include "ModuleBase_ModelWidget.h"
15 class MODULEBASE_EXPORT ModuleBase_WidgetChoice : public ModuleBase_ModelWidget
19 ModuleBase_WidgetChoice(QWidget* theParent, const Config_WidgetAPI* theData,
20 const std::string& theParentId);
22 virtual ~ModuleBase_WidgetChoice();
24 /// Saves the internal parameters to the given feature
25 /// \param theObject a model feature to be changed
26 virtual bool storeValue() const;
28 virtual bool restoreValue();
30 virtual bool focusTo();
32 /// Returns the internal parent wiget control, that can be shown anywhere
33 /// \returns the widget
34 QWidget* getControl() const
39 /// Returns list of widget controls
40 /// \return a control list
41 virtual QList<QWidget*> getControls() const;
44 void onCurrentIndexChanged(int theIndex);