1 // File: ModuleBase_WidgetDoubleValue.h
2 // Created: 04 June 2014
3 // Author: Vitaly Smetannikov
5 #ifndef ModuleBase_WidgetDoubleValue_H
6 #define ModuleBase_WidgetDoubleValue_H
8 #include "ModuleBase.h"
9 #include "ModuleBase_ModelWidget.h"
11 class ModuleBase_DoubleSpinBox;
12 class Config_WidgetAPI;
17 class MODULEBASE_EXPORT ModuleBase_WidgetDoubleValue : public ModuleBase_ModelWidget
22 /// \theParent the parent object
23 /// \theData the widget configuation. The attribute of the model widget is obtained from
24 ModuleBase_WidgetDoubleValue(QWidget* theParent, const Config_WidgetAPI* theData,
25 const std::string& theParentId);
27 virtual ~ModuleBase_WidgetDoubleValue();
29 /// Saves the internal parameters to the given feature
30 /// \param theObject a model feature to be changed
31 virtual bool storeValue() const;
33 virtual bool restoreValue();
35 /// Returns list of widget controls
36 /// \return a control list
37 virtual QList<QWidget*> getControls() const;
39 /// Returns the internal parent wiget control, that can be shown anywhere
40 /// \returns the widget
41 QWidget* getControl() const
47 /// Delayed value chnged: when user starts typing something,
48 // it gives him a 0,5 second to finish typing, when sends valueChnaged() signal
49 // void onValueChanged();
54 ModuleBase_DoubleSpinBox* mySpinBox;