Handles loading (resp.
More...
#include <pqPythonFileIO.h>
Inherits QObject.
Handles loading (resp.
saving) from (resp. to) the disk to (resp. from) a QTextEdit widget.
Definition at line 28 of file pqPythonFileIO.h.
◆ pqPythonFileIO() [1/2]
pqPythonFileIO::pqPythonFileIO |
( |
| ) |
|
|
delete |
Default constructor is not valid for this class.
◆ pqPythonFileIO() [2/2]
pqPythonFileIO::pqPythonFileIO |
( |
QWidget * |
parent, |
|
|
QTextEdit & |
text |
|
) |
| |
Construct a pqPythonFileIO.
- Parameters
-
[in] | parent | the parent for the Qt hierarchy |
[in] | text | the QTextEdit this object acts on |
◆ ~pqPythonFileIO()
pqPythonFileIO::~pqPythonFileIO |
( |
| ) |
|
|
override |
Destroy this object.
Effectively clears the swap created by this class
◆ saveOnClose()
bool pqPythonFileIO::saveOnClose |
( |
| ) |
|
Saves and close the underlying file.
- Returns
- true if the saving process was successful, false if the user discarded the saves or if something wrong happened during file I/O
◆ openFile()
bool pqPythonFileIO::openFile |
( |
const QString & |
filename, |
|
|
vtkTypeUInt32 |
location = 0x10 |
|
) |
| |
Opens and load the given file.
- Parameters
-
[in] | filename | the file to be opened |
[in] | location | the location of the file |
- Returns
- false if the file is invalid
◆ setDefaultSaveDirectory()
void pqPythonFileIO::setDefaultSaveDirectory |
( |
const QString & |
dir | ) |
|
|
inline |
◆ getFilename()
const QString& pqPythonFileIO::getFilename |
( |
| ) |
const |
|
inline |
◆ getLocation()
vtkTypeUInt32 pqPythonFileIO::getLocation |
( |
| ) |
const |
|
inline |
Returns the location of the file that the editor acts on.
Definition at line 80 of file pqPythonFileIO.h.
◆ isDirty()
bool pqPythonFileIO::isDirty |
( |
| ) |
const |
Returns true if the buffer content has been saved on the disk.
◆ bufferErased
void pqPythonFileIO::bufferErased |
( |
| ) |
|
|
signal |
Signals that the QTextEdit buffer has been erased.
◆ fileOpened
void pqPythonFileIO::fileOpened |
( |
const QString & |
| ) |
|
|
signal |
Signals that a file has been opened.
◆ fileSaved
void pqPythonFileIO::fileSaved |
( |
const QString & |
| ) |
|
|
signal |
Signals that the file has been saved.
◆ contentChanged
void pqPythonFileIO::contentChanged |
( |
| ) |
|
|
signal |
Emitted when the content of the buffer has changed.
◆ setModified
void pqPythonFileIO::setModified |
( |
bool |
modified | ) |
|
|
slot |
Change the buffer status to modified.
◆ save
bool pqPythonFileIO::save |
( |
| ) |
|
|
slot |
Saves the underlying file.
If no file is associated, ask the user which file to save this buffer in
◆ saveAs
bool pqPythonFileIO::saveAs |
( |
| ) |
|
|
slot |
Saves the current file under a new file and opens it in the editor.
◆ saveAsMacro
bool pqPythonFileIO::saveAsMacro |
( |
| ) |
|
|
slot |
Saves the current file under the macro directory.
◆ saveAsScript
bool pqPythonFileIO::saveAsScript |
( |
| ) |
|
|
slot |
Saves the current file under the script directory.
The documentation for this class was generated from the following file: