-----------------------------------------------------------------------------
| 208 | |
| 209 | //----------------------------------------------------------------------------- |
| 210 | bool 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 | //----------------------------------------------------------------------------- |
| 235 | bool pqPythonFileIO::save() |
no test coverage detected