virtual bool isGranted() const;
/// Returns the operation local selection mode
+ /// \param theFeature the feature object to get the selection mode
/// \return the selection mode
- virtual int getSelectionMode() const;
+ virtual int getSelectionMode(boost::shared_ptr<ModelAPI_Feature> theFeature) const;
/// Gives the current selected objects to be processed by the operation
/// \param thePoint a point clicked in the viewer
/// Gives the current mouse point in the viewer
/// \param thePoint a point clicked in the viewer
virtual void mouseMoved(const gp_Pnt& thePoint);
+ /// Processes the key pressed in the view
+ /// \param theKey a key value
+ virtual void keyReleased(const int theKey);
+
+signals:
+ /// signal about the sketch plane is selected
+ /// \param theX the value in the X direction of the plane
+ /// \param theX the value in the Y direction value of the plane
+ /// \param theX the value in the Z direction of the plane
+ void localContextChanged(boost::shared_ptr<ModelAPI_Feature> theFeature,
+ int theMode);
protected:
/// \brief Virtual method called when operation is started
/// \param theAttribute the start or end attribute of the line
void setLinePoint(const gp_Pnt& thePoint, const std::string& theAttribute);
+ /// \brief Set the point to the line by the point of the source line.
+ /// \param theSourceFeature the feature, where the point is obtained
+ /// \param theSourceAttribute the start or end attribute of the source line
+ /// \param theAttribute the start or end attribute of the line
+ void setLinePoint(boost::shared_ptr<ModelAPI_Feature> theSourceFeature,
+ const std::string& theSourceAttribute,
+ const std::string& theAttribute);
/// \brief Converts the 3D point to the projected coodinates on the sketch plane.
/// \param thePoint the 3D point in the viewer
/// \param theX the X coordinate