X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_OperationSketchBase.h;h=ff6f06847b568dbada696596b3a86a656b94d2da;hb=f8d51abf2ab6024a974d42c139f7650ccf0ef774;hp=6b4eb49f4c96a652d5c2a6eb2d0e5b549fee2944;hpb=d0350421b47740df5540b8165ac7643657cccf66;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_OperationSketchBase.h b/src/PartSet/PartSet_OperationSketchBase.h index 6b4eb49f4..ff6f06847 100644 --- a/src/PartSet/PartSet_OperationSketchBase.h +++ b/src/PartSet/PartSet_OperationSketchBase.h @@ -43,63 +43,81 @@ public: /// Returns the feature preview shape /// \param theFeature the feature object to obtain the preview - boost::shared_ptr preview(boost::shared_ptr theFeature) const; + static boost::shared_ptr preview(FeaturePtr theFeature); /// Returns the map of the operation previews including the nested feature previews /// \return the map of feature to the feature preview - virtual std::map, boost::shared_ptr > subPreview() const; + virtual std::map > subPreview() const; /// Returns the operation local selection mode /// \param theFeature the feature object to get the selection mode /// \return the selection mode - virtual std::list getSelectionModes(boost::shared_ptr theFeature) const = 0; + virtual std::list getSelectionModes(FeaturePtr theFeature) const; /// Initializes some fields accorging to the feature - /// \param theFeature the feature - /// \param thePresentations the list of additional presentations - virtual void init(boost::shared_ptr theFeature, - const std::list& thePresentations) {} + /// \param theSelected the list of selected presentations + /// \param theHighlighted the list of highlighted presentations + virtual void init(FeaturePtr theFeature, + const std::list& theSelected, + const std::list& theHighlighted) {} /// Returns the operation sketch feature /// \returns the sketch instance - virtual boost::shared_ptr sketch() const = 0; + virtual FeaturePtr sketch() const = 0; /// Processes the mouse pressed in the point - /// \param thePoint a point clicked in the viewer /// \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 mousePressed(QMouseEvent* theEvent, Handle_V3d_View theView, - const std::list& theSelected); + const std::list& theSelected, + const std::list& theHighlighted); /// Processes the mouse release in the point - /// \param thePoint a point clicked in the viewer /// \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& theSelected, + const std::list& theHighlighted); /// Processes the mouse move in the point - /// \param thePoint a 3D point clicked in the viewer /// \param theEvent the mouse event + /// \param theView a viewer to have the viewer the eye position virtual void mouseMoved(QMouseEvent* theEvent, Handle_V3d_View theView); /// Processes the key pressed in the view /// \param theKey a key value virtual void keyReleased(const int theKey); + virtual void keyReleased(std::string theName, QKeyEvent* theEvent); + + /// Emits a signal about the operation start. This signal has an information about the feature. + /// If the provided feature is empty, the current operation feature is used. + /// \param theType a type of an operation started + /// theFeature the operation argument + void restartOperation(const std::string& theType, + FeaturePtr theFeature = FeaturePtr()); + signals: + /// signal about the request to launch operation + /// theName the operation name + /// theFeature the operation argument + void launchOperation(std::string theName, FeaturePtr theFeature); + /// signal about the focus activated + /// theName the attribute name + void focusActivated(const std::string& theAttibuteName); + /// Signal about the feature construing is finished /// \param theFeature the result feature /// \param theMode the mode of the feature modification - void featureConstructed(boost::shared_ptr theFeature, + void featureConstructed(FeaturePtr theFeature, int theMode); /// Signal about the features should be selected /// \param theSelected the list of selected presentations void featureSelected(const std::list& theSelected); - /// signal about the request to launch operation - /// theName the operation name - /// theFeature the operation argument - void launchOperation(std::string theName, boost::shared_ptr theFeature); /// signal to enable/disable multi selection in the viewer /// \param theEnabled the boolean state void multiSelectionEnabled(bool theEnabled); @@ -121,7 +139,7 @@ protected: /// the sketch feature /// \param theFlushMessage the flag whether the create message should be flushed /// \returns the created feature - virtual boost::shared_ptr createFeature(const bool theFlushMessage = true); + virtual FeaturePtr createFeature(const bool theFlushMessage = true); }; #endif