X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FPVGUI%2FPVGUI_Module.cxx;h=2d77ea12b26912d8e06261bdfb8f7893b9d1b292;hb=b72346ef0cb0dafafebe30ccb12d57e2652864bb;hp=9c2853919157d86568350d105f189af1493db55a;hpb=1f06dfe3d17b83750bef2a7b5d45760ab57bf68b;p=modules%2Fparavis.git diff --git a/src/PVGUI/PVGUI_Module.cxx b/src/PVGUI/PVGUI_Module.cxx index 9c285391..2d77ea12 100644 --- a/src/PVGUI/PVGUI_Module.cxx +++ b/src/PVGUI/PVGUI_Module.cxx @@ -114,7 +114,7 @@ #include #include #include -#include +//#include #include #include #include @@ -124,11 +124,18 @@ #include #include #include +#include +#include +#include +#include +#include #include #include +#include + #include CORBA_SERVER_HEADER(SALOME_ModuleCatalog) /* @@ -138,18 +145,18 @@ * collect. */ -#include -#include -#include -#include -#include -#include -#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include -#include -#include -#include -#include +//#include +//#include +//#include +//#include #include #include @@ -326,7 +333,6 @@ void paravisCleanUp() */ PVGUI_Module::PVGUI_Module() : SalomeApp_Module( "PARAVIS" ), - LightApp_Module( "PARAVIS" ), // Implementation( 0 ), mySelectionControlsTb( -1 ), mySourcesMenuId( -1 ), @@ -370,6 +376,9 @@ PVGUI_Module::~PVGUI_Module() */ void PVGUI_Module::initialize( CAM_Application* app ) { + //VTN: Disable conflict with python initialization for MatPlot. + PVGUI_MatplotlibMathTextUtilities::Disable(); + SalomeApp_Module::initialize( app ); // Create ParaViS actions @@ -417,7 +426,9 @@ void PVGUI_Module::initialize( CAM_Application* app ) // * adds support for standard paraview views. pgm->addInterface(new pqStandardViewModules(pgm)); + //VTN TODO Paraview 3.98.0: Unresolved symbol _ZN36pqStandardSummaryPanelImplementationC1EP7QObject pgm->addInterface(new pqStandardSummaryPanelImplementation(pgm)); + pgm->addInterface(new pqStandardPropertyWidgetInterface(pgm)); // Load plugins distributed with application. pqApplicationCore::instance()->loadDistributedPlugins(); @@ -443,6 +454,8 @@ void PVGUI_Module::initialize( CAM_Application* app ) new pqPersistentMainWindowStateBehavior(aDesktop); new pqObjectPickingBehavior(aDesktop); new pqCollaborationBehavior(this); + new pqMultiServerBehavior(this); + new pqViewStreamingBehavior(this); // Setup quick-launch shortcuts. QShortcut *ctrlSpace = new QShortcut(Qt::CTRL + Qt::Key_Space, aDesktop); @@ -545,6 +558,15 @@ void PVGUI_Module::onDataRepresentationCreated(pqDataRepresentation* data) { if(lut_mgr) { lut_mgr->setScalarBarVisibility(data,visible); } + + connect(data, SIGNAL(dataUpdated()), this, SLOT(onDataRepresentationUpdated())); +} + +void PVGUI_Module::onDataRepresentationUpdated() { + SalomeApp_Study* activeStudy = dynamic_cast(application()->activeStudy()); + if(!activeStudy) return; + + activeStudy->Modified(); } void PVGUI_Module::onVariableChanged(pqVariableType t, const QString) { @@ -556,11 +578,6 @@ void PVGUI_Module::onVariableChanged(pqVariableType t, const QString) { if( t == VARIABLE_TYPE_NONE ) return; - pqDataRepresentation* data = colorWidget->getRepresentation(); - - if( !data->getLookupTable() ) - return; - SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr(); if(!aResourceMgr) @@ -571,12 +588,26 @@ void PVGUI_Module::onVariableChanged(pqVariableType t, const QString) { if(!visible) return; + /*//VTN: getRepresentation is protected + pqDataRepresentation* data = colorWidget->getRepresentation(); + + if( !data->getLookupTable() ) + return; + pqLookupTableManager* lut_mgr = pqApplicationCore::instance()->getLookupTableManager(); if(lut_mgr) { lut_mgr->setScalarBarVisibility(data,visible); } - + */ + pqColorToolbar* colorTooBar = qobject_cast(colorWidget->parent()); + if( !colorTooBar ) + return; + + pqScalarBarVisibilityReaction* scalarBarVisibility = colorTooBar->findChild(); + if(scalarBarVisibility) { + scalarBarVisibility->setScalarBarVisibility(visible); + } } @@ -669,6 +700,7 @@ bool PVGUI_Module::pvInit() return false; } + /* VTN: Looks like trash. For porting see branded_paraview_initializer.cxx.in // Not sure why this is needed. Andy added this ages ago with comment saying // needed for Mac apps. Need to check that it's indeed still required. QDir dir(QApplication::applicationDirPath()); @@ -688,7 +720,7 @@ bool PVGUI_Module::pvInit() plugin_string = ""; plugin_list = plugin_string.split(';',QString::SkipEmptyParts); loader.loadPlugins(plugin_list, true); //quietly skip not-found plugins. - + */ // End of Initializer code vtkOutputWindow::SetInstance(PVGUI_OutputWindowAdapter::New());