1 // Copyright (C) 2009-2015 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, 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 "BL_MainWindows_Qt.hxx"
22 BL::MainWindows_Qt::MainWindows_Qt(QMainWindow * main_window)
24 DEBTRACE("Creating BL::MainWindows_Qt");
25 BL_ASSERT(main_window);
26 _main_window = main_window;
30 BL::MainWindows_Qt::~MainWindows_Qt()
32 DEBTRACE("Destroying BL::MainWindows_Qt");
36 BL::MainWindows_Qt::getDockParent()
42 BL::MainWindows_Qt::getTabParent()
48 BL::MainWindows_Qt::createAction(const QString& toolTip,
51 const QString& status,
57 const QString& shortCut)
59 QAction * action = new QAction(icon, menu, parent);
60 action->setStatusTip(status);
61 action->setToolTip(toolTip);
63 connect(action, SIGNAL(triggered()), receiver, member);
68 BL::MainWindows_Qt::createTopMenu(const QString & menu_name)
70 QMenu * new_menu = _main_window->menuBar()->addMenu(menu_name);
71 _menu_map[getMenuId()] = new_menu;
76 BL::MainWindows_Qt::addActionToMenu(QAction * action, int menu_id)
78 _menu_map[menu_id]->addAction(action);