1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ModuleBase_WidgetDoubleValue.h
4 // Created: 04 June 2014
5 // Author: Vitaly Smetannikov
7 #ifndef ModuleBase_WidgetDoubleValue_H
8 #define ModuleBase_WidgetDoubleValue_H
10 #include "ModuleBase.h"
11 #include "ModuleBase_ModelWidget.h"
13 class ModuleBase_DoubleSpinBox;
14 class Config_WidgetAPI;
19 class MODULEBASE_EXPORT ModuleBase_WidgetDoubleValue : public ModuleBase_ModelWidget
24 /// \theParent the parent object
25 /// \theData the widget configuation. The attribute of the model widget is obtained from
26 ModuleBase_WidgetDoubleValue(QWidget* theParent, const Config_WidgetAPI* theData,
27 const std::string& theParentId);
29 virtual ~ModuleBase_WidgetDoubleValue();
31 /// Saves the internal parameters to the given feature
32 /// \param theObject a model feature to be changed
33 virtual bool storeValue() const;
35 virtual bool restoreValue();
37 /// Returns list of widget controls
38 /// \return a control list
39 virtual QList<QWidget*> getControls() const;
41 /// Returns the internal parent wiget control, that can be shown anywhere
42 /// \returns the widget
43 QWidget* getControl() const
49 /// Delayed value chnged: when user starts typing something,
50 // it gives him a 0,5 second to finish typing, when sends valueChnaged() signal
51 // void onValueChanged();
56 ModuleBase_DoubleSpinBox* mySpinBox;