#include <mlabTextEditorScriptAccess.h>
MATEDocument provides script access to a document in MATE. It is not available in MeVisLab and should be used in user scripts.
◆ askToSave
| bool MATEDocument::askToSave |
( |
const QString & | dialogText, |
|
|
const QString & | informativeText, |
|
|
bool | showDiscardButton ) |
|
slot |
Asks the user to save the document and returns whether they either saved it or chose to discard the changes.
◆ close
| void MATEDocument::close |
( |
| ) |
|
|
slot |
Closes the document without asking the user for saving changes.
◆ enlargeSelectionToFullLines
| QTextCursor MATEDocument::enlargeSelectionToFullLines |
( |
| ) |
|
|
slot |
Returns a text cursor that expands the current selection to full lines. If there was no selection, the entire line where the cursor is located is selected.
◆ filename
| QString MATEDocument::filename |
( |
| ) |
|
|
slot |
◆ gotoLine
| void MATEDocument::gotoLine |
( |
int | line | ) |
|
|
slot |
Scrolls to the given line.
◆ internalTextEdit
| MLABTextEditBase * MATEDocument::internalTextEdit |
( |
| ) |
|
|
slot |
Returns the internal text editor. Note: The API of the internal text editor might change over time, so only use it if you really need to.
◆ isModified
| bool MATEDocument::isModified |
( |
| ) |
|
|
slot |
Returns whether the document is modified.
◆ setTextCursor
| void MATEDocument::setTextCursor |
( |
const QTextCursor & | textCursor | ) |
|
|
slot |
Sets the text cursor.
- See also
- Qt documentation of QTextCursor
References textCursor().
◆ textCursor
| QTextCursor MATEDocument::textCursor |
( |
| ) |
|
|
slot |
Returns the text cursor.
- See also
- Qt documentation of QTextCursor
Referenced by setTextCursor().