MeVisLab Scripting Reference
|
Inherits QObject.
Public Member Functions | |
CheckBox scripting access. | |
bool | isCheckBox () const |
bool | isOn (int column=0) const |
void | setOn (bool flag) |
void | setCheckBoxOn (int column, bool flag) |
void | setAutomaticCheckBox (int column, bool flag=true) |
Deprecated | |
void | setOpen (bool flag) |
bool | isOpen () const |
void | setRenameEnabled (int column, bool flag) |
bool | isRenameEnabled (int column) const |
void | startRename (int column) |
Scripting access. | |
QString | text (int column) const |
QStringList | texts () const |
void | setText (int column, const QString &text) |
void | setTexts (const QStringList &list) |
QVariant | value (int column) const |
QVariantList | values () const |
void | setValue (int column, const QVariant &value) |
void | setValues (const QVariantList &list) |
void | setPixmapFile (int column, const QString &pixmapfile) |
void | setPixmap (int column, const QPixmap &pixmap) |
bool | hasPixmap (int column) const |
QPixmap | pixmap (int column) const |
void | setForegroundColor (int column, const QColor &c) |
QColor | foregroundColor (int column) const |
void | setBackgroundColor (int column, const QColor &c) |
QColor | backgroundColor (int column) const |
void | setBoldFont (int column, bool bold=true) |
bool | isBoldFont (int column) |
void | setItalicFont (int column, bool italic=true) |
bool | isItalicFont (int column) |
void | setRelativeFontSize (int column, int relSize) |
void | setToolTip (int column, const QString &toolTip) |
QString | toolTip (int column) const |
void | setUserData (const QVariant &data) |
QVariant | userData () const |
int | childCount () const |
int | numChildren () const |
MLABListViewItem * | appendItem (const QStringList &texts) |
MLABListViewItem * | insertItem (MLABListViewItem *after, const QStringList &texts) |
QList< MLABListViewItem * > | children () const |
MLABListViewItem * | firstChild () |
MLABListViewItem * | nextSibling () |
MLABListViewItem * | parent () |
MLABListViewItem * | itemAbove () |
MLABListViewItem * | itemBelow () |
void | setEnabled (bool b) |
bool | isEnabled () const |
void | setMultiLinesEnabled (bool b) |
void | setVisible (bool flag) |
bool | isVisible () const |
void | setExpanded (bool flag) |
bool | isExpanded () const |
void | setSelected (bool flag) |
bool | isSelected () const |
void | setEditable (int column, bool flag) |
bool | isEditable (int column) const |
void | startEditing (int column) |
void | showChildren (bool flag) |
bool | isFiltered () const |
int | id () const |
A single ListView item which contains texts and images for each column used in an MLABListViewControl.
New items can be created via the insertItem() and insertChildItem() methods. You can use MLABListViewItem::setUserData() to store any Python object as part of the list view items.
MDL reference: ListView
Each item has a unique id within the ListViewControl, which can be get via id().
|
slot |
Appends a new child item to the end of the children list.
|
slot |
Returns the background color for the column, is invalid if not set.
|
slot |
Returns the number of child items.
|
slot |
Returns a list of the direct children.
|
inlineslot |
Returns first child if any, NULL otherwise.
|
slot |
Returns the foreground color for the column, is invalid if not set.
|
slot |
Returns whether item has pixmap.
|
inline |
Returns a unique integer id for this item (unique in this list view).
|
slot |
Inserts a new child item after the given item.
The after
item needs to have this item as its parent.
|
slot |
Returns if the font is bold.
|
inline |
Returns whether item is a check box or a radio item.
bool MLABListViewItem::isEditable | ( | int | column | ) | const |
Returns whether editing is enabled on the given column.
|
inlineslot |
Returns whether item is enabled.
bool MLABListViewItem::isExpanded | ( | ) | const |
Returns whether item is expanded (when it has children).
bool MLABListViewItem::isFiltered | ( | ) | const |
Returns whether the item is filtered away by a filter set on the control with setItemFilter.
setVisible, setOpen, setSelected will have no effect, isVisible, isOpen and isSelected will return false.
|
slot |
Returns if the font is italic.
bool MLABListViewItem::isOn | ( | int | column = 0 | ) | const |
Returns the checked state of the check box.
|
inline |
|
inline |
bool MLABListViewItem::isSelected | ( | ) | const |
Returns whether item is selected.
bool MLABListViewItem::isVisible | ( | ) | const |
Returns whether the item is visible (doesn't mean its visible on the screen at all).
|
slot |
Returns visible item above this item (only works if this item is visible), NULL otherwise.
|
slot |
Returns visible item below this item (only works if this item is visible), NULL otherwise.
|
inlineslot |
Returns next sibling.
|
inlineslot |
Returns the number of child items.
|
slot |
Returns parent if any, NULL otherwise.
|
slot |
Returns the pixmap at column.
void MLABListViewItem::setAutomaticCheckBox | ( | int | column, |
bool | flag = true |
||
) |
Makes given column an automatic check box representing its child item's check boxes in the same column.
A "partial" state may be displayed if child check boxes have different states. Clicking the check box will change its child item's states (as will a call to setOn or setCheckBoxOn).
Note: Because of their update behavior automatic check boxes will be slower if they have a lot of child items (quadratic behavior).
isOn will return whether any child item has a checked check box for automatic check boxes. The checkListItemChangedCommand will not be called for automatic check boxes, only for its children.
|
slot |
Sets background color for the column.
Use the Color class as argument under JavaScript, QColor under Python.
|
slot |
Sets the column to be displayed in bold font.
void MLABListViewItem::setCheckBoxOn | ( | int | column, |
bool | flag | ||
) |
Sets the checked state of the check box for any column (shows a new check box if there wasn't one yet).
void MLABListViewItem::setEditable | ( | int | column, |
bool | flag | ||
) |
Enables editing for given column of the item.
|
slot |
Enables the item (disabled items are grayed out).
void MLABListViewItem::setExpanded | ( | bool | flag | ) |
Sets whether item is expanded (when it has children).
|
slot |
Sets foreground color for the column.
Use the Color class as argument under JavaScript, QColor under Python.
|
slot |
Sets the column to be displayed in italic font.
void MLABListViewItem::setMultiLinesEnabled | ( | bool | b | ) |
Enables multi line texts.
void MLABListViewItem::setOn | ( | bool | flag | ) |
Sets the checked state of the check box.
|
inline |
|
slot |
Sets pixmap from pixmap for column.
|
slot |
Sets a pixmap from file for column.
|
slot |
Sets the column to be displayed in a smaller/larger font, according to relSize.
A relative size of 0 means unchanged.
|
inline |
void MLABListViewItem::setSelected | ( | bool | flag | ) |
Sets whether item is selected.
|
slot |
Sets the text for column.
|
slot |
Sets all texts from column 0 to n.
|
slot |
Sets the tool tip text for the column.
|
slot |
Sets a user data object.
This can store any QVariant, even a Python object provided by the caller.
|
slot |
Sets value for column - the value can be (practically) a string type or a numerical type.
|
slot |
Sets all values from column 0 to n.
void MLABListViewItem::setVisible | ( | bool | flag | ) |
Sets whether the item is visible.
void MLABListViewItem::showChildren | ( | bool | flag | ) |
Shows/hides the children of this item (default is that items are shown, new items that are added are always shown).
This has the same effect as calling setVisible(flag) on each child item.
void MLABListViewItem::startEditing | ( | int | column | ) |
Starts the editing by placing the cursor in the given column, only works if setEditable() was set to true for that column.
|
inline |
|
slot |
Returns the text for column.
|
slot |
Returns all texts from column 0 to n.
|
slot |
Returns the tool tip text for the column.
|
slot |
Returns user data object set by user.
|
slot |
Returns value for column.
|
slot |
Returns all values from column 0 to n.