- /// Returns the operation local selection mode
- /// \param theFeature the feature object to get the selection mode
- /// \return the selection mode
- virtual std::list<int> getSelectionModes(FeaturePtr theFeature) const;
+ /// Returns True if the given operation is a Sketcher operation
+ virtual bool isGranted(ModuleBase_Operation* theOperation) const;
/// \param theSelected the list of selected presentations
/// \param theHighlighted the list of highlighted presentations
virtual void mousePressed(QMouseEvent* theEvent, Handle_V3d_View theView,
/// \param theSelected the list of selected presentations
/// \param theHighlighted the list of highlighted presentations
virtual void mousePressed(QMouseEvent* theEvent, Handle_V3d_View theView,
- const std::list<XGUI_ViewerPrs>& theSelected,
- const std::list<XGUI_ViewerPrs>& theHighlighted);
+ const std::list<ModuleBase_ViewerPrs>& theSelected,
+ const std::list<ModuleBase_ViewerPrs>& theHighlighted);
/// Processes the mouse release in the point
/// \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,
/// Processes the mouse release in the point
/// \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<XGUI_ViewerPrs>& theSelected,
- const std::list<XGUI_ViewerPrs>& theHighlighted);
+ const std::list<ModuleBase_ViewerPrs>& theSelected,
+ const std::list<ModuleBase_ViewerPrs>& theHighlighted);
+ /// Set the plane to the current sketch
+ /// \param theShape the shape
+ void setSketchPlane(const TopoDS_Shape& theShape);
+
+ /// If operation needs to redisplay its result during operation
+ /// then this method has to return True
+ virtual bool hasPreview() const { return false; }
+
signals:
/// signal about the sketch plane is selected
/// \param theX the value in the X direction of the plane
signals:
/// signal about the sketch plane is selected
/// \param theX the value in the X direction of the plane
/// Virtual method called when operation started (see start() method for more description)
/// Default impl calls corresponding slot and commits immediately.
virtual void startOperation();
/// Virtual method called when operation started (see start() method for more description)
/// Default impl calls corresponding slot and commits immediately.
virtual void startOperation();
- /// Set the plane to the current sketch
- /// \param theShape the shape
- void setSketchPlane(const TopoDS_Shape& theShape);
+ /// Virtual method called after operation committed (see commit() method for more description)
+ virtual void afterCommitOperation();