1 // File: ModuleBase_WidgetPoint2D.h
2 // Created: 25 Apr 2014
3 // Author: Natalia ERMOLAEVA
5 #ifndef ModuleBase_WidgetPoint2D_H
6 #define ModuleBase_WidgetPoint2D_H
8 #include <ModuleBase.h>
9 #include "ModuleBase_WidgetCustom.h"
13 class ModelAPI_Feature;
18 /**\class ModuleBase_WidgetPoint2D
20 * \brief Custom widget. An abstract class to be redefined to fill with some GUI controls
22 class MODULEBASE_EXPORT ModuleBase_WidgetPoint2D : public ModuleBase_WidgetCustom
27 /// \theParent the parent object
28 /// \theTitle the group box title
29 /// \theFeatureAttributeID the identifier of the feature attribute
30 ModuleBase_WidgetPoint2D(QWidget* theParent, QString theTitle,
31 const std::string& theFeatureAttributeID);
33 virtual ~ModuleBase_WidgetPoint2D();
35 /// Saves the internal parameters to the given feature
36 /// \param theFeature a model feature to be changed
37 virtual void store(boost::shared_ptr<ModelAPI_Feature> theFeature);
39 /// Returns the internal parent wiget control, that can be shown anywhere
40 /// \returns the widget
41 QWidget* getControl() const;
44 std::string myFeatureAttributeID; ///< the identifier of the feature attribute
45 QGroupBox* myGroupBox; ///< the parent group box for all intenal widgets
46 QDoubleSpinBox* myXSpin; ///< the spin box for the X coordinate
47 QDoubleSpinBox* myYSpin; ///< the spin box for the Y coordinate