1 // Copyright (C) 2009-2013 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
20 #include "BL_MainWindows_SALOME.hxx"
21 #include <SalomeApp_Engine_i.h>
23 BL::MainWindows_SALOME::MainWindows_SALOME(const QString & module_name) :
24 SalomeApp_Module(module_name)
26 DEBTRACE("Creating BL::MainWindows_SALOME");
33 BL::MainWindows_SALOME::initialize(SalomeApp_Application * appli)
35 DEBTRACE("Initialize BL::MainWindows_SALOME");
42 BL::MainWindows_SALOME::createView()
44 DEBTRACE("BL::MainWindows_SALOME CreateView");
45 QString vmType = "JobManager View";
47 // Get JobManager View Manager
48 _svm = _appli->getViewManager( vmType, true );
50 // view manager not found
51 QTextEdit* w = new QTextEdit;
52 _svm = _appli->createViewManager( vmType, w );
56 _viewWin = _svm->getActiveView();
57 _viewWin->setClosable( false );
58 _currentViewId = _viewWin->getId();
59 DEBTRACE("End of BL::MainWindows_SALOME CreateView");
63 BL::MainWindows_SALOME::restoreViewFocus()
66 SUIT_ViewWindow* resWnd = 0;
69 QList<SUIT_ViewWindow*> wndlist = _appli->desktop()->windows();
71 for (int i = 0; i < wndlist.size(); ++i)
74 if (_currentViewId == wnd->getId()) {resWnd = wnd;}
87 BL::MainWindows_SALOME::engineIOR() const
89 DEBTRACE("Entering in BL::SalomeGui::engineIOR");
90 QString anEngineIOR = SalomeApp_Engine_i::EngineIORForComponent( "JOBMANAGER", true ).c_str();
95 BL::MainWindows_SALOME::viewManagers(QStringList& list) const
97 DEBTRACE("Entering in BL::SalomeGui::viewManagers");
99 list.append(_svm->getType());
103 BL::MainWindows_SALOME::~MainWindows_SALOME()
105 DEBTRACE("Destroying BL::MainWindows_SALOME");
109 BL::MainWindows_SALOME::getDockParent()
111 return _appli->desktop();
115 BL::MainWindows_SALOME::getTabParent()
121 BL::MainWindows_SALOME::createAction(const QString& toolTip,
124 const QString& status,
130 const QString & shortCut)
132 return SalomeApp_Module::createAction(getActionId(), toolTip, icon, menu, status, accel, parent, checkable, receiver, member, shortCut);
136 BL::MainWindows_SALOME::createTopMenu(const QString & menu_name)
138 return createMenu(menu_name, -1, -1, 30 );
142 BL::MainWindows_SALOME::addActionToMenu(QAction * action, int menu_id)
144 createMenu(action, menu_id);