From 29635588f0073d99d64df7f28f9a5a3487cec6ff Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Aguerre?= Date: Thu, 10 Mar 2016 15:16:04 +0100 Subject: [PATCH] [PVViewer] Add Catalyst menu --- CMakeLists.txt | 19 ++++++-- src/PVGUI/PVGUI_Module.cxx | 49 +++++++++++++------- src/PVGUI/PVGUI_Module.h | 21 +++++---- src/PVGUI/PVGUI_Module_actions.cxx | 35 ++++++++------ src/PVGUI/resources/PARAVIS_msg_en.ts | 4 ++ src/PVGUI/resources/PARAVIS_msg_fr.ts | 6 ++- test/standalone/CMakeLists.txt | 13 +++++- test/standalone/gui/CMakeLists.txt | 16 +++---- test/standalone/gui/PVViewer_GUIElements.cxx | 6 ++- test/standalone/gui/PVViewer_GUIElements.h | 8 +++- 10 files changed, 120 insertions(+), 57 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aae1ee95..1125184f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2010-2015 CEA/DEN, EDF R&D +# Copyright (C) 2010-2016 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -131,12 +131,23 @@ ENDIF() FIND_PACKAGE(SalomeParaView REQUIRED) +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() + ## ## From MEDCoupling / MEDFile / or MEDModule (if CORBA plugin required): ## IF(SALOME_PARAVIS_BUILD_PLUGINS) - # If CORBA plugins required, take in MED module + # If CORBA plugins required, take in MED module IF(SALOME_PARAVIS_BUILD_CORBA_PLUGINS) SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR} CACHE PATH "Path to the SALOME MED module") IF(EXISTS ${MED_ROOT_DIR}) @@ -147,11 +158,11 @@ IF(SALOME_PARAVIS_BUILD_PLUGINS) ELSE(SALOME_PARAVIS_BUILD_CORBA_PLUGINS) SET(MEDCOUPLING_ROOT_DIR $ENV{MEDCOUPLING_ROOT_DIR} CACHE PATH "Path to the MEDCoupling tool") IF(EXISTS ${MEDCOUPLING_ROOT_DIR}) - LIST(APPEND CMAKE_MODULE_PATH "${MEDCOUPLING_ROOT_DIR}/cmake_files") + LIST(APPEND CMAKE_MODULE_PATH "${MEDCOUPLING_ROOT_DIR}/cmake_files") ENDIF() FIND_PACKAGE(SalomeMEDCoupling) # will load MEDFile SALOME_LOG_OPTIONAL_PACKAGE(MEDCoupling SALOME_PARAVIS_BUILD_PLUGINS) - ENDIF() + ENDIF() ENDIF(SALOME_PARAVIS_BUILD_PLUGINS) ## diff --git a/src/PVGUI/PVGUI_Module.cxx b/src/PVGUI/PVGUI_Module.cxx index 6fa52dbe..8e3d3f63 100644 --- a/src/PVGUI/PVGUI_Module.cxx +++ b/src/PVGUI/PVGUI_Module.cxx @@ -1,6 +1,6 @@ // PARAVIS : ParaView wrapper SALOME module // -// Copyright (C) 2010-2015 CEA/DEN, EDF R&D +// Copyright (C) 2010-2016 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -141,7 +141,7 @@ PVGUI_Module* ParavisModule = 0; /*! \class PVGUI_Module - \brief Implementation + \brief Implementation SALOME module wrapping ParaView GUI. */ @@ -166,6 +166,9 @@ PVGUI_Module::PVGUI_Module() : LightApp_Module( PARAVIS_MODULE_NAME ), mySourcesMenuId( -1 ), myFiltersMenuId( -1 ), +#ifdef PVCATALYST_ENABLED + myCatalystMenuId(-1), +#endif myMacrosMenuId(-1), myRecentMenuId(-1), myOldMsgHandler(0), @@ -333,7 +336,7 @@ void PVGUI_Module::initialize( CAM_Application* app ) } updateMacros(); - + SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr(); bool isStop = aResourceMgr->booleanValue( PARAVIS_MODULE_NAME, "stop_trace", false ); if(!isStop) @@ -347,7 +350,7 @@ void PVGUI_Module::initialize( CAM_Application* app ) } this->VTKConnect = vtkEventQtSlotConnect::New(); - + vtkProcessModule* pm = vtkProcessModule::GetProcessModule(); if(pm) { vtkPVSession* pvs = dynamic_cast(pm->GetSession()); @@ -389,7 +392,7 @@ void PVGUI_Module::onEndProgress() void PVGUI_Module::onDataRepresentationUpdated() { LightApp_Study* activeStudy = dynamic_cast(application()->activeStudy()); if(!activeStudy) return; - + activeStudy->Modified(); } @@ -400,7 +403,7 @@ void PVGUI_Module::onInitTimer() { startTrace(); } - + /*! \brief Get list of embedded macros files */ @@ -431,7 +434,7 @@ void PVGUI_Module::updateMacros() if(!aPythonManager) { return; } - + foreach (QString aStr, getEmbeddedMacrosList()) { aPythonManager->addMacro(aStr); } @@ -570,7 +573,7 @@ bool PVGUI_Module::activateModule( SUIT_Study* study ) myOldMsgHandler = qInstallMsgHandler(ParavisMessageOutput); #else myOldMsgHandler = qInstallMessageHandler(ParavisMessageOutput); -#endif +#endif SUIT_ExceptionHandler::addCleanUpRoutine( paravisCleanUp ); storeCommonWindowsState(); @@ -581,6 +584,9 @@ bool PVGUI_Module::activateModule( SUIT_Study* study ) showView( true ); if ( mySourcesMenuId != -1 ) menuMgr()->show(mySourcesMenuId); if ( myFiltersMenuId != -1 ) menuMgr()->show(myFiltersMenuId); +#ifdef PVCATALYST_ENABLED + if ( myCatalystMenuId != -1 ) menuMgr()->show(myCatalystMenuId); +#endif if ( myMacrosMenuId != -1 ) menuMgr()->show(myMacrosMenuId); // Update the various menus with the content pre-loaded in myGuiElements @@ -588,6 +594,10 @@ bool PVGUI_Module::activateModule( SUIT_Study* study ) // myGuiElements->updateSourcesMenu(srcMenu); // QMenu* filtMenu = menuMgr()->findMenu( myFiltersMenuId ); // myGuiElements->updateFiltersMenu(filtMenu); +//#ifdef PVCATALYST_ENABLED +// QMenu* catalystMenu = menuMgr()->findMenu( myCatalystMenuId ); +// myGuiElements->updateCatalystMenu(catalystMenu); +//#endif // QMenu* macMenu = menuMgr()->findMenu( myMacrosMenuId ); // myGuiElements->updateMacrosMenu(macMenu); @@ -614,7 +624,7 @@ bool PVGUI_Module::activateModule( SUIT_Study* study ) } if ( myRecentMenuId != -1 ) menuMgr()->show(myRecentMenuId); - + return isDone; } @@ -659,6 +669,9 @@ bool PVGUI_Module::deactivateModule( SUIT_Study* study ) menuMgr()->hide(myRecentMenuId); menuMgr()->hide(mySourcesMenuId); menuMgr()->hide(myFiltersMenuId); +#ifdef PVCATALYST_ENABLED + menuMgr()->hide(myCatalystMenuId); +#endif menuMgr()->hide(myMacrosMenuId); setMenuShown( false ); setToolShown( false ); @@ -674,7 +687,7 @@ bool PVGUI_Module::deactivateModule( SUIT_Study* study ) qInstallMessageHandler(myOldMsgHandler); #endif restoreCommonWindowsState(); - + return LightApp_Module::deactivateModule( study ); } @@ -704,7 +717,7 @@ void PVGUI_Module::studyClosed(SUIT_Study* study) { showView(false); // VSR: this seems to be not needed (all views are automatically closed) clearParaviewState(); - //Re-start trace + //Re-start trace onRestartTrace(); LightApp_Module::studyClosed(study); @@ -722,7 +735,7 @@ void PVGUI_Module::openFile( const char* theName ) /*! \brief Starts Python trace. - + Start trace invoking the newly introduced C++ API (PV 4.2) (inspired from pqTraceReaction::start()) */ @@ -766,7 +779,7 @@ void PVGUI_Module::executeScript( const char* script ) if ( manager ) { pqPythonDialog* pyDiag = manager->pythonShellDialog(); if ( pyDiag ) { - pyDiag->runString(script); + pyDiag->runString(script); } } #endif @@ -844,7 +857,7 @@ QString PVGUI_Module::getTraceString() + end_line + end_line + camera_qs + end_line; } } - } + } return traceString; } @@ -920,7 +933,7 @@ void PVGUI_Module::createPreferences() // Paravis settings tab int aParaVisSettingsTab = addPreference( tr( "TIT_PVISSETTINGS" ) ); - addPreference( tr( "PREF_NO_EXT_PVSERVER" ), aParaVisSettingsTab, + addPreference( tr( "PREF_NO_EXT_PVSERVER" ), aParaVisSettingsTab, LightApp_Preferences::Bool, PARAVIS_MODULE_NAME, "no_ext_pv_server" ); int aSaveType = addPreference( tr( "PREF_SAVE_TYPE_LBL" ), aParaVisSettingsTab, @@ -937,7 +950,7 @@ void PVGUI_Module::createPreferences() // ... "Language" group <> int traceGroup = addPreference( tr( "PREF_GROUP_TRACE" ), aParaVisSettingsTab ); - int stopTrace = addPreference( tr( "PREF_STOP_TRACE" ), traceGroup, + int stopTrace = addPreference( tr( "PREF_STOP_TRACE" ), traceGroup, LightApp_Preferences::Bool, PARAVIS_MODULE_NAME, "stop_trace" ); setPreferenceProperty( stopTrace, "restart", true ); @@ -990,7 +1003,7 @@ void PVGUI_Module::onStopTrace() void PVGUI_Module::onViewManagerAdded( SUIT_ViewManager* vm ) { if ( PVViewer_ViewManager* pvvm = dynamic_cast( vm ) ) { - connect( pvvm, SIGNAL( viewCreated( SUIT_ViewWindow* ) ), + connect( pvvm, SIGNAL( viewCreated( SUIT_ViewWindow* ) ), this, SLOT( onPVViewCreated( SUIT_ViewWindow* ) ) ); connect( pvvm, SIGNAL( deleteView( SUIT_ViewWindow* ) ), this, SLOT( onPVViewDelete( SUIT_ViewWindow* ) ) ); @@ -1043,7 +1056,7 @@ extern "C" { PVGUI_EXPORT CAM_Module* createModule() { return new PVGUI_Module(); } - + PVGUI_EXPORT char* getModuleVersion() { return (char*)PARAVIS_VERSION_STR; } diff --git a/src/PVGUI/PVGUI_Module.h b/src/PVGUI/PVGUI_Module.h index 64fe6442..8f0e03c4 100644 --- a/src/PVGUI/PVGUI_Module.h +++ b/src/PVGUI/PVGUI_Module.h @@ -1,6 +1,6 @@ // PARAVIS : ParaView wrapper SALOME module // -// Copyright (C) 2010-2015 CEA/DEN, EDF R&D +// Copyright (C) 2010-2016 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -41,7 +41,7 @@ class SUIT_ViewWindow; class PVGUI_Module: public LightApp_Module { Q_OBJECT - + //! Menu actions enum { //----------- @@ -161,7 +161,7 @@ private: void restoreDockWidgetsState(); //! Shows or hides ParaView view window - void showView( bool ); + void showView( bool ); //! Get list of embedded macros files QStringList getEmbeddedMacrosList(); @@ -177,7 +177,7 @@ private: private slots: void showHelpForProxy( const QString&, const QString& ); - + void onPreAccept(); // not used inside PARAVIS void onPostAccept(); // not used inside PARAVIS void endWaitCursor(); // not used inside PARAVIS @@ -206,22 +206,25 @@ protected slots: private: int mySourcesMenuId; int myFiltersMenuId; +#ifdef PVCATALYST_ENABLED + int myCatalystMenuId; +#endif int myMacrosMenuId; int myRecentMenuId; - + typedef QMap WgMap; WgMap myDockWidgets; WgMap myToolbars; WgMap myToolbarBreaks; QList myMenus; - typedef QMap DockWindowMap; - DockWindowMap myCommonMap; + typedef QMap DockWindowMap; + DockWindowMap myCommonMap; #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) QtMsgHandler myOldMsgHandler; -#else +#else QtMessageHandler myOldMsgHandler; -#endif +#endif vtkEventQtSlotConnect* VTKConnect; pqPythonScriptEditor* myTraceWindow; diff --git a/src/PVGUI/PVGUI_Module_actions.cxx b/src/PVGUI/PVGUI_Module_actions.cxx index 67f3d6ce..91e840e0 100644 --- a/src/PVGUI/PVGUI_Module_actions.cxx +++ b/src/PVGUI/PVGUI_Module_actions.cxx @@ -1,6 +1,6 @@ // PARAVIS : ParaView wrapper SALOME module // -// Copyright (C) 2010-2015 CEA/DEN, EDF R&D +// Copyright (C) 2010-2016 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -88,7 +88,7 @@ void PVGUI_Module::pvCreateActions() QPixmap aPixmap; QAction* anAction; - + // --- Menu "File" // Open File @@ -98,14 +98,14 @@ void PVGUI_Module::pvCreateActions() anAction->setStatusTip(tr("STB_OPEN_FILE")); registerAction(OpenFileId, anAction); new pqLoadDataReaction(anAction); - + // Load State anAction = new QAction(tr("MEN_LOAD_STATE"), this); anAction->setToolTip(tr("TOP_LOAD_STATE")); anAction->setStatusTip(tr("STB_LOAD_STATE")); registerAction(LoadStateId, anAction); new pqLoadStateReaction(anAction); - + // Save State anAction = new QAction(tr("MEN_SAVE_STATE"), this); anAction->setToolTip(tr("TOP_SAVE_STATE")); @@ -193,7 +193,7 @@ void PVGUI_Module::pvCreateActions() anAction->setStatusTip(tr("STB_CAMERA_UNDO")); registerAction(CameraUndoId, anAction); new pqCameraUndoRedoReaction(anAction, true); - + // Camera Redo aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_CAMERA_REDO"), false ); anAction = new QAction(QIcon(aPixmap), tr("MEN_CAMERA_REDO"), this); @@ -208,7 +208,7 @@ void PVGUI_Module::pvCreateActions() anAction->setStatusTip(""); registerAction(FindDataId, anAction); new pqDataQueryReaction(anAction); - + // Change Input anAction = new QAction(tr("MEN_CHANGE_INPUT"), this); anAction->setToolTip(tr("TOP_CHANGE_INPUT")); @@ -245,7 +245,7 @@ void PVGUI_Module::pvCreateActions() anAction->setStatusTip(tr("STB_SETTINGS")); registerAction(SettingsId, anAction); new pqApplicationSettingsReaction(anAction);*/ - + // View Settings // anAction = new QAction(tr("MEN_VIEW_SETTINGS"), this); // anAction->setToolTip(tr("TOP_VIEW_SETTINGS")); @@ -257,7 +257,7 @@ void PVGUI_Module::pvCreateActions() //pqViewManager* viewManager = qobject_cast( // pqApplicationCore::instance()->manager("MULTIVIEW_WIDGET")); - //rnv: Commented to implement issue + //rnv: Commented to implement issue //21318: EDF 1615 ALL: Display in full screen mode //Switching to the "Full screen" mode added in the SALOME GUI module. //if (viewManager) { @@ -350,7 +350,7 @@ void PVGUI_Module::pvCreateActions() registerAction(OutputWindowId, anAction); anAction << pqSetName("actionToolsOutputWindow"); connect(anAction, SIGNAL(triggered()), pqApplicationCore::instance(), SLOT(showOutputWindow())); - + // Python Shell anAction = new QAction(tr("MEN_PYTHON_SHELL"), this); anAction->setToolTip(tr("TOP_PYTHON_SHELL")); @@ -396,14 +396,14 @@ void PVGUI_Module::pvCreateActions() \brief Create menus for ParaView GUI operations duplicating menus in pqMainWindow ParaView class - In particular, ParaView is responsible for updating "Sources" and "Filters" menus. + In particular, ParaView is responsible for updating "Sources" and "Filters" menus. For this, specific menu managers created by pqMainWindowCore class are used, and PVGUI_Module is responsible for creation of corresponding QMenu objects only. */ void PVGUI_Module::pvCreateMenus() { SUIT_Desktop* desk = application()->desktop(); - + // --- Menu "File" int aPVMnu = createMenu( tr( "MEN_DESK_FILE" ), -1, -1 ); @@ -462,23 +462,30 @@ void PVGUI_Module::pvCreateMenus() aPVMnu = createMenu( tr( "MEN_DESK_VIEW" ), -1, -1 ); createMenu( FullScreenId, aPVMnu ); - + // --- Menu "Sources" // Install ParaView managers for "Sources" menu QMenu* aRes = 0; PVViewer_GUIElements * guiElements = PVViewer_GUIElements::GetInstance(desk); aRes = guiElements->getSourcesMenu(); mySourcesMenuId = createMenu( tr( "MEN_DESK_SOURCES" ), -1, -1, 60, -1, aRes); - + // --- Menu "Filters" // Install ParaView managers for "Filters" menu aRes = guiElements->getFiltersMenu(); myFiltersMenuId = createMenu( tr( "MEN_DESK_FILTERS" ), -1, -1, 70, -1, aRes); + // --- Menu "Catalyst" + // Install ParaView managers for "Catalyst" menu +#ifdef PVCATALYST_ENABLED + aRes = guiElements->getCatalystMenu(); + myCatalystMenuId = createMenu( tr( "MEN_DESK_CATALYST" ), -1, -1, 75, -1, aRes); +#endif + // --- Menu "Macros" aRes = guiElements->getMacrosMenu(); myMacrosMenuId = createMenu( tr( "MEN_MACROS" ), -1, -1, 80, -1, aRes); - + // --- Menu "Tools" int aToolsMnu = createMenu( tr( "MEN_DESK_TOOLS" ), -1, -1, 90 ); diff --git a/src/PVGUI/resources/PARAVIS_msg_en.ts b/src/PVGUI/resources/PARAVIS_msg_en.ts index 55e4ba6a..614eec86 100644 --- a/src/PVGUI/resources/PARAVIS_msg_en.ts +++ b/src/PVGUI/resources/PARAVIS_msg_en.ts @@ -817,6 +817,10 @@ MEN_DESK_FILTERS F&ilters + + MEN_DESK_CATALYST + Catalyst + MEN_DESK_ANIMATION A&nimation diff --git a/src/PVGUI/resources/PARAVIS_msg_fr.ts b/src/PVGUI/resources/PARAVIS_msg_fr.ts index 7b143016..f6f84092 100644 --- a/src/PVGUI/resources/PARAVIS_msg_fr.ts +++ b/src/PVGUI/resources/PARAVIS_msg_fr.ts @@ -260,7 +260,7 @@ TTL_VIEW_PANEL Vue - + TOP_OPEN_FILE Ouvrir un fichier ParaView @@ -821,6 +821,10 @@ MEN_DESK_FILTERS F&iltres + + MEN_DESK_CATALYST + Catalyst + MEN_DESK_ANIMATION A&nimation diff --git a/test/standalone/CMakeLists.txt b/test/standalone/CMakeLists.txt index 9479e3fe..03b60d35 100644 --- a/test/standalone/CMakeLists.txt +++ b/test/standalone/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2010-2015 CEA/DEN, EDF R&D +# Copyright (C) 2010-2016 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -34,6 +34,17 @@ ENDIF() LIST(APPEND CMAKE_PREFIX_PATH "$ENV{PARAVIEW_ROOT_DIR}") FIND_PACKAGE(ParaView REQUIRED) +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() + INCLUDE(${PARAVIEW_USE_FILE}) INCLUDE(ParaViewMacros) SET(CMAKE_INCLUDE_CURRENT_DIR ON) diff --git a/test/standalone/gui/CMakeLists.txt b/test/standalone/gui/CMakeLists.txt index 91b56427..9717df20 100644 --- a/test/standalone/gui/CMakeLists.txt +++ b/test/standalone/gui/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2010-2015 CEA/DEN, EDF R&D +# Copyright (C) 2010-2016 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -26,7 +26,7 @@ SET(pl_HEADERS PVViewer_Behaviors.h PVViewer_GUIElements.h ) - + SET(pl_OTHER_HEADERS PVViewer_Core.h ) @@ -44,17 +44,17 @@ SET(pl_FORMS ui/light_para.ui ui/view_tab.ui ) - + SET(CMAKE_INCLUDE_CURRENT_DIR ON) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) INCLUDE_DIRECTORIES(${PARAVIEW_INCLUDE_DIRS}) ADD_DEFINITIONS(${QT_DEFINITIONS}) -# Generate resources that will embedded +# Generate resources that will embedded SET(ui_resources "${CMAKE_CURRENT_BINARY_DIR}/LightPara_configuration.qrc") - + GENERATE_QT_RESOURCE_FROM_FILES( "${ui_resources}" "/LightPara/Configuration" @@ -67,11 +67,11 @@ QT_WRAP_UIC(pl_FORMS_HEADERS ${pl_FORMS}) QT_WRAP_MOC(pl_HEADERS_MOC ${pl_HEADERS}) ADD_EXECUTABLE(paraLight - ${pl_SOURCES} - ${pl_HEADERS_MOC} + ${pl_SOURCES} + ${pl_HEADERS_MOC} ${pl_FORMS_HEADERS} ${rcs_sources}) - + TARGET_LINK_LIBRARIES(paraLight ${QT_LIBRARIES} pqApplicationComponents vtkRenderingFreeType)#vtkRenderingFreeTypeOpenGL) #INSTALL(TARGET paraLight bin) diff --git a/test/standalone/gui/PVViewer_GUIElements.cxx b/test/standalone/gui/PVViewer_GUIElements.cxx index e008c225..372c7a3e 100644 --- a/test/standalone/gui/PVViewer_GUIElements.cxx +++ b/test/standalone/gui/PVViewer_GUIElements.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2010-2015 CEA/DEN, EDF R&D +// Copyright (C) 2010-2016 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -67,6 +67,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/test/standalone/gui/PVViewer_GUIElements.h b/test/standalone/gui/PVViewer_GUIElements.h index 33afc038..7ab084a3 100644 --- a/test/standalone/gui/PVViewer_GUIElements.h +++ b/test/standalone/gui/PVViewer_GUIElements.h @@ -1,4 +1,4 @@ -// Copyright (C) 2010-2015 CEA/DEN, EDF R&D +// Copyright (C) 2010-2016 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -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; } @@ -80,6 +83,9 @@ private: QMenu* sourcesMenu; QMenu* filtersMenu; QMenu* macrosMenu; +#ifdef PVCATALYST_ENABLED + QMenu* catalystMenu; +#endif // Toolbars also need to be instanciated early: QToolBar* mainToolBar; -- 2.39.2