|
MLABTreeView * | _listview |
|
MLABScriptListViewModel * | _mainModel |
|
MLABSortFilterProxyModel * | _sortModel |
|
MLABExtendedItemDelegate * | _paintDelegate |
|
QMenu * | _popup |
|
QPointer< MLABField > | _toggle |
|
bool | _contextMenuOnEmptyList |
|
void | setSelectionChangedDisabled (bool disabled) |
|
QModelIndex | indexForItem (const MLABListViewItem *item, int column=0) const |
|
MLABListViewItem * | itemForIndex (const QModelIndex &index) const |
|
MLABSortFilterProxyModel * | sortModel () const |
|
MLABTreeView * | listView () const |
|
MLABListViewItem * | itemForId (int id) |
|
QList< MLABListViewItem * > | topLevelItems () const |
|
MLABListViewItem * | firstItem () const |
|
MLABListViewItem * | firstChild () const |
|
MLABListViewItem * | lastItem () const |
|
void | ensureItemVisible (MLABListViewItem *item, bool positionAtCenter=false) |
|
MLABListViewItem * | selectedItem () const |
|
QList< MLABListViewItem * > | selectedItems () const |
|
void | resizeColumnsToContents () |
|
void | setSelected (MLABListViewItem *item, bool selected) |
|
bool | isSelected (MLABListViewItem *item) |
|
void | setAlternatingRowColors (bool enable) |
|
QVariantList | selectedItemIds () |
|
QVariantList | checkedItemIds () |
|
QList< MLABListViewItem * > | checkedItems () |
|
void | clearSelection () |
|
MLABListViewItem * | currentItem () const |
|
void | setCurrentItem (MLABListViewItem *item) |
|
void | setColumnAlignment (int column, Alignment alignment) |
|
void | setColumnWidth (int column, int w) |
|
void | setColumnPixmapFile (int column, const QString &file) |
|
void | setColumnText (int column, const QString &text) |
|
QString | columnText (int column) |
|
void | setSorting (int column, bool ascending) |
|
int | sortColumn () const |
|
bool | isSortOrderAscending () const |
|
void | addColumn (const QString &label) |
|
void | removeColumn (int idx) |
|
int | columnCount () |
|
void | hideColumn (int column) |
|
void | showColumn (int column) |
|
bool | isColumnHidden (int column) |
|
void | removeColumns () |
|
void | clearItems () |
|
void | removeItem (MLABListViewItem *item) |
|
MLABListViewItem * | appendItem (const QStringList &texts=QStringList()) |
|
MLABListViewItem * | appendItem (MLABListViewItem *parent, const QStringList &texts=QStringList()) |
|
MLABListViewItem * | insertItem () |
|
MLABListViewItem * | insertItem (MLABListViewItem *after) |
|
MLABListViewItem * | insertItem (const QStringList &texts) |
|
MLABListViewItem * | insertItem (MLABListViewItem *after, const QStringList &texts) |
|
MLABListViewItem * | insertItem (MLABListViewItem *parent, MLABListViewItem *after) |
|
MLABListViewItem * | insertItem (MLABListViewItem *parent, MLABListViewItem *after, const QStringList &texts) |
|
MLABListViewItem * | insertCheckBoxItem () |
|
MLABListViewItem * | insertRadioControllerItem () |
|
MLABListViewItem * | insertRadioItem (MLABListViewItem *after) |
|
MLABListViewItem * | insertCheckBoxItem (MLABListViewItem *after) |
|
MLABListViewItem * | insertRadioControllerItem (MLABListViewItem *after) |
|
MLABListViewItem * | insertRadioItem (MLABListViewItem *parent, MLABListViewItem *after) |
|
MLABListViewItem * | insertCheckBoxItem (MLABListViewItem *parent, MLABListViewItem *after) |
|
MLABListViewItem * | insertRadioControllerItem (MLABListViewItem *parent, MLABListViewItem *after) |
|
void | setRootIsDecorated (bool flag) |
|
void | setStringEditorValues (const QStringList &values, int flags=0) |
|
void | setItemFilter (int column, const QString &pattern, bool caseSensitive=true, bool keepParents=false) |
|
void | unsetItemFilter () |
|
void | setSizeHint (const QSize &size) override |
|
void | beginInsertItems (int itemCount) |
|
void | beginInsertItems (MLABListViewItem *parent, int itemCount) |
|
void | endInsertItems () |
|
MLABListViewItem * | insertCheckBoxItem (MLABListViewItem *parent, int) |
|
MLABListViewItem * | insertRadioItem (MLABListViewItem *parent, int) |
|
MLABListViewItem * | insertRadioControllerItem (MLABListViewItem *parent, int) |
|
MLABListViewItem * | insertItem (MLABListViewItem *parent, int) |
|
MLABListViewItem * | insertItem (MLABListViewItem *parent, int, const QStringList &texts) |
|
MLABListViewItem * | insertItem (int) |
|
MLABListViewItem * | insertItem (int, const QStringList &texts) |
|
void | fieldChanged () |
|
void | toggleFieldChanged () |
|
void | updateToggleField (MLABListViewItem *item) |
|
void | contextMenu (const QPoint &pos) |
|
void | slotExpanded (const QModelIndex &) |
|
void | slotCollapsed (const QModelIndex &) |
|
void | slotCurrentChanged (const QModelIndex &) |
|
void | slotDoubleClicked (const QModelIndex &) |
|
void | slotReturnPressed () |
|
void | slotClicked (const QModelIndex &) |
|
void | slotMouseButtonClicked (int button, const QPoint &p) |
|
void | slotSelectionChanged () |
|
void | slotPrepareEdit (const QModelIndex &) |
|
void | slotPressed (const QModelIndex &) |
|
void | delayedFieldUpdate () |
|
void | prePaintUpdate () |
|
void | selectionChanged () |
|
void | currentChanged (MLABListViewItem *) |
|
void | doubleClicked (MLABListViewItem *) |
|
void | returnPressed (MLABListViewItem *) |
|
void | itemRenamed (MLABListViewItem *, int, const QString &) |
|
void | collapsed (MLABListViewItem *) |
|
void | expanded (MLABListViewItem *) |
|
void | checkListItemChanged (MLABListViewItem *, int column) |
|
void | clicked (MLABListViewItem *i, int column) |
|
void | mouseButtonClicked (int button, MLABListViewItem *item, const QPoint &position, int column) |
|
void | contextMenuRequested (MLABListViewItem *item, const QPoint &position, int column) |
|
void | prepareEdit (MLABListViewItem *, int column) |
|
void | pressed (MLABListViewItem *item, int column, int button) |
|
void | sortingChanged (int column, bool ascending) |
|
void | addDefaultTagValues (MLABTree *tree) const override |
|
void | needsPrePaintUpdate () |
|
MLABListViewItem * | createInternalItem (MLABListViewItem *parent, MLABListViewItem *after) |
|
|
void | adjustSize () |
|
virtual void | setEnabled (bool flag) |
|
virtual void | setVisible (bool flag) |
|
virtual bool | isVisible () |
|
virtual void | setFocus () |
|
virtual bool | hasFocus () |
|
virtual void | setToolTip (const QString &string) |
|
virtual void | setWhatsThis (const QString &string) |
|
void | displayWhatsThis () |
|
void | displayWhatsThis (const QString &text) |
|
virtual void | setTitle (const QString &) |
|
QWidget * | widget () |
|
QLayout * | layout () |
|
virtual QString | windowHandle () |
|
virtual bool | createScreenshot (const QString &filename, bool grabFromScreen=true, bool scaleToLowRes=false) |
|
bool | isReloadable () const |
|
void | reload (MLABTree *tree) |
|
QString | createGlobalScreenshot () |
|
QString | applicationName () |
|
QSize | size () |
|
int | width () |
|
int | height () |
|
int | minWidth () |
|
int | minHeight () |
|
int | maxWidth () |
|
int | maxHeight () |
|
virtual void | setMinWidth (int s) |
|
virtual void | setMinHeight (int s) |
|
void | setMaxWidth (int s) |
|
void | setMaxHeight (int s) |
|
QSize | sizeHint () |
|
QSize | minSize () |
|
QSize | maxSize () |
|
void | setMinSize (QSize size) |
|
void | setMaxSize (QSize size) |
|
void | updateLayout () |
|
int | windowID () |
|
MLABWidgetControl * | control (const QString &name) |
|
float | scaleFactor () |
|
MLABModule * | module () |
|
QString | getType () |
|
QString | getName () |
|
bool | acceptDrops () |
|
void | setAcceptDrops (bool flag) |
|
void | raiseWidget () |
|
void | setStyleSheetFromString (const QString &styleSheetText) |
|
void | setStyleSheetFromFile (const QString &styleSheetFileName) |
|
MLABTree * | tree () |
|
void | updateMaxSize () |
|
bool | expandX () |
|
bool | expandY () |
|
MLABTreePtr | getDefaultTagValues () const |
|
virtual bool | hasUncommittedChanges () const |
|
virtual void | applyUncommittedChanges () |
|
virtual void | revertUncommittedChanges () |
|
MLABField * | field () const |
|
virtual QString | py_toString () |
|
bool | createScreenshot (QWidget *widget, const QString &filename, int x=0, int y=0, int w=-1, int h=-1, bool grabFromScreen=true, bool scaleToLowRes=false) |
|
void | setStyle (MLABStyle *proto) |
|
MLABStyle * | style () |
|
QString | buildTitleString (MLABField *optionalField, bool splitUppercase, TitleType *resultTitleType=nullptr) |
|
void | evaluateVisibleOnExpression () |
|
static bool | showMDLFileForWidget (QWidget *w) |
|
static bool | showHelpContextMenuForWidget (QWidget *w) |
|
static QKeySequence | getKeySequence (const MLABTree *attrib) |
|
static QString | trimString (const QString &s, QWidget *w, trim mode) |
|
void | emitResizeCommand () |
|
void | updateEnabledState () |
|
void | setVisibleDelayed (bool visible) |
|
void | tooltipFieldChanged () |
|
void | setupEditedField () |
|
virtual void | internalReload () |
|
void | addDefaultTagValue (MLABTree *tree, const QString &tagName, const QString &tagValue) const |
|
void | addDefaultTagValue (MLABTree *tree, const QString &tagName, const char *tagValue) const |
|
void | addDefaultTagValue (MLABTree *tree, const QString &tagName, bool tagValue) const |
|
void | addDefaultTagValue (MLABTree *tree, const QString &tagName, int tagValue) const |
|
void | addDefaultTagValue (MLABTree *tree, const QString &tagName, unsigned int tagValue) const |
|
void | addDefaultTagValue (MLABTree *tree, const QString &tagName, float tagValue) const |
|
void | addDefaultTagValue (MLABTree *tree, const QString &tagName, double tagValue) const |
|
bool | verifyThatParentsHaveDifferentAlignGroups (const QString &alignGroup, bool isXAlign) |
|
MLABField * | lookupField (const QString fieldname, MLABTree *tree, const char *classname=nullptr, bool warn=true) |
|
QPixmap | readPixmap (MLABTree *tree) |
|
QPixmap | readPixmap (const QString &filename) |
|
QPixmap | readPixmap (MLABTree *tree, float scale) |
|
QPixmap | readPixmap (const QString &filename, float scale) |
|
QImage | readImage (MLABTree *tree, float scale) |
|
QImage | readImage (const QString &filename, float scale) |
|
void | updateMaxSize (bool maygrow) |
|
QString | trimString (const QString &s, QWidget *w) |
|
void | setupScaleFactor () |
|
QString | uniqueGroupString () |
|
bool | createIconSet (QIcon &icon, QAbstractButton *button=nullptr, bool autoScale=false) |
|
bool | createIconSetPixmap (QIcon &iconset, const QString &name, QIcon::Mode mode, QIcon::State state, bool resize=false, QSize *scaleSize=nullptr) |
|
bool | createIconSet (MLABTree *tree, QIcon &icon, QAbstractButton *button=nullptr, bool autoScale=false) |
|
bool | createIconSetPixmap (MLABTree *tree, QIcon &iconset, const QString &name, QIcon::Mode mode, QIcon::State state, bool resize=false, QSize *scaleSize=nullptr) |
|
QSize | defaultIconSize () |
|
virtual void | applyStyle () |
|
QString | loadStyleSheetFile (const QString &styleSheetFileName) |
|
static QString | loadTextFileWithReplacedMDLVariables (const QString &filename) |
|
static bool | shouldExpandCheck (MLABTree *t) |
|
static QString | removeStyleSheetComments (const QString &style) |
|
struct MLABWidgetControl::__flags | _flags |
|
MLABTreePtr | _tree |
|
MLABTreePtr | _prototype |
|
MLABStylePtr | _style |
|
QWidget * | _widget |
|
int | _windowId |
|
float | _scale |
|
MLABWidgetControlContextInfo * | _info |
|
int | _controlType |
|
QString | _alignGroupX |
|
QString | _alignGroupY |
|
QString | _alignGroupLabels |
|
QString | _alignChildX |
|
QString | _alignChildY |
|
int | _maxColIndex |
|
int | _maxRowIndex |
|
int | _layoutXDepth |
|
int | _layoutYDepth |
|
QPointer< MLABModule > | _module |
|
QPointer< MLABField > | _field |
|
QPointer< MLABField > | _tooltipField |
|
MLABFieldExpressionEvaluator * | _visibleOnEvaluator |
|
trim | _trim |
|
bool | _isReloadable |
|
static MLABTreePtr | _currentAttrib |
|
static int | _uniqAlignGroupCounter |
|
static const bool | expandXDefault = false |
|
static const bool | expandYDefault = false |
|
static const QString | alignXDefault |
|
static const QString | alignYDefault |
|
static const QString | bgModeDefault |
|
static const QString | editBgModeDefault |
|
static const QString | buttonBgModeDefault |
|
static const int | colspanDefault = 1 |
|
ListView control.
Control for showing a ListView. It can be controlled and filled with content via a field or the values tag. If the items are filled via a given field or the value tag, the item ids are guaranteed to be numbered starting from 0 (without the header column).
ListView can also be controlled manually by using Scripting. It offers creation of any number of columns and creating/removing items on the fly. It also allows to create a tree view in the first column by using insertChildItem().
The interface to access content of individual items is given in MLABListViewItem.
Inserting and Adding Items
If the list view is filtered or sorted, then beginInsertItems() and endInsertItems() should be called before and after adding or inserting items. If they are not called, the filtering and sorting will not be immediately applied to the new items.
For more details see the Qt documentation of QAbstractItemModel::beginInsertRows().
Here is an example:
listView.beginInsertItems(3)
listView.appendItem(["item0"])
listView.appendItem(["item1"])
listView.appendItem(["item2"])
listView.endInsertItems()
parentItem = ...
listView.beginInsertItems(parentItem, 2)
listView.appendItem(parentItem, ["subitem0"])
listView.appendItem(parentItem, ["subitem1"])
listView.endInsertItems()
listView.beginInsertItems(1)
parentItem = listView.appendItem(["item0"])
listView.appendItem(parentItem, ["subitem0"])
listView.appendItem(parentItem, ["subitem0"])
listView.endInsertItems()