Salome HOME
Fix for the issue #593: do not remove naming attribute, but use TNaming_Builder for...
[modules/shaper.git] / src / ModuleBase / ModuleBase_Operation.h
index 77c8d3fe34e2b622d36476da8ff7b9b51660c06e..c20391185f3ca203baf9b33025696a415dcabcef 100644 (file)
@@ -29,7 +29,8 @@ class ModuleBase_IViewer;
 class QKeyEvent;
 
 /*!
- \class ModuleBase_Operation
+ * \class ModuleBase_Operation
+ * \ingroup GUI
  * \brief Base class for all operations
  *
  *  Base class for all operations. If you perform an action it is reasonable to create
@@ -49,6 +50,9 @@ class MODULEBASE_EXPORT ModuleBase_Operation : public QObject
 Q_OBJECT
 
  public:
+
+  /// Appends to operation's history id, if it is an "edit" operation (myIsEditing == true)
+  static QString EditSuffix() { return "_E"; }
   /// Constructor
   /// \param theId the operation identifier
   /// \param theParent the QObject parent
@@ -144,6 +148,10 @@ signals:
   /// The operation is postponed
   void postponed();  
 
+  /// The operation is triggered
+  /// \param theState a new triggered state
+  void triggered(bool theState);
+
   /// The operation is filled with existing preselection
   void activatedByPreselection(); 
 
@@ -198,7 +206,7 @@ signals:
   virtual void abortOperation() {}
 
   /// Virtual method called when operation committed (see commit() method for more description)
-  virtual void commitOperation() {}
+  virtual void commitOperation();
 
   /// Virtual method called after operation committed (see commit() method for more description)
   virtual void afterCommitOperation() {}
@@ -206,12 +214,6 @@ signals:
   /// Virtual method called after operation resume (see resume() method for more description)
   virtual void resumeOperation() {}
 
-  /// Send update message by loop
-  void flushUpdated();
-
-  /// Send created message by loop
-  void flushCreated();
-
   /// Creates an operation new feature
   /// \param theFlushMessage the flag whether the create message should be flushed
   /// \returns the created feature
@@ -221,9 +223,6 @@ signals:
   /// \return Returns TRUE if current operation can be committed, e.g. all parameters are filled
   virtual bool canBeCommitted() const;
 
-  /// Returns pointer to the root document.
-  std::shared_ptr<ModelAPI_Document> document() const;
-
   /// Return a widget value point by the selection and the viewer position
   /// The default realization returns false
   /// \param thePrs the presentation
@@ -265,6 +264,8 @@ signals:
   /// before operation feature creating
   CompositeFeaturePtr myParentFeature;  
 
+  /// Last current feature before editing operation
+  FeaturePtr myCurrentFeature;
 };
 
 #endif