Salome HOME
Merge from V6_3_BR 15/07/2011
[modules/geom.git] / src / GEOMBase / GEOM_Operation.cxx
index a1804d491891d17414d2bc6670fa504b1f01e4ab..a133e09aab99c60c244b64887d8443d2c1153c00 100644 (file)
@@ -1,41 +1,41 @@
-//  GEOM GEOMGUI : GUI for Geometry component
+// Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  Copyright (C) 2004  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-//  This library is free software; you can redistribute it and/or 
-//  modify it under the terms of the GNU Lesser General Public 
-//  License as published by the Free Software Foundation; either 
-//  version 2.1 of the License. 
-// 
-//  This library is distributed in the hope that it will be useful, 
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-//  Lesser General Public License for more details. 
-// 
-//  You should have received a copy of the GNU Lesser General Public 
-//  License along with this library; if not, write to the Free Software 
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-// 
-//  See http://www.salome-platform.org or email : webmaster.salome@opencascade.org 
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
 //
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//  File   : GEOM_Operation.cxx
-//  Author : Sergey ANIKIN
-//  Module : GEOM
-//  $Header$
 
+// GEOM GEOMGUI : GUI for Geometry component
+// File   : GEOM_Operation.cxx
+// Author : Sergey ANIKIN, Open CASCADE S.A.S. (sergey.anikin@opencascade.com)
+//
 #include "GEOM_Operation.h"
 
-#include "SALOMEGUI_QtCatchCorbaException.hxx"
+#include <SUIT_Application.h>
+#include <SalomeApp_Tools.h>
+
 
 //================================================================
 // Function : GEOM_Operation
 // Purpose  : 
 //================================================================
-GEOM_Operation::GEOM_Operation( QAD_Study* doc, GEOM::GEOM_IOperations_ptr oper )
-: QAD_Operation( doc )
+GEOM_Operation::GEOM_Operation( SUIT_Application* app, GEOM::GEOM_IOperations_ptr oper )
+: SUIT_Operation( app )
 {
   myIOperation = GEOM::GEOM_IOperations::_narrow( oper );
 }
@@ -52,16 +52,16 @@ GEOM_Operation::~GEOM_Operation()
 // Function : onStartOperation()
 // Purpose  : Opens an internal transaction in GEOM engine
 //================================================================
-void GEOM_Operation::onStartOperation()
+void GEOM_Operation::startOperation()
 {
-  QAD_Operation::onStartOperation();
+  SUIT_Operation::startOperation();
 
   if ( !myIOperation->_is_nil() ) {
     try {
       myIOperation->StartOperation();
     }
-    catch( const SALOME::SALOME_Exception& e ) {
-      QtCatchCorbaException( e );
+    catch ( const SALOME::SALOME_Exception& e ) {
+      SalomeApp_Tools:: QtCatchCorbaException( e );
     }
   }
 }
@@ -70,16 +70,16 @@ void GEOM_Operation::onStartOperation()
 // Function : onFinishOperation
 // Purpose  : Commits an internal transaction in GEOM engine
 //================================================================
-void GEOM_Operation::onFinishOperation()
+void GEOM_Operation::commitOperation()
 {
-  QAD_Operation::onFinishOperation();
+  SUIT_Operation::commitOperation();
 
   if ( !myIOperation->_is_nil() ) {
     try {
       myIOperation->FinishOperation();
     }
-    catch( const SALOME::SALOME_Exception& e ) {
-      QtCatchCorbaException( e );
+    catch ( const SALOME::SALOME_Exception& e ) {
+      SalomeApp_Tools:: QtCatchCorbaException( e );
     }
   }
 }
@@ -88,34 +88,34 @@ void GEOM_Operation::onFinishOperation()
 // Function : onSuspendOperation
 // Purpose  : 
 //================================================================
-void GEOM_Operation::onSuspendOperation()
+void GEOM_Operation::suspendOperation()
 {
-  QAD_Operation::onSuspendOperation();
+  SUIT_Operation::suspendOperation();
 }
 
 //================================================================
 // Function : onResumeOperation
 // Purpose  : 
 //================================================================
-void GEOM_Operation::onResumeOperation()
+void GEOM_Operation::resumeOperation()
 {
-  QAD_Operation::onResumeOperation();
+  SUIT_Operation::resumeOperation();
 }
 
 //================================================================
 // Function : onAbortOperation
 // Purpose  : Aborts an internal transaction in GEOM engine
 //================================================================
-void GEOM_Operation::onAbortOperation()
+void GEOM_Operation::abortOperation()
 {
-  QAD_Operation::onAbortOperation();
+  SUIT_Operation::abortOperation();
 
   if ( !myIOperation->_is_nil() ) {
     try {
       myIOperation->AbortOperation();
     }
-    catch( const SALOME::SALOME_Exception& e ) {
-      QtCatchCorbaException( e );
+    catch ( const SALOME::SALOME_Exception& e ) {
+      SalomeApp_Tools::QtCatchCorbaException( e );
     }
   }
 }