-# Copyright (C) 2010-2016 CEA/DEN, EDF R&D
+# Copyright (C) 2010-2015 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
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})
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)
##
// PARAVIS : ParaView wrapper SALOME module
//
-// Copyright (C) 2010-2016 CEA/DEN, EDF R&D
+// Copyright (C) 2010-2015 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
/*!
\class PVGUI_Module
- \brief Implementation
+ \brief Implementation
SALOME module wrapping ParaView GUI.
*/
: LightApp_Module( PARAVIS_MODULE_NAME ),
mySourcesMenuId( -1 ),
myFiltersMenuId( -1 ),
-#ifdef PVCATALYST_ENABLED
- myCatalystMenuId(-1),
-#endif
myMacrosMenuId(-1),
myRecentMenuId(-1),
myOldMsgHandler(0),
}
updateMacros();
-
+
SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
bool isStop = aResourceMgr->booleanValue( PARAVIS_MODULE_NAME, "stop_trace", false );
if(!isStop)
}
this->VTKConnect = vtkEventQtSlotConnect::New();
-
+
vtkProcessModule* pm = vtkProcessModule::GetProcessModule();
if(pm) {
vtkPVSession* pvs = dynamic_cast<vtkPVSession*>(pm->GetSession());
void PVGUI_Module::onDataRepresentationUpdated() {
LightApp_Study* activeStudy = dynamic_cast<LightApp_Study*>(application()->activeStudy());
if(!activeStudy) return;
-
+
activeStudy->Modified();
}
{
startTrace();
}
-
+
/*!
\brief Get list of embedded macros files
*/
if(!aPythonManager) {
return;
}
-
+
foreach (QString aStr, getEmbeddedMacrosList()) {
aPythonManager->addMacro(aStr);
}
myOldMsgHandler = qInstallMsgHandler(ParavisMessageOutput);
#else
myOldMsgHandler = qInstallMessageHandler(ParavisMessageOutput);
-#endif
+#endif
SUIT_ExceptionHandler::addCleanUpRoutine( paravisCleanUp );
storeCommonWindowsState();
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
// 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);
}
if ( myRecentMenuId != -1 ) menuMgr()->show(myRecentMenuId);
-
+
return isDone;
}
menuMgr()->hide(myRecentMenuId);
menuMgr()->hide(mySourcesMenuId);
menuMgr()->hide(myFiltersMenuId);
-#ifdef PVCATALYST_ENABLED
- menuMgr()->hide(myCatalystMenuId);
-#endif
menuMgr()->hide(myMacrosMenuId);
setMenuShown( false );
setToolShown( false );
qInstallMessageHandler(myOldMsgHandler);
#endif
restoreCommonWindowsState();
-
+
return LightApp_Module::deactivateModule( 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);
/*!
\brief Starts Python trace.
-
+
Start trace invoking the newly introduced C++ API (PV 4.2)
(inspired from pqTraceReaction::start())
*/
if ( manager ) {
pqPythonDialog* pyDiag = manager->pythonShellDialog();
if ( pyDiag ) {
- pyDiag->runString(script);
+ pyDiag->runString(script);
}
}
#endif
+ end_line + end_line + camera_qs + end_line;
}
}
- }
+ }
return traceString;
}
// 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,
// ... "Language" group <<start>>
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 );
void PVGUI_Module::onViewManagerAdded( SUIT_ViewManager* vm )
{
if ( PVViewer_ViewManager* pvvm = dynamic_cast<PVViewer_ViewManager*>( 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* ) ) );
PVGUI_EXPORT CAM_Module* createModule() {
return new PVGUI_Module();
}
-
+
PVGUI_EXPORT char* getModuleVersion() {
return (char*)PARAVIS_VERSION_STR;
}
// PARAVIS : ParaView wrapper SALOME module
//
-// Copyright (C) 2010-2016 CEA/DEN, EDF R&D
+// Copyright (C) 2010-2015 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
class PVGUI_Module: public LightApp_Module
{
Q_OBJECT
-
+
//! Menu actions
enum {
//-----------
void restoreDockWidgetsState();
//! Shows or hides ParaView view window
- void showView( bool );
+ void showView( bool );
//! Get list of embedded macros files
QStringList getEmbeddedMacrosList();
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
private:
int mySourcesMenuId;
int myFiltersMenuId;
-#ifdef PVCATALYST_ENABLED
- int myCatalystMenuId;
-#endif
int myMacrosMenuId;
int myRecentMenuId;
-
+
typedef QMap<QWidget*, bool> WgMap;
WgMap myDockWidgets;
WgMap myToolbars;
WgMap myToolbarBreaks;
QList<QMenu*> myMenus;
- typedef QMap<int, bool> DockWindowMap;
- DockWindowMap myCommonMap;
+ typedef QMap<int, bool> DockWindowMap;
+ DockWindowMap myCommonMap;
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
QtMsgHandler myOldMsgHandler;
-#else
+#else
QtMessageHandler myOldMsgHandler;
-#endif
+#endif
vtkEventQtSlotConnect* VTKConnect;
pqPythonScriptEditor* myTraceWindow;
// PARAVIS : ParaView wrapper SALOME module
//
-// Copyright (C) 2010-2016 CEA/DEN, EDF R&D
+// Copyright (C) 2010-2015 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
QPixmap aPixmap;
QAction* anAction;
-
+
// --- Menu "File"
// Open File
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"));
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);
anAction->setStatusTip("");
registerAction(FindDataId, anAction);
new pqDataQueryReaction(anAction);
-
+
// Change Input
anAction = new QAction(tr("MEN_CHANGE_INPUT"), this);
anAction->setToolTip(tr("TOP_CHANGE_INPUT"));
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"));
//pqViewManager* viewManager = qobject_cast<pqViewManager*>(
// 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) {
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"));
\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 );
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 );
<source>MEN_DESK_FILTERS</source>
<translation>F&ilters</translation>
</message>
- <message>
- <source>MEN_DESK_CATALYST</source>
- <translation>Catalyst</translation>
- </message>
<message>
<source>MEN_DESK_ANIMATION</source>
<translation>A&nimation</translation>
<message>
<source>TTL_VIEW_PANEL</source>
<translation>Vue</translation>
- </message>
+ </message>
<message>
<source>TOP_OPEN_FILE</source>
<translation>Ouvrir un fichier ParaView</translation>
<source>MEN_DESK_FILTERS</source>
<translation>F&iltres</translation>
</message>
- <message>
- <source>MEN_DESK_CATALYST</source>
- <translation>Catalyst</translation>
- </message>
<message>
<source>MEN_DESK_ANIMATION</source>
<translation>A&nimation</translation>
-# Copyright (C) 2010-2016 CEA/DEN, EDF R&D
+# Copyright (C) 2010-2015 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
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)
-# Copyright (C) 2010-2016 CEA/DEN, EDF R&D
+# Copyright (C) 2010-2015 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
PVViewer_Behaviors.h
PVViewer_GUIElements.h
)
-
+
SET(pl_OTHER_HEADERS
PVViewer_Core.h
)
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"
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)
-// Copyright (C) 2010-2016 CEA/DEN, EDF R&D
+// Copyright (C) 2010-2015 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
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);
-// Copyright (C) 2010-2016 CEA/DEN, EDF R&D
+// Copyright (C) 2010-2015 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
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; }
QMenu* sourcesMenu;
QMenu* filtersMenu;
QMenu* macrosMenu;
-#ifdef PVCATALYST_ENABLED
- QMenu* catalystMenu;
-#endif
// Toolbars also need to be instanciated early:
QToolBar* mainToolBar;