1 // Copyright (C) 2007-2023 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #include "ATOMICGUI_Operation.h"
21 #include "ATOMICGUI_DataModel.h"
22 #include "ATOMICGUI.h"
24 #include <LightApp_Application.h>
25 #include <LightApp_Dialog.h>
28 ATOMICGUI_Operation::ATOMICGUI_Operation()
29 : LightApp_Operation()
34 ATOMICGUI_Operation::~ATOMICGUI_Operation()
38 /*! Called when Operation is started. */
39 void ATOMICGUI_Operation::startOperation()
43 disconnect( dlg(), SIGNAL( dlgOk() ), this, SLOT( onOk() ) );
44 disconnect( dlg(), SIGNAL( dlgApply() ), this, SLOT( onApply() ) );
45 disconnect( dlg(), SIGNAL( dlgClose() ), this, SLOT( onClose() ) );
47 connect( dlg(), SIGNAL( dlgOk() ), this, SLOT( onOk() ) );
48 connect( dlg(), SIGNAL( dlgApply() ), this, SLOT( onApply() ) );
49 connect( dlg(), SIGNAL( dlgClose() ), this, SLOT( onClose() ) );
55 /*! Called when Operation is aborted. */
56 void ATOMICGUI_Operation::abortOperation()
61 /*! Called when Operation is committed (normally ended). */
62 void ATOMICGUI_Operation::commitOperation()
67 /*! Called when Operation is done. Finalization steps. */
68 void ATOMICGUI_Operation::finish()
73 module()->getApp()->updateObjectBrowser();
76 /*! Returns a Data Model. */
77 ATOMICGUI_DataModel* ATOMICGUI_Operation::dataModel() const
79 return dynamic_cast<ATOMICGUI_DataModel*>( module()->dataModel() );
82 /*! Returns ATOMICGUI class instance. */
83 ATOMICGUI* ATOMICGUI_Operation::atomModule() const
85 return dynamic_cast<ATOMICGUI*>( module() );
88 /*! slot. Called when user presses OK button of the dialog (if it was set). */
89 void ATOMICGUI_Operation::onOk()
95 /*! slot. Called when user presses Apply button of the dialog (if it was set). */
96 void ATOMICGUI_Operation::onApply()
100 /*! slot. Called when user presses Close button of the dialog (if it was set). */
101 void ATOMICGUI_Operation::onClose()