X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_OperationFeatureEdit.h;h=67223fce62fa0b756da56fae9c00c33cda84ca0c;hb=e30796dab1aa68c01201b2b89d4292d3fcbbc4d4;hp=f893a964e7b99d917ab11087f3dd8f8d73276ae9;hpb=0c3a8a03ec5405d00c23a1cf9f20185d979ece1d;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_OperationFeatureEdit.h b/src/PartSet/PartSet_OperationFeatureEdit.h index f893a964e..67223fce6 100644 --- a/src/PartSet/PartSet_OperationFeatureEdit.h +++ b/src/PartSet/PartSet_OperationFeatureEdit.h @@ -7,7 +7,7 @@ #include "PartSet.h" -#include +#include #include class QMouseEvent; @@ -15,25 +15,33 @@ class QMouseEvent; /*! \class PartSet_OperationFeatureEdit * \brief The operation for the sketch feature creation -*/ -class PARTSET_EXPORT PartSet_OperationFeatureEdit : public PartSet_OperationSketchBase + */ +class PARTSET_EXPORT PartSet_OperationFeatureEdit : public PartSet_OperationFeatureBase { - Q_OBJECT +Q_OBJECT /// Struct to define gp point, with the state is the point is initialized struct Point { /// Constructor - Point() {} + Point() + { + myIsInitialized = false; + } /// Constructor /// \param thePoint the point Point(gp_Pnt thePoint) { setPoint(thePoint); } - ~Point() {} + ~Point() + { + } /// clear the initialized flag. - void clear() { myIsInitialized = false; } + void clear() + { + myIsInitialized = false; + } /// set the point and switch on the initialized flag /// \param thePoint the point void setPoint(const gp_Pnt& thePoint) @@ -42,41 +50,26 @@ class PARTSET_EXPORT PartSet_OperationFeatureEdit : public PartSet_OperationSket myPoint = thePoint; } - bool myIsInitialized; /// the state whether the point is set - gp_Pnt myPoint; /// the point + bool myIsInitialized; /// the state whether the point is set + gp_Pnt myPoint; /// the point }; -public: + public: /// Returns the operation type key - static std::string Type() { return "EditLine"; } + static std::string Type() + { + return "EditLine"; + } -public: + public: /// Constructor /// \param theId the feature identifier /// \param theParent the operation parent /// \param theFeature the parent feature - PartSet_OperationFeatureEdit(const QString& theId, QObject* theParent, - FeaturePtr theFeature); + PartSet_OperationFeatureEdit(const QString& theId, QObject* theParent, FeaturePtr theFeature); /// Destructor virtual ~PartSet_OperationFeatureEdit(); - /// Returns that this operator can be started above already running one. - /// The runned operation should be the sketch feature modified operation - /// \param theOperation the previous running operation - virtual bool isGranted(ModuleBase_IOperation* theOperation) 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(ObjectPtr theFeature) const; - - /// Initializes the operation with previously created feature. It is used in sequental operations - virtual void initFeature(FeaturePtr theFeature); - - /// Returns the operation sketch feature - /// \returns the sketch instance - virtual FeaturePtr sketch() const; - /// Processes the mouse pressed in the point /// \param theEvent the mouse event /// \param theView a viewer to have the viewer the eye position @@ -94,9 +87,9 @@ public: /// \param theEvent the mouse event /// \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); + virtual void mouseReleased(QMouseEvent* theEvent, Handle_V3d_View theView, + const std::list& theSelected, + const std::list& theHighlighted); /// Processes the mouse double click in the point /// \param theEvent the mouse event @@ -106,7 +99,8 @@ public: virtual void mouseDoubleClick(QMouseEvent* theEvent, Handle_V3d_View theView, const std::list& theSelected, const std::list& theHighlighted); -protected: + + protected: /// \brief Virtual method called when operation is started /// Virtual method called when operation started (see start() method for more description) /// Switch off the multi selection state @@ -122,7 +116,7 @@ protected: /// \returns the created feature virtual FeaturePtr createFeature(const bool theFlushMessage = true); -protected: + protected: /// Emits a signal about the selection blocking. Emits a signal to change the selection. /// If the block is true, the signal clear selection, otherwise if restore selection flag allows, /// the internal operation features are to be selected @@ -133,10 +127,9 @@ protected: /// Sends the features void sendFeatures(); -private: - FeaturePtr mySketch; ///< the sketch feature - Point myCurPoint; ///< the current 3D point clicked or moved - bool myIsBlockedSelection; ///< the state of the last state of selection blocked signal + private: + Point myCurPoint; ///< the current 3D point clicked or moved + bool myIsBlockedSelection; ///< the state of the last state of selection blocked signal }; #endif