1 // Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
22 #include <ATOMICGUI_Operation.h>
23 #include <ATOMICGUI_DataModel.h>
24 #include <ATOMICGUI.h>
26 #include <LightApp_Application.h>
27 #include <LightApp_Dialog.h>
30 ATOMICGUI_Operation::ATOMICGUI_Operation()
31 : LightApp_Operation()
36 ATOMICGUI_Operation::~ATOMICGUI_Operation()
40 /*! Called when Operation is started. */
41 void ATOMICGUI_Operation::startOperation()
45 disconnect( dlg(), SIGNAL( dlgOk() ), this, SLOT( onOk() ) );
46 disconnect( dlg(), SIGNAL( dlgApply() ), this, SLOT( onApply() ) );
47 disconnect( dlg(), SIGNAL( dlgClose() ), this, SLOT( onClose() ) );
49 connect( dlg(), SIGNAL( dlgOk() ), this, SLOT( onOk() ) );
50 connect( dlg(), SIGNAL( dlgApply() ), this, SLOT( onApply() ) );
51 connect( dlg(), SIGNAL( dlgClose() ), this, SLOT( onClose() ) );
57 /*! Called when Operation is aborted. */
58 void ATOMICGUI_Operation::abortOperation()
63 /*! Called when Operation is committed (normally ended). */
64 void ATOMICGUI_Operation::commitOperation()
69 /*! Called when Operation is done. Finalization steps. */
70 void ATOMICGUI_Operation::finish()
75 module()->getApp()->updateObjectBrowser();
78 /*! Returns a Data Model. */
79 ATOMICGUI_DataModel* ATOMICGUI_Operation::dataModel() const
81 return dynamic_cast<ATOMICGUI_DataModel*>( module()->dataModel() );
84 /*! Returns ATOMICGUI class instance. */
85 ATOMICGUI* ATOMICGUI_Operation::atomModule() const
87 return dynamic_cast<ATOMICGUI*>( module() );
90 /*! slot. Called when user presses OK button of the dialog (if it was set). */
91 void ATOMICGUI_Operation::onOk()
97 /*! slot. Called when user presses Apply button of the dialog (if it was set). */
98 void ATOMICGUI_Operation::onApply()
102 /*! slot. Called when user presses Close button of the dialog (if it was set). */
103 void ATOMICGUI_Operation::onClose()