X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_OperationFeatureCreate.h;h=45e29505ef74d6b4a3d41867f2811d189e76a218;hb=d29ed3f3f7c0e119d2917b2d4120aa7b473220f4;hp=730ab7aa69e43c584506f3d06c1f51bee0a8c44e;hpb=489132d99e1d417d5c7ce93fed8fb8ee138befbc;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_OperationFeatureCreate.h b/src/PartSet/PartSet_OperationFeatureCreate.h index 730ab7aa6..45e29505e 100644 --- a/src/PartSet/PartSet_OperationFeatureCreate.h +++ b/src/PartSet/PartSet_OperationFeatureCreate.h @@ -7,7 +7,7 @@ #include "PartSet.h" -#include +#include #include #include @@ -20,7 +20,7 @@ class QKeyEvent; \class PartSet_OperationFeatureCreate * \brief The operation for the sketch feature creation */ -class PARTSET_EXPORT PartSet_OperationFeatureCreate : public PartSet_OperationSketchBase +class PARTSET_EXPORT PartSet_OperationFeatureCreate : public PartSet_OperationFeatureBase { Q_OBJECT @@ -30,49 +30,34 @@ Q_OBJECT /// \return the boolean result static bool canProcessKind(const std::string& theId); - public: /// Constructor /// \param theId the feature identifier /// \param theParent the operation parent /// \param theSketch the parent feature - PartSet_OperationFeatureCreate(const QString& theId, QObject* theParent, FeaturePtr theSketch); + PartSet_OperationFeatureCreate( + const QString& theId, QObject* theParent, CompositeFeaturePtr theSketch); /// Destructor virtual ~PartSet_OperationFeatureCreate(); - /// Returns the operation local selection mode - /// \param theFeature the feature object to get the selection mode - /// \return the selection mode - virtual std::list getSelectionModes(ObjectPtr theFeature) const; - - /// Initializes the operation with previously created feature. It is used in sequental operations - virtual void initFeature(FeaturePtr theFeature); - - /// Initialisation of operation with preliminary selection - /// \param theSelected the list of selected presentations - /// \param theHighlighted the list of highlighted presentations - virtual void initSelection(const std::list& theSelected, - const std::list& theHighlighted); - - /// Returns the operation sketch feature - /// \returns the sketch instance - virtual FeaturePtr sketch() const; + /// Gives the current mouse point in the viewer + /// \param thePoint a point clicked in the viewer + /// \param theEvent the mouse event + virtual void mouseMoved(QMouseEvent* theEvent, ModuleBase_IViewer* theViewer); /// Gives the current selected objects to be processed by the operation /// \param theEvent the mouse event /// \param theView a viewer to have the viewer the eye position /// \param theSelected the list of selected presentations /// \param theHighlighted the list of highlighted presentations - virtual void mouseReleased(QMouseEvent* theEvent, Handle_V3d_View theView, - const std::list& theSelected, - const std::list& theHighlighted); - /// Gives the current mouse point in the viewer - /// \param thePoint a point clicked in the viewer - /// \param theEvent the mouse event - virtual void mouseMoved(QMouseEvent* theEvent, Handle_V3d_View theView); + virtual void mouseReleased(QMouseEvent* theEvent, ModuleBase_IViewer* theViewer, + ModuleBase_ISelection* theSelection); /// Processes the key pressed in the view /// \param theKey a key value virtual void keyReleased(const int theKey); + /// Initializes the operation with previously created feature. It is used in sequental operations + void initFeature(FeaturePtr theFeature) { myInitFeature = theFeature; } + public slots: /// Slots which listen the mode widget activation /// \param theWidget the model widget @@ -100,27 +85,12 @@ Q_OBJECT /// the sketch feature /// \param theFlushMessage the flag whether the create message should be flushed /// \returns the created feature - virtual FeaturePtr createFeature(const bool theFlushMessage = true); - - /// Verifies whether this operator can be commited. - /// \return Returns TRUE if current operation can be committed, e.g. all parameters are filled - virtual bool canBeCommitted() const; - - protected: - /// Set value to the active widget - /// \param theFeature the feature - /// \param theX the horizontal coordinate - /// \param theY the vertical coordinate - /// \return true if the point is set - bool setWidgetValue(ObjectPtr theFeature, double theX, double theY); - - private: - FeaturePtr myInitFeature; ///< the initial feature - FeaturePtr mySketch; ///< the sketch of the feature - - ModuleBase_ModelWidget* myActiveWidget; ///< the active widget + virtual FeaturePtr createFeature(const bool theFlushMessage = true, + CompositeFeaturePtr theCompositeFeature = CompositeFeaturePtr()); - std::list myPreSelection; +protected: + /// Feature of previous operation (for sequintal operations) + FeaturePtr myInitFeature; }; #endif