class GeomAPI_Pnt2d;
class QGroupBox;
-class QDoubleSpinBox;
+class ModuleBase_DoubleSpinBox;
/**\class ModuleBase_WidgetPoint2D
* \ingroup GUI
*/
class MODULEBASE_EXPORT ModuleBase_WidgetPoint2D : public ModuleBase_ModelWidget
{
- Q_OBJECT
-public:
+Q_OBJECT
+ public:
/// Constructor
/// \theParent the parent object
/// \theParent the parent object
/// \theData the widget configuation. The attribute of the model widget is obtained from
- ModuleBase_WidgetPoint2D(QWidget* theParent, const Config_WidgetAPI* theData, const std::string& theParentId);
+ ModuleBase_WidgetPoint2D(QWidget* theParent, const Config_WidgetAPI* theData,
+ const std::string& theParentId);
/// Destructor
virtual ~ModuleBase_WidgetPoint2D();
/// Saves the internal parameters to the given feature
/// \param theObject a model feature to be changed
- virtual bool storeValue(ObjectPtr theObject) const;
+ virtual bool storeValue() const;
- virtual bool restoreValue(ObjectPtr theObject);
+ virtual bool restoreValue();
/// Returns the internal parent wiget control, that can be shown anywhere
/// \returns the widget
/// \return a control list
virtual QList<QWidget*> getControls() const;
- /// Process key release envent on the widget spin box controls
- /// \param theObject the object where the event happens
- /// \param theEvent the processed event
- virtual bool eventFilter(QObject *theObject, QEvent *theEvent);
-
bool initFromPrevious(ObjectPtr theObject);
signals:
/// \param the attribute of the feature
void storedPoint2D(ObjectPtr theObject, const std::string& theAttribute);
-protected:
+ protected:
/// Fill the widget values by given point
/// \param thePoint the point
void setPoint(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint);
-private:
- QGroupBox* myGroupBox; ///< the parent group box for all intenal widgets
- QDoubleSpinBox* myXSpin; ///< the spin box for the X coordinate
- QDoubleSpinBox* myYSpin; ///< the spin box for the Y coordinate
+ private:
+ QGroupBox* myGroupBox; ///< the parent group box for all intenal widgets
+ ModuleBase_DoubleSpinBox* myXSpin; ///< the spin box for the X coordinate
+ ModuleBase_DoubleSpinBox* myYSpin; ///< the spin box for the Y coordinate
- std::string myOptionParam; /// Parameter name which has to be taken from previous feature
+ std::string myOptionParam; /// Parameter name which has to be taken from previous feature
};
#endif