Salome HOME
refs #30 - Sketch base GUI: create, draw lines
[modules/shaper.git] / src / PartSet / PartSet_OperationSketchBase.h
1 // File:        PartSet_OperationSketchBase.h
2 // Created:     20 Apr 2014
3 // Author:      Natalia ERMOLAEVA
4
5 #ifndef PartSet_OperationSketchBase_H
6 #define PartSet_OperationSketchBase_H
7
8 #include "PartSet.h"
9
10 #include <TopoDS_Shape.hxx>
11 #include <NCollection_List.hxx>
12
13 #include <ModuleBase_PropPanelOperation.h>
14 #include <QObject>
15
16 class GeomAPI_Shape;
17
18 /*!
19   \class PartSet_OperationSketchBase
20   * \brief The base operation for the sketch features.
21   *  Base class for all sketch operations. It provides an access to the feature preview
22 */
23 class PARTSET_EXPORT PartSet_OperationSketchBase : public ModuleBase_PropPanelOperation
24 {
25   Q_OBJECT
26 public:
27   /// Constructor
28   /// \param theId an feature index
29   /// \param theParent the object parent
30   PartSet_OperationSketchBase(const QString& theId, QObject* theParent);
31   /// Destructor
32   virtual ~PartSet_OperationSketchBase();
33
34   /// Returns the feature preview shape
35   boost::shared_ptr<GeomAPI_Shape> preview() const;
36
37   /// Returns the operation local selection mode
38   /// \return the selection mode
39   virtual int getSelectionMode() const = 0;
40
41   /// Gives the current selected objects to be processed by the operation
42   /// \param a list of interactive selected objects
43   virtual void setSelectedShapes(const NCollection_List<TopoDS_Shape>& theList) = 0;
44
45 signals:
46   void viewerProjectionChange(double theX, double theY, double theZ);
47 };
48
49 #endif