MeVisLab Scripting Reference
MATEDocument Class Reference

Inherits QObject.

Public Slots

MATE Script Interface


QTextCursor textCursor ()
 
void setTextCursor (const QTextCursor &textCursor)
 
QTextCursor enlargeSelectionToFullLines ()
 
void gotoLine (int line)
 
QString filename ()
 
void close ()
 
bool isModified ()
 
bool askToSave (const QString &dialogText, const QString &informativeText, bool showDiscardButton)
 
MLABTextEditBase * internalTextEdit ()
 

Detailed Description

MATEDocument provides script access to a document in MATE. It is not available in MeVisLab and should be used in user scripts.

Member Function Documentation

◆ 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

Returns the filename.

◆ 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