5 #ifndef pqPythonFileIO_h 6 #define pqPythonFileIO_h 65 bool openFile(
const QString& filename, vtkTypeUInt32
location = 0x10 );
75 const QString&
getFilename()
const {
return this->File.Name; }
80 vtkTypeUInt32
getLocation()
const {
return this->File.Location; }
96 void fileOpened(
const QString&);
101 void fileSaved(
const QString&);
107 void contentChanged();
113 void setModified(
bool modified);
141 PythonFile() =
default;
143 PythonFile(
const QString& str,
const vtkTypeUInt32
location, QTextEdit* textEdit)
150 bool operator!=(
const PythonFile& other)
const {
return this->Name != other.Name; }
152 bool writeToFile()
const;
154 bool readFromFile(QString& str)
const;
158 void removeSwap()
const;
161 vtkTypeUInt32 Location = 0x10 ;
162 QTextEdit*
Text =
nullptr;
165 bool saveBuffer(
const QString& file, vtkTypeUInt32
location);
172 QString DefaultSaveDirectory = QDir::homePath();
175 #endif // pqPythonFileIO_h
vtkTypeUInt32 getLocation() const
Returns the location of the file that the editor acts on.
const QString & getFilename() const
Returns the filename the editor acts on.
void save(Archiver &ar, const vtkUnicodeString &str, const unsigned int vtkNotUsed(version))
VTKCOMMONCORE_EXPORT bool operator!=(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
void setDefaultSaveDirectory(const QString &dir)
Sets the default save directory.