X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FPartSet%2FPartSet_WidgetPoint2d.h;h=19846bfe7762cb83c3819fb1b8a3e5e8b4960945;hb=ac4cd960b238acc086206db688be0563e9893490;hp=af021f2134440b4302958149b766ee28298d5aab;hpb=2532fb2df83ee1ddd9ff3e8b381d3788eaa15b69;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_WidgetPoint2d.h b/src/PartSet/PartSet_WidgetPoint2d.h old mode 100755 new mode 100644 index af021f213..19846bfe7 --- a/src/PartSet/PartSet_WidgetPoint2d.h +++ b/src/PartSet/PartSet_WidgetPoint2d.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2020 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -12,9 +12,9 @@ // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #ifndef PartSet_WidgetPoint2D_H @@ -67,6 +67,11 @@ Q_OBJECT /// Destructor virtual ~PartSet_WidgetPoint2D(); + /// Fills given container with selection modes if the widget has it + /// \param [out] theModuleSelectionModes module additional modes, -1 means all default modes + /// \param theModes [out] a container of modes + virtual void selectionModes(int& theModuleSelectionModes, QIntList& theModes); + /// Checks if the selection presentation is valid in widget /// \param theValue a selected presentation in the view /// \return a boolean value @@ -153,6 +158,10 @@ Q_OBJECT std::shared_ptr& theObject, std::shared_ptr& theShape); + /// Return reference to external objects manager + /// \return manager instance + PartSet_ExternalObjectsMgr* getExternalObjectMgr() const { return myExternalObjectMgr; } + signals: /// Signal about selection of an existing vertex from an object void vertexSelected(); @@ -202,14 +211,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 @@ -221,6 +222,7 @@ protected: /// \return true if succed bool setConstraintToObject(const ObjectPtr& theObject); +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 @@ -265,6 +267,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;