]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
refs #30 - Sketch base GUI: create, draw lines
authornds <natalia.donis@opencascade.com>
Thu, 24 Apr 2014 07:26:45 +0000 (11:26 +0400)
committernds <natalia.donis@opencascade.com>
Thu, 24 Apr 2014 07:26:45 +0000 (11:26 +0400)
Add comments for some code

src/PartSet/PartSet_OperationSketch.cpp
src/PartSet/PartSet_OperationSketch.h
src/PartSet/PartSet_OperationSketchBase.cpp
src/PartSet/PartSet_OperationSketchBase.h
src/XGUI/XGUI_Displayer.cpp

index 3b4e5bd8d89b49ab98a2a5e8c4f1175ce350a656..a12c38b0a4cdc8e7264b20a06e4ee9a1259dc038 100644 (file)
@@ -1,3 +1,7 @@
+// File:        PartSet_OperationSketch.h
+// Created:     20 Apr 2014
+// Author:      Natalia ERMOLAEVA
+
 #include <PartSet_OperationSketch.h>
 
 #include <SketchPlugin_Feature.h>
@@ -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;
index 679f74afa739013a653404c2612d27f99c48732c..63375e5e60bae4cbe03c5c384b82e99fca12a185 100644 (file)
@@ -1,3 +1,7 @@
+// File:        PartSet_OperationSketch.h
+// Created:     20 Apr 2014
+// Author:      Natalia ERMOLAEVA
+
 #ifndef PartSet_OperationSketch_H
 #define PartSet_OperationSketch_H
 
 
 /*!
  \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;
 };
 
index 04d5be75679729c374a514f9a97eb67dff3aeaf6..519c97f76d5335d3def922e4158b77de59982c2f 100644 (file)
@@ -1,3 +1,7 @@
+// File:        PartSet_OperationSketchBase.cpp
+// Created:     20 Apr 2014
+// Author:      Natalia ERMOLAEVA
+
 #include <PartSet_OperationSketchBase.h>
 
 #include <SketchPlugin_Feature.h>
 
 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<SketchPlugin_Feature> aFeature = 
     boost::dynamic_pointer_cast<SketchPlugin_Feature>(feature());
   return aFeature->preview()->impl<TopoDS_Shape>();
 }
-
-/*!
- * 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);
-}
index de7c1ce03e4f647b1a7163f30bc55351c14718e9..1a99babc94de8702687a8af90ff1981150952988 100644 (file)
@@ -1,3 +1,7 @@
+// File:        PartSet_OperationSketchBase.h
+// Created:     20 Apr 2014
+// Author:      Natalia ERMOLAEVA
+
 #ifndef PartSet_OperationSketchBase_H
 #define PartSet_OperationSketchBase_H
 
 #include <QObject>
 
 /*!
- \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
index d4ae6d5027f297a4579b557e6a812596d3a96cb0..489d0248e0bdc4222c8939251a35ab8f38ffc8d0 100644 (file)
@@ -1,4 +1,4 @@
-// File:        XGUI_Displayer.cxx
+// File:        XGUI_Displayer.cpp
 // Created:     20 Apr 2014
 // Author:      Natalia ERMOLAEVA