X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_OperationSketchBase.h;h=c578796a5a0d7c929bcc0d0015a8fa3079b7500f;hb=3ccd62a2eedaf895c689d77ab4bfc698a592870e;hp=de7c1ce03e4f647b1a7163f30bc55351c14718e9;hpb=c80e8ac643930b858f4f653e2659896ba587b165;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_OperationSketchBase.h b/src/PartSet/PartSet_OperationSketchBase.h index de7c1ce03..c578796a5 100644 --- a/src/PartSet/PartSet_OperationSketchBase.h +++ b/src/PartSet/PartSet_OperationSketchBase.h @@ -1,38 +1,62 @@ +// File: PartSet_OperationSketchBase.h +// Created: 20 Apr 2014 +// Author: Natalia ERMOLAEVA + #ifndef PartSet_OperationSketchBase_H #define PartSet_OperationSketchBase_H #include "PartSet.h" #include +#include +#include #include #include +class GeomAPI_Shape; + /*! - \class PartSet_OperationSketchBase - * \brief The base operation for the sketch features. - * - * Base class for all sketch operations. It provides an access to the feature preview + \class PartSet_OperationSketchBase + * \brief The base operation for the sketch features. + * Base class for all sketch operations. It provides an access to the feature preview */ class PARTSET_EXPORT PartSet_OperationSketchBase : public ModuleBase_PropPanelOperation { -Q_OBJECT + Q_OBJECT public: + /// Constructor + /// \param theId an feature index + /// \param theParent the object parent PartSet_OperationSketchBase(const QString& theId, QObject* theParent); + /// Destructor virtual ~PartSet_OperationSketchBase(); - const TopoDS_Shape& preview() const; + /// Returns the feature preview shape + boost::shared_ptr preview() const; + + /// Returns the operation local selection mode + /// \return the selection mode + virtual int getSelectionMode() const = 0; + + /// Gives the current selected objects to be processed by the operation + /// \param theList a list of interactive selected shapes + virtual void setSelectedShapes(const NCollection_List& theList) {}; + + /// Processes the mouse release in the point + /// \param thePoint a point clicked in the viewer + virtual void mouseReleased(const gp_Pnt& thePoint) {}; -signals: - /** - * The signal about preview visualization. - * \param isDisplay a state whether the preview should be displayed or erased - */ - void visualizePreview(bool isDisplay); + /// Processes the mouse move in the point + /// \param thePoint a 3D point clicked in the viewer + virtual void mouseMoved(const gp_Pnt& thePoint) {}; + /// temporary code to provide edition mode + void setEditMode(const bool isEditMode) { myIsEditMode = isEditMode; }; protected: - virtual void startOperation(); - virtual void stopOperation(); + bool isEditMode() const { return myIsEditMode; } +private: + bool myIsEditMode; }; #endif