1 // File: PartSet_OperationSketchBase.h
2 // Created: 20 Apr 2014
3 // Author: Natalia ERMOLAEVA
5 #ifndef PartSet_OperationSketchBase_H
6 #define PartSet_OperationSketchBase_H
10 #include <TopoDS_Shape.hxx>
12 #include <NCollection_List.hxx>
14 #include <ModuleBase_PropPanelOperation.h>
20 \class PartSet_OperationSketchBase
21 * \brief The base operation for the sketch features.
22 * Base class for all sketch operations. It provides an access to the feature preview
24 class PARTSET_EXPORT PartSet_OperationSketchBase : public ModuleBase_PropPanelOperation
29 /// \param theId an feature index
30 /// \param theParent the object parent
31 PartSet_OperationSketchBase(const QString& theId, QObject* theParent);
33 virtual ~PartSet_OperationSketchBase();
35 /// Returns the feature preview shape
36 boost::shared_ptr<GeomAPI_Shape> preview() const;
38 /// Returns the operation local selection mode
39 /// \return the selection mode
40 virtual int getSelectionMode() const = 0;
42 /// Gives the current selected objects to be processed by the operation
43 /// \param theList a list of interactive selected shapes
44 virtual void setSelectedShapes(const NCollection_List<TopoDS_Shape>& theList) {};
46 /// Processes the mouse release in the point
47 /// \param thePoint a point clicked in the viewer
48 virtual void mouseReleased(const gp_Pnt& thePoint) {};
50 /// Processes the mouse move in the point
51 /// \param thePoint a 3D point clicked in the viewer
52 virtual void mouseMoved(const gp_Pnt& thePoint) {};
54 /// temporary code to provide edition mode
55 void setEditMode(const bool isEditMode) { myIsEditMode = isEditMode; };
57 bool isEditMode() const { return myIsEditMode; }