/*!
\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;
}