]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
[PVViewer] Add Catalyst menu agr/EDF-12447-V7
authorCédric Aguerre <cedric.aguerre@edf.fr>
Wed, 9 Mar 2016 15:38:13 +0000 (16:38 +0100)
committerCédric Aguerre <cedric.aguerre@edf.fr>
Wed, 16 Mar 2016 12:49:06 +0000 (13:49 +0100)
src/PVViewer/CMakeLists.txt
src/PVViewer/PVViewer_GUIElements.cxx
src/PVViewer/PVViewer_GUIElements.h

index a31a8192e7efc3f0d18e6375228912b7dbafed9f..25b3a3599de66d9c2f28ef8936409a2f3550e31c 100644 (file)
@@ -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}
   )
 
index 46eb7fcc2de4ef4582c29d1db693f0d6d9722df7..a7519958573469607a7f99800cdaeb6d9e704317 100644 (file)
@@ -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);
 
index add85a7c25340b9a7d7af86726079f63928a7350..985293d85395c2e482fc3dca8ec49ecfdf05a663 100644 (file)
@@ -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;