Salome HOME
Copyright update 2022
[modules/gui.git] / src / PVViewer / PVViewer_GUIElements.h
index a498ff333348b57052e99aa9f4566ff3cfa283cc..ff46492eb7b35c977ec66bc6c4548798e924c3c2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2010-2015  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2022  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 //
 // Author: Adrien Bruneton (CEA)
 
-#ifndef PVVIEWERGUIELEMENTS_H_
-#define PVVIEWERGUIELEMENTS_H_
+#ifndef PVVIEWER_GUIELEMENTS_H
+#define PVVIEWER_GUIELEMENTS_H
 
 #include "PVViewer.h"
 
 #include <QObject>
 #include <QList>
 
-class pqPropertiesPanel;
-class pqPipelineBrowserWidget;
+class QAction;
 class QMainWindow;
 class QMenu;
 class QToolBar;
-class QAction;
 class pqAnimationTimeToolbar;
+class pqPipelineBrowserWidget;
+class pqPipelineModel;
+class pqPropertiesPanel;
 class pqVCRToolbar;
 
 /*!
@@ -44,38 +45,45 @@ class PVVIEWER_EXPORT PVViewer_GUIElements: public QObject
   Q_OBJECT
 
 public:
-  static PVViewer_GUIElements * GetInstance(QMainWindow * desk);
+  static PVViewer_GUIElements* GetInstance(QMainWindow*);
 
-  pqPropertiesPanel * getPropertiesPanel() { return propertiesPanel; }
-  pqPipelineBrowserWidget * getPipelineBrowserWidget() { return pipelineBrowserWidget; }
+  pqPropertiesPanel* getPropertiesPanel();
+  pqPipelineBrowserWidget* getPipelineBrowserWidget();
 
-  QMenu* getFiltersMenu() { return filtersMenu; }
-  QMenu* getSourcesMenu() { return sourcesMenu; }
-  QMenu* getMacrosMenu()  { return macrosMenu; }
+  QMenu* getFiltersMenu();
+  QMenu* getSourcesMenu();
+  QMenu* getMacrosMenu();
+  QMenu* getCatalystMenu();
 
-  pqVCRToolbar* getVCRToolbar() { return vcrToolbar; }
-  pqAnimationTimeToolbar* getTimeToolbar() { return timeToolbar; }
+  pqVCRToolbar* getVCRToolbar();
+  pqAnimationTimeToolbar* getTimeToolbar();
 
-  void myBuildToolbars(QMainWindow* desk);
-  void addToolbars(QMainWindow* desk);
-  void setToolBarVisible(bool show);
-  void setToolBarEnabled(bool enabled);
+  void setToolBarVisible(bool);
+  void setToolBarEnabled(bool);
   QList<QToolBar*> getToolbars();
 
+  void setVCRTimeToolBarVisible(bool);
+
 private:
-  PVViewer_GUIElements(QMainWindow* desk);
+  PVViewer_GUIElements(QMainWindow*);
   virtual ~PVViewer_GUIElements() {}
 
   static PVViewer_GUIElements* theInstance;
 
+  void buildPVWidgets();
+
+  void publishExistingSources();
+
   // Widgets
   pqPropertiesPanel* propertiesPanel;
   pqPipelineBrowserWidget* pipelineBrowserWidget;
+  pqPipelineModel* pipelineModel;
 
   // Dummy QMenus receiving ParaView's reaction for automatic add when new sources are added
   QMenu* sourcesMenu;
   QMenu* filtersMenu;
   QMenu* macrosMenu;
+  QMenu* catalystMenu;
 
   // Toolbars also need to be instanciated early:
   QToolBar* mainToolBar;
@@ -88,6 +96,9 @@ private:
   QToolBar* macrosToolbar;
   QToolBar* commonToolbar;
   QToolBar* dataToolbar;
+  
+  QMainWindow* myDesktop;
+  bool myPVWidgetsFlag;
 
 public:
   QAction* mainAction;
@@ -102,4 +113,4 @@ public:
   QAction* dataAction;
 };
 
-#endif /* PVVIEWERGUIELEMENTS_H_ */
+#endif // PVVIEWER_GUIELEMENTS_H