]> SALOME platform Git repositories - modules/shaper.git/blob - src/PartSet/PartSet_OperationSketch.h
Salome HOME
Added history branch into data tree (issue #22)
[modules/shaper.git] / src / PartSet / PartSet_OperationSketch.h
1 // File:        PartSet_OperationSketch.h
2 // Created:     20 Apr 2014
3 // Author:      Natalia ERMOLAEVA
4
5 #ifndef PartSet_OperationSketch_H
6 #define PartSet_OperationSketch_H
7
8 #include "PartSet.h"
9
10 #include <PartSet_OperationSketchBase.h>
11 #include <QObject>
12
13 /*!
14  \class PartSet_OperationSketch
15  * \brief The operation for the sketch feature creation
16 */
17 class PARTSET_EXPORT PartSet_OperationSketch : public PartSet_OperationSketchBase
18 {
19   Q_OBJECT
20 public:
21   /// Returns the operation type key
22   static std::string Type() { return "Sketch"; }
23
24 public:
25   /// Constructor
26   /// \param theId the feature identifier
27   /// \param theParent the operation parent
28   PartSet_OperationSketch(const QString& theId, QObject* theParent);
29   /// Destructor
30   virtual ~PartSet_OperationSketch();
31
32   /// Returns the operation local selection mode
33   /// \param theFeature the feature object to get the selection mode
34   /// \return the selection mode
35   virtual std::list<int> getSelectionModes(boost::shared_ptr<ModelAPI_Feature> theFeature) const;
36
37   /// Gives the current selected objects to be processed by the operation
38   /// \param theFeature the selected feature
39   /// \param theShape the selected shape
40   virtual void setSelected(boost::shared_ptr<ModelAPI_Feature> theFeature,
41                            const TopoDS_Shape& theShape);
42
43 signals:
44   /// signal about the sketch plane is selected
45   /// \param theX the value in the X direction of the plane
46   /// \param theX the value in the Y direction value of the plane
47   /// \param theX the value in the Z direction of the plane
48   void planeSelected(double theX, double theY, double theZ);
49
50 protected:
51   /// Set the plane to the current sketch
52   /// \param theShape the shape
53   void setSketchPlane(const TopoDS_Shape& theShape);
54
55 private:
56   bool myIsEditMode; /// the edit mode of this operation
57 };
58
59 #endif