From: nds Date: Thu, 24 Apr 2014 07:26:45 +0000 (+0400) Subject: refs #30 - Sketch base GUI: create, draw lines X-Git-Tag: V_0.2~125 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c1cd1312274dc2b10dcb609260985980eb07bfbf;p=modules%2Fshaper.git refs #30 - Sketch base GUI: create, draw lines Add comments for some code --- diff --git a/src/PartSet/PartSet_OperationSketch.cpp b/src/PartSet/PartSet_OperationSketch.cpp index 3b4e5bd8d..a12c38b0a 100644 --- a/src/PartSet/PartSet_OperationSketch.cpp +++ b/src/PartSet/PartSet_OperationSketch.cpp @@ -1,3 +1,7 @@ +// File: PartSet_OperationSketch.h +// Created: 20 Apr 2014 +// Author: Natalia ERMOLAEVA + #include #include @@ -14,17 +18,10 @@ PartSet_OperationSketch::PartSet_OperationSketch(const QString& theId, { } -/*! - * \brief Destructor - */ PartSet_OperationSketch::~PartSet_OperationSketch() { } -/** - * The sketch can not be created immediately, firstly a plane should be set - * \return false value - */ bool PartSet_OperationSketch::isPerformedImmediately() const { return false; diff --git a/src/PartSet/PartSet_OperationSketch.h b/src/PartSet/PartSet_OperationSketch.h index 679f74afa..63375e5e6 100644 --- a/src/PartSet/PartSet_OperationSketch.h +++ b/src/PartSet/PartSet_OperationSketch.h @@ -1,3 +1,7 @@ +// File: PartSet_OperationSketch.h +// Created: 20 Apr 2014 +// Author: Natalia ERMOLAEVA + #ifndef PartSet_OperationSketch_H #define PartSet_OperationSketch_H @@ -8,17 +12,20 @@ /*! \class PartSet_OperationSketch - * \brief The operation for the sketch creation - * - * Base class for all operations. If you perform an action it is reasonable to create + * \brief The operation for the sketch feature creation */ class PARTSET_EXPORT PartSet_OperationSketch : public PartSet_OperationSketchBase { -Q_OBJECT + Q_OBJECT public: + /// Constructor + /// \param theId the feature identifier + /// \param theParent the operation parent PartSet_OperationSketch(const QString& theId, QObject* theParent); + /// Destructor virtual ~PartSet_OperationSketch(); + /// The sketch can not be created immediately, firstly a plane should be set virtual bool isPerformedImmediately() const; }; diff --git a/src/PartSet/PartSet_OperationSketchBase.cpp b/src/PartSet/PartSet_OperationSketchBase.cpp index 04d5be756..519c97f76 100644 --- a/src/PartSet/PartSet_OperationSketchBase.cpp +++ b/src/PartSet/PartSet_OperationSketchBase.cpp @@ -1,3 +1,7 @@ +// File: PartSet_OperationSketchBase.cpp +// Created: 20 Apr 2014 +// Author: Natalia ERMOLAEVA + #include #include @@ -8,50 +12,19 @@ using namespace std; -/*! - \brief Constructor - \param theId an feature index - \param theParent the object parent - */ PartSet_OperationSketchBase::PartSet_OperationSketchBase(const QString& theId, QObject* theParent) : ModuleBase_PropPanelOperation(theId, theParent) { } -/*! - * \brief Destructor - */ PartSet_OperationSketchBase::~PartSet_OperationSketchBase() { } -/** - * Returns the feature preview shape - */ const TopoDS_Shape& PartSet_OperationSketchBase::preview() const { boost::shared_ptr aFeature = boost::dynamic_pointer_cast(feature()); return aFeature->preview()->impl(); } - -/*! - * Perform the operation start and emit signal about visualization of the operation preview - */ -void PartSet_OperationSketchBase::startOperation() -{ - ModuleBase_PropPanelOperation::startOperation(); - - emit visualizePreview(true); -} - -/*! - * Perform the operation stop and emit signal about visualization stop of the operation preview - */ -void PartSet_OperationSketchBase::stopOperation() -{ - ModuleBase_PropPanelOperation::stopOperation(); - - emit visualizePreview(false); -} diff --git a/src/PartSet/PartSet_OperationSketchBase.h b/src/PartSet/PartSet_OperationSketchBase.h index de7c1ce03..1a99babc9 100644 --- a/src/PartSet/PartSet_OperationSketchBase.h +++ b/src/PartSet/PartSet_OperationSketchBase.h @@ -1,3 +1,7 @@ +// File: PartSet_OperationSketchBase.h +// Created: 20 Apr 2014 +// Author: Natalia ERMOLAEVA + #ifndef PartSet_OperationSketchBase_H #define PartSet_OperationSketchBase_H @@ -9,30 +13,23 @@ #include /*! - \class PartSet_OperationSketchBase - * \brief The base operation for the sketch features. - * - * Base class for all sketch operations. It provides an access to the feature preview + \class PartSet_OperationSketchBase + * \brief The base operation for the sketch features. + * Base class for all sketch operations. It provides an access to the feature preview */ class PARTSET_EXPORT PartSet_OperationSketchBase : public ModuleBase_PropPanelOperation { -Q_OBJECT + Q_OBJECT public: + /// Constructor + /// \param theId an feature index + /// \param theParent the object parent PartSet_OperationSketchBase(const QString& theId, QObject* theParent); + /// Destructor virtual ~PartSet_OperationSketchBase(); + /// Returns the feature preview shape const TopoDS_Shape& preview() const; - -signals: - /** - * The signal about preview visualization. - * \param isDisplay a state whether the preview should be displayed or erased - */ - void visualizePreview(bool isDisplay); - -protected: - virtual void startOperation(); - virtual void stopOperation(); }; #endif diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index d4ae6d502..489d0248e 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -1,4 +1,4 @@ -// File: XGUI_Displayer.cxx +// File: XGUI_Displayer.cpp // Created: 20 Apr 2014 // Author: Natalia ERMOLAEVA