1 // Copyright (C) 2009 CEA/DEN, EDF R&D
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.
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
19 #include "BL_SalomeGui.hxx"
21 BL::SalomeGui::SalomeGui() : MainWindows_SALOME("JobManager"),
22 SalomeApp_Module("JobManager"),
23 LightApp_Module("JobManager")
25 DEBTRACE("Creating BL::SalomeGui");
29 BL::SalomeGui::~SalomeGui()
31 DEBTRACE("Destroying BL::SalomeGui");
35 BL::SalomeGui::initialize(CAM_Application* app)
37 DEBTRACE("Entering in initialize");
38 SalomeApp_Module::initialize(app); // MANDATORY -> Otherwise SISEGV...
39 BL::MainWindows_SALOME::initialize(getApp());
41 _gengui = new BL::GenericGui(this);
42 _gengui->createActions();
43 _gengui->createMenus();
44 _gengui->updateButtonsStates();
48 BL::SalomeGui::activateModule(SUIT_Study* theStudy)
50 DEBTRACE("Entering in BL::SalomeGui::activateModule");
52 bool bOk = SalomeApp_Module::activateModule(theStudy);
55 _gengui->showDockWidgets(true);
60 BL::SalomeGui::windows(QMap<int, int>& theMap) const
62 DEBTRACE("Entering in BL::SalomeGui::windows");
64 theMap.insert(SalomeApp_Application::WT_ObjectBrowser, Qt::LeftDockWidgetArea);
68 BL::SalomeGui::deactivateModule(SUIT_Study* theStudy)
70 DEBTRACE("Entering in BL::SalomeGui::deactivateModule");
73 _gengui->showDockWidgets(false);
74 bool bOk = SalomeApp_Module::deactivateModule(theStudy);
78 // --- Export the module
81 CAM_Module* createModule()
83 return new BL::SalomeGui();