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

Method openFile

Qt/Python/pqPythonFileIO.cxx:210–232  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

208
209//-----------------------------------------------------------------------------
210bool pqPythonFileIO::openFile(const QString& filename, vtkTypeUInt32 location)
211{
212 if (!this->saveOnClose())
213 {
214 return false;
215 }
216
217 const PythonFile file(filename, location, &this->TextEdit);
218 QString fileContent;
219 if (!file.readFromFile(fileContent))
220 {
221 return false;
222 }
223
224 this->File = file;
225 this->File.start();
226
227 this->TextEdit.setPlainText(fileContent);
228 this->setModified(false);
229 this->fileOpened(filename);
230
231 return true;
232}
233
234//-----------------------------------------------------------------------------
235bool pqPythonFileIO::save()

Callers 1

addNewTextAreaMethod · 0.45

Calls 4

saveOnCloseMethod · 0.95
setModifiedMethod · 0.95
readFromFileMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected