#include <mlabTextEditorScriptAccess.h>
Inherits QObject.
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 he either saved it or wants 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 complete line in which 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 require 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
◆ textCursor
QTextCursor MATEDocument::textCursor |
( |
| ) |
|
|
slot |
Returns the text cursor.
- See also
- Qt documentation of QTextCursor