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 pipelineBrowserWidget = new pqPipelineBrowserWidget(desk);
41 sourcesMenu = new QMenu(desk);
42 pqParaViewMenuBuilders::buildSourcesMenu(*sourcesMenu, desk);
44 filtersMenu = new QMenu(desk);
45 pqParaViewMenuBuilders::buildFiltersMenu(*filtersMenu, desk);
47 macrosMenu = new QMenu(desk);
48 pqParaViewMenuBuilders::buildMacrosMenu(*macrosMenu);
51 PVViewer_GUIElements * PVViewer_GUIElements::GetInstance(SUIT_Desktop* desk)
54 theInstance = new PVViewer_GUIElements(desk);
58 void PVViewer_GUIElements::updateSourcesMenu(QMenu *menu)
63 QList<QAction *> act_list = sourcesMenu->actions();
64 foreach(QAction * a, act_list)
71 void PVViewer_GUIElements::updateFiltersMenu(QMenu *menu)
76 QList<QAction *> act_list = filtersMenu->actions();
77 foreach(QAction * a, act_list)
84 void PVViewer_GUIElements::updateMacrosMenu(QMenu *menu)
89 QList<QAction *> act_list = macrosMenu->actions();
90 foreach(QAction * a, act_list)
98 void PVViewer_GUIElements::onEmulateApply()
101 propertiesPanel->apply();