From: Cédric Aguerre Date: Wed, 9 Mar 2016 15:38:13 +0000 (+0100) Subject: [PVViewer] Add Catalyst menu X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8cb0a8243a4550a9907bdb9b868f0c435cf718b2;p=modules%2Fgui.git [PVViewer] Add Catalyst menu --- diff --git a/src/PVViewer/CMakeLists.txt b/src/PVViewer/CMakeLists.txt index a31a8192e..25b3a3599 100644 --- a/src/PVViewer/CMakeLists.txt +++ b/src/PVViewer/CMakeLists.txt @@ -22,6 +22,17 @@ INCLUDE(UseQt4Ext) # Install ParaView filters, etc ... ADD_SUBDIRECTORY(resources) +FIND_PACKAGE(ParaView COMPONENTS vtkPVCatalyst vtkPVPythonCatalyst) +LIST(FIND VTK_MODULES_ENABLED vtkPVCatalyst vtkPVCatalyst_index) +LIST(FIND VTK_MODULES_ENABLED vtkPVPythonCatalyst vtkPVPythonCatalyst_index) +IF (${vtkPVCatalyst_index} GREATER -1 AND + ${vtkPVPythonCatalyst_index} GREATER -1) + SET(PVCATALYST_ENABLED yes) +ENDIF() +IF (PVCATALYST_ENABLED) + ADD_DEFINITIONS("-DPVCATALYST_ENABLED") +ENDIF() + # --- options --- INCLUDE_DIRECTORIES( @@ -39,12 +50,12 @@ ADD_DEFINITIONS( ${PYTHON_DEFINITIONS} ) -SET(_link_LIBRARIES - ${KERNEL_SALOMELocalTrace} +SET(_link_LIBRARIES + ${KERNEL_SALOMELocalTrace} ${KERNEL_OpUtil} - PyInterp - suit - Event + PyInterp + suit + Event PVServerService pqApplicationComponents #vtkRenderingFreeTypeOpenGL @@ -96,11 +107,11 @@ SET(_other_SOURCES PVViewer_GUIElements.cxx PVViewer_Core.cxx ) - + # sources / to compile -SET(PVViewer_SOURCES - ${_other_SOURCES} - ${_moc_SOURCES} +SET(PVViewer_SOURCES + ${_other_SOURCES} + ${_moc_SOURCES} ${_rcc_SOURCES} ) diff --git a/src/PVViewer/PVViewer_GUIElements.cxx b/src/PVViewer/PVViewer_GUIElements.cxx index 46eb7fcc2..a75199585 100644 --- a/src/PVViewer/PVViewer_GUIElements.cxx +++ b/src/PVViewer/PVViewer_GUIElements.cxx @@ -59,6 +59,10 @@ PVViewer_GUIElements::PVViewer_GUIElements(QMainWindow* desk) : pqParaViewMenuBuilders::buildSourcesMenu(*sourcesMenu, desk); filtersMenu = new QMenu(0); pqParaViewMenuBuilders::buildFiltersMenu(*filtersMenu, desk); +#ifdef PVCATALYST_ENABLED + catalystMenu = new QMenu(0); + pqParaViewMenuBuilders::buildCatalystMenu(*catalystMenu); +#endif macrosMenu = new QMenu(0); pqParaViewMenuBuilders::buildMacrosMenu(*macrosMenu); diff --git a/src/PVViewer/PVViewer_GUIElements.h b/src/PVViewer/PVViewer_GUIElements.h index add85a7c2..985293d85 100644 --- a/src/PVViewer/PVViewer_GUIElements.h +++ b/src/PVViewer/PVViewer_GUIElements.h @@ -52,6 +52,9 @@ public: QMenu* getFiltersMenu() { return filtersMenu; } QMenu* getSourcesMenu() { return sourcesMenu; } QMenu* getMacrosMenu() { return macrosMenu; } +#ifdef PVCATALYST_ENABLED + QMenu* getCatalystMenu() { return catalystMenu; } +#endif pqVCRToolbar* getVCRToolbar() { return vcrToolbar; } pqAnimationTimeToolbar* getTimeToolbar() { return timeToolbar; } @@ -76,6 +79,9 @@ private: QMenu* sourcesMenu; QMenu* filtersMenu; QMenu* macrosMenu; +#ifdef PVCATALYST_ENABLED + QMenu* catalystMenu; +#endif // Toolbars also need to be instanciated early: QToolBar* mainToolBar;