]> SALOME platform Git repositories - modules/shaper.git/blob - src/PartSet/PartSet_OperationSketchLine.h
Salome HOME
refs #30 - Sketch base GUI: create, draw lines
[modules/shaper.git] / src / PartSet / PartSet_OperationSketchLine.h
1 // File:        PartSet_OperationSketchLine.h
2 // Created:     20 Apr 2014
3 // Author:      Natalia ERMOLAEVA
4
5 #ifndef PartSet_OperationSketchLine_H
6 #define PartSet_OperationSketchLine_H
7
8 #include "PartSet.h"
9
10 #include <PartSet_OperationSketchBase.h>
11 #include <QObject>
12
13 /*!
14  \class PartSet_OperationSketchLine
15  * \brief The operation for the sketch feature creation
16 */
17 class PARTSET_EXPORT PartSet_OperationSketchLine : public PartSet_OperationSketchBase
18 {
19   Q_OBJECT
20 public:
21   /// Constructor
22   /// \param theId the feature identifier
23   /// \param theParent the operation parent
24   /// \param theFeature the parent feature
25   PartSet_OperationSketchLine(const QString& theId, QObject* theParent,
26                               boost::shared_ptr<ModelAPI_Feature> theSketchFeature);
27   /// Destructor
28   virtual ~PartSet_OperationSketchLine();
29
30   /// The sketch can not be created immediately, firstly a plane should be set
31   virtual bool isPerformedImmediately() const;
32
33   /// Returns the operation local selection mode
34   /// \return the selection mode
35   virtual int getSelectionMode() const;
36
37   /// Gives the current selected objects to be processed by the operation
38   /// \param theList a list of interactive selected shapes
39   virtual void setSelectedShapes(const NCollection_List<TopoDS_Shape>& theList);
40
41 protected:
42   /// \brief Virtual method called when operation is started
43   /// Virtual method called when operation started (see start() method for more description)
44   /// After the parent operation body perform, set sketch feature to the created line feature
45   virtual void startOperation();
46
47 private:
48   boost::shared_ptr<ModelAPI_Feature> mySketch; ///< the sketch feature
49 };
50
51 #endif