MCPcopy Create free account
hub / github.com/Kitware/ParaView / loadStateFromPythonFile

Method loadStateFromPythonFile

Qt/ApplicationComponents/pqPVApplicationCore.cxx:225–247  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

223
224//-----------------------------------------------------------------------------
225void pqPVApplicationCore::loadStateFromPythonFile(
226 const QString& filename, pqServer* server, vtkTypeUInt32 location)
227{
228#if VTK_MODULE_ENABLE_ParaView_pqPython
229 Q_EMIT this->aboutToReadState(filename);
230
231 pqPythonManager* pythonMgr = this->pythonManager();
232 this->clearViewsForLoadingState(server);
233 // comment in pqApplicationCore says this->LoadingState is unreliable, but it is still
234 // necessary to avoid warning messages
235 this->LoadingState = true;
236 pythonMgr->executeScriptAndRender(filename, location);
237 this->LoadingState = false;
238
239 Q_EMIT this->stateLoaded(nullptr, nullptr);
240#else
241 // Avoid unused parameter warnings
242 (void)filename;
243 (void)server;
244 (void)location;
245 qCritical() << "Cannot load a python state file since ParaView was not built with Python.";
246#endif
247}
248
249//-----------------------------------------------------------------------------
250void pqPVApplicationCore::instantiateLiveSourceManager()

Callers 1

loadStateMethod · 0.80

Calls 3

pythonManagerMethod · 0.95

Tested by

no test coverage detected