X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_OperationSketchLine.h;h=db20415c74cb86f54548866d6b52f83077734eb7;hb=004fa7f94b343a782405d3fe21973521150729b4;hp=b048ef8a7b451dc018878adf551a88a37d0a41af;hpb=1d7a043abfadf964bf38802e8adb5a4773fec900;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_OperationSketchLine.h b/src/PartSet/PartSet_OperationSketchLine.h index b048ef8a7..db20415c7 100644 --- a/src/PartSet/PartSet_OperationSketchLine.h +++ b/src/PartSet/PartSet_OperationSketchLine.h @@ -37,7 +37,8 @@ public: /// Returns that this operator can be started above already running one. /// The runned operation should be the sketch feature modified operation - virtual bool isGranted() const; + /// \param theOperation the previous running operation + virtual bool isGranted(ModuleBase_IOperation* theOperation) const; /// Returns the operation local selection mode /// \param theFeature the feature object to get the selection mode @@ -45,21 +46,28 @@ public: virtual std::list getSelectionModes(boost::shared_ptr theFeature) const; /// Initializes some fields accorging to the feature - /// \param theFeature the feature - virtual void init(boost::shared_ptr theFeature); + /// \param theSelected the list of selected presentations + /// \param theHighlighted the list of highlighted presentations + virtual void init(boost::shared_ptr theFeature, + const std::list& theSelected, + const std::list& theHighlighted); + + /// Returns the operation sketch feature + /// \returns the sketch instance + virtual boost::shared_ptr sketch() const; /// Gives the current selected objects to be processed by the operation - /// \param thePoint a point clicked in the viewer /// \param theEvent the mouse event + /// \param theView a viewer to have the viewer the eye position /// \param theSelected the list of selected presentations + /// \param theHighlighted the list of highlighted presentations virtual void mouseReleased(QMouseEvent* theEvent, Handle_V3d_View theView, - const std::list& theSelected); + const std::list& theSelected, + const std::list& theHighlighted); /// Gives the current mouse point in the viewer /// \param thePoint a point clicked in the viewer /// \param theEvent the mouse event - /// \param theSelected the list of selected presentations - virtual void mouseMoved(QMouseEvent* theEvent, Handle_V3d_View theView, - const std::list& theSelected); + virtual void mouseMoved(QMouseEvent* theEvent, Handle_V3d_View theView); /// Processes the key pressed in the view /// \param theKey a key value virtual void keyReleased(const int theKey); @@ -81,8 +89,9 @@ protected: /// Creates an operation new feature /// In addition to the default realization it appends the created line feature to /// the sketch feature + /// \param theFlushMessage the flag whether the create message should be flushed /// \returns the created feature - virtual boost::shared_ptr createFeature(); + virtual boost::shared_ptr createFeature(const bool theFlushMessage = true); /// Creates a constraint on two points /// \param thePoint1 the first point @@ -110,10 +119,12 @@ protected: double theX, double theY); /// \brief Save the point to the line. + /// \param theFeature the line feature /// \param theX the horizontal coordinate /// \param theY the vertical coordinate /// \param theAttribute the start or end attribute of the line - void setLinePoint(double theX, double theY, const std::string& theAttribute); + void setLinePoint(boost::shared_ptr, double theX, double theY, + const std::string& theAttribute); /// \brief Save the point to the line. /// \param thePoint the 3D point in the viewer /// \param theAttribute the start or end attribute of the line @@ -121,7 +132,7 @@ protected: protected: ///< Structure to lists the possible types of point selection modes - enum PointSelectionMode {SM_FirstPoint, SM_SecondPoint}; + enum PointSelectionMode {SM_FirstPoint, SM_SecondPoint, SM_DonePoint}; private: boost::shared_ptr mySketch; ///< the sketch feature