MeVisLab Scripting Reference
MLABNoteItem Class Reference

#include <mlabNoteItem.h>

Inherits MLABNetworkModelItem.

Public Slots

Scripting methods
void setText (const QString &text)
void setReSTText (const QString &text, const QString &richText=QString())
void setTitle (const QString &title)
QColor backgroundColor () const
void setBackgroundColor (const QColor &color)
QString text () const
QString title () const
void setIsCollapsed (bool collapsed)
bool isCollapsed () const
void setTitleFrame (const QRect &titleFrame)
QRect titleFrame () const
void toggleCollapseExpand ()
void editTextWithDialog ()
void editColorWithDialog ()
void remove ()
QString groupName ()
void addToGroup (const QString &groupName)
void setDrawAsComment (bool drawAsComment)
bool drawAsComment () const
QString richText () const
Public Slots inherited from MLABNetworkModelItem
virtual void translateFrame (const QPoint &delta, bool notifyParent=true)
void translateChildrenFrames (const QPoint &delta, bool selectedOnly, bool notifyParent=true)
virtual void setFrame (const QRect &frame, bool notifyParent=true)
virtual QRect frame () const

Detailed Description

A network model item that is used for putting notes onto a network.

Member Function Documentation

◆ addToGroup

void MLABNoteItem::addToGroup ( const QString & groupName)
slot

Adds the item to the given group. If groupName is empty, the item is removed from any group it was in. If groupName does not yet exist, a new group with that name is created.

References groupName().

◆ backgroundColor

QColor MLABNoteItem::backgroundColor ( ) const
inlineslot

Returns the note's background color.

◆ drawAsComment

bool MLABNoteItem::drawAsComment ( ) const
inlineslot

Returns whether the note should be drawn as a network comment.

Referenced by setDrawAsComment().

◆ editColorWithDialog

void MLABNoteItem::editColorWithDialog ( )
slot

Shows color dialog for editing the color.

◆ editTextWithDialog

void MLABNoteItem::editTextWithDialog ( )
slot

Edits title and text with a dialog.

◆ groupName

QString MLABNoteItem::groupName ( )
slot

Returns the name of the group the item is in.

Referenced by addToGroup().

◆ isCollapsed

bool MLABNoteItem::isCollapsed ( ) const
inlineslot

Returns whether this note item is collapsed (or expanded).

◆ remove

void MLABNoteItem::remove ( )
slot

Deletes the note.

◆ richText

QString MLABNoteItem::richText ( ) const
inlineslot

Returns the note's generated rich text.

Referenced by setReSTText().

◆ setBackgroundColor

void MLABNoteItem::setBackgroundColor ( const QColor & color)
inlineslot

Sets the background color to the given color.

◆ setDrawAsComment

void MLABNoteItem::setDrawAsComment ( bool drawAsComment)
slot

Sets whether the note should be drawn as a network comment.

References drawAsComment().

◆ setIsCollapsed

void MLABNoteItem::setIsCollapsed ( bool collapsed)
inlineslot

Sets whether this note item is collapsed (or expanded).

Referenced by toggleCollapseExpand().

◆ setReSTText

void MLABNoteItem::setReSTText ( const QString & text,
const QString & richText = QString() )
slot

Sets the note's text in ReST/Sphinx format. If richText is empty, it will be generated by Sphinx.

References richText(), and text().

◆ setText

void MLABNoteItem::setText ( const QString & text)
slot

Sets the note's plain text.

References text().

◆ setTitle

void MLABNoteItem::setTitle ( const QString & title)
slot

Sets the note's title text.

References title().

◆ setTitleFrame

void MLABNoteItem::setTitleFrame ( const QRect & titleFrame)
inlineslot

Sets the title frame.

References titleFrame().

◆ text

QString MLABNoteItem::text ( ) const
inlineslot

Returns the note's text.

Referenced by setReSTText(), and setText().

◆ title

QString MLABNoteItem::title ( ) const
inlineslot

Returns the note's title text.

Referenced by setTitle().

◆ titleFrame

QRect MLABNoteItem::titleFrame ( ) const
inlineslot

Returns the title frame.

Referenced by setTitleFrame().

◆ toggleCollapseExpand

void MLABNoteItem::toggleCollapseExpand ( )
inlineslot

Toggles the current state of the collapsed or expanded.

References setIsCollapsed().