X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_WidgetPoint2d.h;h=f162e77c6f43da55be0477f7cb611fc828930eaa;hb=06e7f5859095193fc7f498bd89a7d28009794f53;hp=515a03c4120a7856bf950eee829b15285e887757;hpb=c4eab94a20a0d93100549a210582d46409fec1cc;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_WidgetPoint2d.h b/src/PartSet/PartSet_WidgetPoint2d.h index 515a03c41..f162e77c6 100644 --- a/src/PartSet/PartSet_WidgetPoint2d.h +++ b/src/PartSet/PartSet_WidgetPoint2d.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2019 CEA/DEN, EDF R&D +// Copyright (C) 2014-2023 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -25,6 +25,7 @@ #include #include +#include #include @@ -98,7 +99,7 @@ Q_OBJECT const bool theToValidate); /// Select the internal content if it can be selected. It is empty in the default realization - virtual void selectContent(); + //virtual void selectContent(); /// Returns list of widget controls /// \return a control list @@ -211,14 +212,6 @@ protected: virtual void initializeValueByActivate(); private: - /// Returns point 2d from selected vertex - /// \param theView a view window - /// \param theShape a vertex shape - /// \param theX an output value of X coordinate - /// \param theY an output value of Y coordinate - bool getPoint2d(const Handle(V3d_View)& theView, const TopoDS_Shape& theShape, - double& theX, double& theY) const; - /// Creates constrains of the clicked point /// \param theClickedX the horizontal coordnate of the point /// \param theClickedY the vertical coordnate of the point @@ -230,6 +223,14 @@ protected: /// \return true if succed bool setConstraintToObject(const ObjectPtr& theObject); + /// Process selected value + /// \param theValue the selected object + /// \param theX X coordinate of clicked point + /// \param theY Y coordinate of clicked point + void processSelection(const ModuleBase_ViewerPrsPtr& theValue, double theX, double theY); + + +public: /// Returns if the feature is an orphan point, circle or an arc. Returns true if it /// has no a coincident to other lines. It processes point, circle and arc features /// In circle an arc features, only centers are processed, for other points, it returns @@ -274,6 +275,7 @@ protected: const FeaturePtr& theSkipFeature, const std::shared_ptr& thePoint); +private: /// Returns attribute reference if the key is defined in XML definition of this control /// \return found attribute or null std::shared_ptr attributeRefAttr() const;