1 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D, OPEN CASCADE
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 #ifndef PVVIEWERGUIELEMENTS_H_
22 #define PVVIEWERGUIELEMENTS_H_
29 class pqPropertiesPanel;
30 class pqPipelineBrowserWidget;
31 class pqPipelineModel;
36 class pqAnimationTimeToolbar;
40 * Some GUI elements of ParaView need to be instanciated in a proper order. This class
41 * holds all of them for the sake of clarity.
43 class PVVIEWER_EXPORT PVViewer_GUIElements: public QObject
48 static PVViewer_GUIElements * GetInstance(QMainWindow * desk);
50 pqPropertiesPanel * getPropertiesPanel();
51 pqPipelineBrowserWidget * getPipelineBrowserWidget();
53 QMenu* getFiltersMenu();
54 QMenu* getSourcesMenu();
55 QMenu* getMacrosMenu();
56 QMenu* getCatalystMenu();
58 pqVCRToolbar* getVCRToolbar();
59 pqAnimationTimeToolbar* getTimeToolbar();
61 void setToolBarVisible(bool show);
62 void setToolBarEnabled(bool enabled);
63 QList<QToolBar*> getToolbars();
65 void setVCRTimeToolBarVisible(bool show);
68 PVViewer_GUIElements(QMainWindow* desk);
69 virtual ~PVViewer_GUIElements() {}
71 static PVViewer_GUIElements* theInstance;
73 void buildPVWidgets();
75 void publishExistingSources();
78 pqPropertiesPanel* propertiesPanel;
79 pqPipelineBrowserWidget* pipelineBrowserWidget;
80 pqPipelineModel* pipelineModel;
82 // Dummy QMenus receiving ParaView's reaction for automatic add when new sources are added
88 // Toolbars also need to be instanciated early:
89 QToolBar* mainToolBar;
90 pqVCRToolbar* vcrToolbar;
91 pqAnimationTimeToolbar* timeToolbar;
92 QToolBar* colorToolbar;
93 QToolBar* reprToolbar;
94 QToolBar* cameraToolbar;
95 QToolBar* axesToolbar;
96 QToolBar* macrosToolbar;
97 QToolBar* commonToolbar;
98 QToolBar* dataToolbar;
100 QMainWindow* myDesktop;
101 bool myPVWidgetsFlag;
107 QAction* colorAction;
109 QAction* cameraAction;
111 QAction* macrosAction;
112 QAction* commonAction;
116 #endif /* PVVIEWERGUIELEMENTS_H_ */