X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPVViewer%2FPVViewer_GUIElements.h;h=ff46492eb7b35c977ec66bc6c4548798e924c3c2;hb=d0b0c10e5649e0338079df4a53cf95044792d989;hp=1615efc48ef77cf0dca70a501d747c64665ec657;hpb=6d65790643dc7cf96f87440dca90fd0d76e7e379;p=modules%2Fgui.git diff --git a/src/PVViewer/PVViewer_GUIElements.h b/src/PVViewer/PVViewer_GUIElements.h index 1615efc48..ff46492eb 100644 --- a/src/PVViewer/PVViewer_GUIElements.h +++ b/src/PVViewer/PVViewer_GUIElements.h @@ -1,4 +1,4 @@ -// Copyright (C) 2010-2014 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 @@ -18,17 +18,23 @@ // // Author: Adrien Bruneton (CEA) -#ifndef PVVIEWERGUIELEMENTS_H_ -#define PVVIEWERGUIELEMENTS_H_ +#ifndef PVVIEWER_GUIELEMENTS_H +#define PVVIEWER_GUIELEMENTS_H #include "PVViewer.h" #include +#include -class pqPropertiesPanel; -class pqPipelineBrowserWidget; -class SUIT_Desktop; +class QAction; +class QMainWindow; class QMenu; +class QToolBar; +class pqAnimationTimeToolbar; +class pqPipelineBrowserWidget; +class pqPipelineModel; +class pqPropertiesPanel; +class pqVCRToolbar; /*! * Some GUI elements of ParaView need to be instanciated in a proper order. This class @@ -39,33 +45,72 @@ class PVVIEWER_EXPORT PVViewer_GUIElements: public QObject Q_OBJECT public: - static PVViewer_GUIElements * GetInstance(SUIT_Desktop* desk); + static PVViewer_GUIElements* GetInstance(QMainWindow*); + + pqPropertiesPanel* getPropertiesPanel(); + pqPipelineBrowserWidget* getPipelineBrowserWidget(); + + QMenu* getFiltersMenu(); + QMenu* getSourcesMenu(); + QMenu* getMacrosMenu(); + QMenu* getCatalystMenu(); - pqPropertiesPanel * getPropertiesPanel() { return propertiesPanel; } - pqPipelineBrowserWidget * getPipelineBrowserWidget() { return pipelineBrowserWidget; } + pqVCRToolbar* getVCRToolbar(); + pqAnimationTimeToolbar* getTimeToolbar(); - // Update the sources menu from what was built in private member 'sourcesMenu' -// void updateSourcesMenu(QMenu *); -// void updateFiltersMenu(QMenu *); -// void updateMacrosMenu(QMenu *); + void setToolBarVisible(bool); + void setToolBarEnabled(bool); + QList getToolbars(); -public slots: - void onEmulateApply(); // better use the slot from PVViewer_ViewManager if you want to trigger "Apply" + void setVCRTimeToolBarVisible(bool); private: - PVViewer_GUIElements(SUIT_Desktop* desk); + PVViewer_GUIElements(QMainWindow*); virtual ~PVViewer_GUIElements() {} - static PVViewer_GUIElements * theInstance; + static PVViewer_GUIElements* theInstance; + + void buildPVWidgets(); + + void publishExistingSources(); // Widgets - pqPropertiesPanel * propertiesPanel; - pqPipelineBrowserWidget * pipelineBrowserWidget; + 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* sourcesMenu; + QMenu* filtersMenu; + QMenu* macrosMenu; + QMenu* catalystMenu; + + // Toolbars also need to be instanciated early: + QToolBar* mainToolBar; + pqVCRToolbar* vcrToolbar; + pqAnimationTimeToolbar* timeToolbar; + QToolBar* colorToolbar; + QToolBar* reprToolbar; + QToolBar* cameraToolbar; + QToolBar* axesToolbar; + QToolBar* macrosToolbar; + QToolBar* commonToolbar; + QToolBar* dataToolbar; + + QMainWindow* myDesktop; + bool myPVWidgetsFlag; + +public: + QAction* mainAction; + QAction* vcrAction; + QAction* timeAction; + QAction* colorAction; + QAction* reprAction; + QAction* cameraAction; + QAction* axesAction; + QAction* macrosAction; + QAction* commonAction; + QAction* dataAction; }; -#endif /* PVVIEWERGUIELEMENTS_H_ */ +#endif // PVVIEWER_GUIELEMENTS_H