Salome HOME
Revert "Merge branch 'Pre_2.8.0_development'"
[modules/shaper.git] / src / XGUI / XGUI_OperationMgr.h
index 00d941981479e68337b4ac30d16b61a8d254c81e..56286cc1fece6026f805b72ea65f5eca9925decf 100755 (executable)
@@ -48,15 +48,7 @@ class XGUI_ShortCutListener;
 class XGUI_EXPORT XGUI_OperationMgr : public QObject
 {
 Q_OBJECT
-public:
-  /// Enumeration of kind of message that is used when trying to stop the active operation
-  enum XGUI_MessageKind
-  {
-    XGUI_AbortOperationMessage, //< warns and give possibility to abort current operation
-    XGUI_InformationMessage //< ask to apply the current operation before performing something
-  };
-
-public:
+ public:
   /// Constructor
   /// \param theParent the parent
   /// \param theWorkshop a reference to workshop
@@ -95,9 +87,7 @@ public:
   /// Returns true if the operation can be aborted. If the operation is modified,
   /// the warning message box is shown.
   /// \param theOperation an operation which is checked on stop
-  /// \param theMessageKind a kind of message in warning message box
-  bool canStopOperation(ModuleBase_Operation* theOperation,
-                        const XGUI_MessageKind& theMessageKind = XGUI_AbortOperationMessage);
+  bool canStopOperation(ModuleBase_Operation* theOperation);
 
   /// Find and return operation by its Id.
   ModuleBase_Operation* findOperation(const QString& theId) const;
@@ -134,7 +124,8 @@ public:
   /// \param theOperation an aborted operation
   void abortOperation(ModuleBase_Operation* theOperation);
 
-  bool abortAllOperations(const XGUI_MessageKind& theMessageKind = XGUI_AbortOperationMessage);
+  /// Slot that commits the current operation.
+  bool onCommitOperation();
 
 public slots:
   /// Slot that aborts the current operation.
@@ -144,10 +135,7 @@ public slots:
   /// Commit all operations
   bool commitAllOperations();
   /// Abort all operations
-  void onAbortAllOperations();
-
-protected slots:
-
+  bool abortAllOperations();
 
 signals:
   /// Signal about an operation is stopped. It is emitted after the stop() of operation is done.