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_MainWindows_SALOME.hxx"
21 BL::MainWindows_SALOME::MainWindows_SALOME(const QString & module_name) :
22 SalomeApp_Module(module_name),
23 LightApp_Module(module_name)
25 DEBTRACE("Creating BL::MainWindows_SALOME");
30 BL::MainWindows_SALOME::initialize(SalomeApp_Application * appli)
32 DEBTRACE("Initialize BL::MainWindows_SALOME");
36 _svm = new SUIT_ViewManager(_appli->activeStudy(), _appli->desktop(), new SUIT_ViewModel());
37 _appli->addViewManager(_svm);
38 _viewWin = _svm->createViewWindow();
40 if (_viewWin && _appli->desktop())
41 _viewWin->resize((int)(_appli->desktop()->width() * 0.6), (int)(_appli->desktop()->height() * 0.6 ));
45 BL::MainWindows_SALOME::engineIOR() const
47 DEBTRACE("Entering in BL::SalomeGui::engineIOR");
48 return _appli->defaultEngineIOR();
52 BL::MainWindows_SALOME::viewManagers(QStringList& list) const
54 DEBTRACE("Entering in BL::SalomeGui::viewManagers");
55 list.append(_svm->getType());
59 BL::MainWindows_SALOME::~MainWindows_SALOME()
61 DEBTRACE("Destroying BL::MainWindows_SALOME");
65 BL::MainWindows_SALOME::getDockParent()
67 return _appli->desktop();
71 BL::MainWindows_SALOME::getTabParent()
77 BL::MainWindows_SALOME::createAction(const QString& toolTip,
80 const QString& status,
87 return SalomeApp_Module::createAction(getActionId(), toolTip, icon, menu, status, shortCut, parent, checkable, receiver, member);
91 BL::MainWindows_SALOME::createTopMenu(const QString & menu_name)
93 return createMenu(menu_name, -1);
97 BL::MainWindows_SALOME::addActionToMenu(QAction * action, int menu_id)
99 createMenu(action, menu_id);