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 Config_WidgetAPI;
16 class MODULEBASE_EXPORT ModuleBase_WidgetDoubleValue : public ModuleBase_ModelWidget
21 /// \theParent the parent object
22 /// \theData the widget configuation. The attribute of the model widget is obtained from
23 ModuleBase_WidgetDoubleValue(QWidget* theParent, const Config_WidgetAPI* theData,
24 const std::string& theParentId);
26 virtual ~ModuleBase_WidgetDoubleValue();
28 /// Saves the internal parameters to the given feature
29 /// \param theObject a model feature to be changed
30 virtual bool storeValue() const;
32 virtual bool restoreValue();
34 /// Returns list of widget controls
35 /// \return a control list
36 virtual QList<QWidget*> getControls() const;
38 /// Returns the internal parent wiget control, that can be shown anywhere
39 /// \returns the widget
40 QWidget* getControl() const
45 /// Process key release envent on the widget spin box controls
46 /// \param theObject the object where the event happens
47 /// \param theEvent the processed event
48 virtual bool eventFilter(QObject *theObject, QEvent *theEvent);
53 QDoubleSpinBox* mySpinBox;