1 // Copyright (C) 2010-2014 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
19 // Author: Adrien Bruneton (CEA)
21 #include "PVViewer_GUIElements.h"
22 #include "SUIT_Desktop.h"
24 #include <pqPropertiesPanel.h>
25 #include <pqPipelineBrowserWidget.h>
26 #include <pqParaViewMenuBuilders.h>
32 PVViewer_GUIElements * PVViewer_GUIElements::theInstance = 0;
34 PVViewer_GUIElements::PVViewer_GUIElements(SUIT_Desktop* desk) :
35 propertiesPanel(0), pipelineBrowserWidget(0),
38 propertiesPanel = new pqPropertiesPanel(desk);
39 propertiesPanel->hide();
40 pipelineBrowserWidget = new pqPipelineBrowserWidget(desk);
41 pipelineBrowserWidget->hide();
43 sourcesMenu = new QMenu(desk);
44 pqParaViewMenuBuilders::buildSourcesMenu(*sourcesMenu, desk);
46 filtersMenu = new QMenu(desk);
47 pqParaViewMenuBuilders::buildFiltersMenu(*filtersMenu, desk);
49 macrosMenu = new QMenu(desk);
50 pqParaViewMenuBuilders::buildMacrosMenu(*macrosMenu);
53 PVViewer_GUIElements * PVViewer_GUIElements::GetInstance(SUIT_Desktop* desk)
56 theInstance = new PVViewer_GUIElements(desk);
60 void PVViewer_GUIElements::updateSourcesMenu(QMenu *menu)
65 QList<QAction *> act_list = sourcesMenu->actions();
66 foreach(QAction * a, act_list)
73 void PVViewer_GUIElements::updateFiltersMenu(QMenu *menu)
78 QList<QAction *> act_list = filtersMenu->actions();
79 foreach(QAction * a, act_list)
86 void PVViewer_GUIElements::updateMacrosMenu(QMenu *menu)
91 QList<QAction *> act_list = macrosMenu->actions();
92 foreach(QAction * a, act_list)
100 void PVViewer_GUIElements::onEmulateApply()
103 propertiesPanel->apply();