MeVisLab Scripting Reference
MATEDocument Class Reference

List of all members.

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

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.

void MATEDocument::close ( ) [slot]

Closes the document without asking the user for saving changes.

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.

QString MATEDocument::filename ( ) [slot]

Returns the filename.

void MATEDocument::gotoLine ( int  line) [slot]

Scrolls to the given line.

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)

bool MATEDocument::isModified ( ) [slot]

Returns whether the document is modified.

void MATEDocument::setTextCursor ( const QTextCursor &  textCursor) [slot]

Sets the text cursor.

See also:
Qt documentation of QTextCursor
QTextCursor MATEDocument::textCursor ( ) [slot]

Returns the text cursor.

See also:
Qt documentation of QTextCursor