]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
[PVViewer] Add Catalyst menu agr/EDF-12447-V771
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>
Thu, 17 Mar 2016 14:06:55 +0000 (15:06 +0100)
src/PVViewer/CMakeLists.txt
src/PVViewer/PVViewer_GUIElements.cxx
src/PVViewer/PVViewer_GUIElements.h

index 65d5f73b595c4a8887685579a15559fb6fd07a48..a78277ef7faa0eafd5c9c62f63fe9c10302194a1 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
@@ -95,11 +106,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 e2b77ddb84661e7d9b0cef57f6b155bb41fe596c..7748f8e32422dc528d16408eba965221458b2234 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 a498ff333348b57052e99aa9f4566ff3cfa283cc..a5a98e96de4241635d8a581cf18c4d054ca09202 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;