Salome HOME
Merge branch 'master' of newgeom:newgeom.git
[modules/shaper.git] / src / XGUI / XGUI_OperationMgr.h
index 954f61e88327c1a95b17b8bbbffe3ff67a8b5fde..e43485b5c392a0a850267cea3a1107a6b26ea2d5 100644 (file)
@@ -42,7 +42,11 @@ Q_OBJECT
   /// Returns number of operations in the stack
   int operationsCount() const;
   /// Returns list of all operations IDs
-  QStringList operationList();
+  QStringList operationList() const;
+
+  /// Returns previous (parent) operation if given operation started.
+  /// else, or if there is no parent - returns NULL
+  ModuleBase_Operation* previousOperation(ModuleBase_Operation* theOperation) const;
 
   virtual bool eventFilter(QObject *theObject, QEvent *theEvent);
 
@@ -78,7 +82,7 @@ signals:
  protected:
 
   /// Commits the current operatin if it is valid
-  void commitOperation();
+  bool commitOperation();
   /// Sets the current operation or NULL
   /// \param theOperation the started operation
   /// \param isCheckBeforeStart the flag whether to check whether the operation can be started
@@ -99,11 +103,7 @@ signals:
   /// Returns true if the operation can be aborted
   bool canAbortOperation();
 
- protected slots:
-  /// Slot that is called by an operation stop. Removes the stopped operation form the stack.
-  /// If there is a suspended operation, restart it.
-  void onOperationStopped();
-
+ public slots:
   /// SLOT, that is called by the key in the property panel is clicked.
   /// \param theName the attribute name
   /// \param theEvent the mouse event
@@ -113,6 +113,11 @@ signals:
   /// \param theWidget an activated widget
   void onWidgetActivated(ModuleBase_ModelWidget* theWidget);
 
+  protected slots:
+  /// Slot that is called by an operation stop. Removes the stopped operation form the stack.
+  /// If there is a suspended operation, restart it.
+  void onOperationStopped();
+
  private:
   typedef QList<ModuleBase_Operation*> Operations;  ///< definition for a list of operations
   Operations myOperations;  ///< a stack of started operations. The active operation is on top,