|
ManiVault 1.0.0
A Flexible and Extensible Visual Analytics Framework for High-Dimensional Data
|
#include <HierarchyWidget.h>
Public Member Functions | |
| HierarchyWidget (QWidget *parent, const QString &itemTypeName, const QAbstractItemModel &model, QSortFilterProxyModel *filterModel=nullptr, bool showToolbar=true, bool showOverlay=true) | |
| QString | getItemTypeName () const |
| void | setItemTypeName (const QString &itemTypeName) |
| void | setWindowIcon (const QIcon &icon) |
| void | setNoItemsDescription (const QString &noItemsDescription) |
| bool | getHeaderHidden () const |
| void | setHeaderHidden (bool headerHidden) |
| const QAbstractItemModel & | getModel () |
| QSortFilterProxyModel * | getFilterModel () |
| QItemSelectionModel & | getSelectionModel () |
| HierarchyWidgetTreeView & | getTreeView () |
| InfoOverlayWidget * | getInfoOverlayWidget () |
| StringAction & | getFilterNameAction () |
| OptionAction & | getFilterColumnAction () |
| GroupAction & | getFilterGroupAction () |
| ToggleAction & | getFilterRegularExpressionAction () |
| ToggleAction & | getFilterCaseSensitiveAction () |
| TriggerAction & | getExpandAllAction () |
| TriggerAction & | getCollapseAllAction () |
| GroupAction & | getSelectionGroupAction () |
| GroupAction & | getColumnsGroupAction () |
| GroupAction & | getSettingsGroupAction () |
| QModelIndex | toSourceModelIndex (const QModelIndex &modelIndex) const |
| QModelIndexList | getSelectedRows () const |
| QModelIndexList | fetchFilterModelIndices (QModelIndex filterModelIndex=QModelIndex()) const |
| HorizontalGroupAction & | getToolbarAction () |
Protected Member Functions | |
| bool | mayExpandAll () const |
| void | expandAll () |
| bool | mayCollapseAll () const |
| void | collapseAll () |
| bool | maySelectAll () const |
| void | selectAll () |
| bool | maySelectNone () const |
| void | selectNone () |
| void | updateHeaderVisibility () |
Base widget for displaying a hierarchical model in a tree view
It sets up the tree view and links up the filter and selection models.
Features a toolbar for interaction with the model built with actions:
In addition, it shows an overlay widget (with icon, title and description) when no items are loaded or filtering did not yield any items.
| hdps::gui::HierarchyWidget::HierarchyWidget | ( | QWidget * | parent, |
| const QString & | itemTypeName, | ||
| const QAbstractItemModel & | model, | ||
| QSortFilterProxyModel * | filterModel = nullptr, |
||
| bool | showToolbar = true, |
||
| bool | showOverlay = true |
||
| ) |
Constructor
| parent | Parent widget |
| itemTypeName | Type name of the item (e.g. dataset or action) |
| model | Reference to input model |
| filterModel | Pointer to input filter model (if present) |
| showToolbar | Whether to add a default toolbar for filtering and expand/collapse |
| showOverlay | Whether to show an overlay when the (filter) model is empty |
|
protected |
Collapse all items in the hierarchy
|
protected |
Expand all items in the hierarchy
| QModelIndexList hdps::gui::HierarchyWidget::fetchFilterModelIndices | ( | QModelIndex | filterModelIndex = QModelIndex() | ) | const |
Fetches filter model indices of filterModelIndex and its children recursively
| filterModelIndex | Filter model index |
|
inline |
Get collapse all action
|
inline |
Get columns group action
|
inline |
Get expand all action
|
inline |
Get filter case sensitive action
|
inline |
Get filter column action
|
inline |
Get filter group action
|
inline |
Set input model to model
| model | Input model Get input filter model |
|
inline |
Get filter name action
|
inline |
Get filter regular expression action
| bool hdps::gui::HierarchyWidget::getHeaderHidden | ( | ) | const |
Get whether the header view is visible or not
|
inline |
Get overlay widget
| QString hdps::gui::HierarchyWidget::getItemTypeName | ( | ) | const |
Get item type name
|
inline |
Get input model
| QModelIndexList hdps::gui::HierarchyWidget::getSelectedRows | ( | ) | const |
Get selected rows
|
inline |
Get selection group action
|
inline |
Get selection model
|
inline |
Get selection group action
|
inline |
|
inline |
Get tree view widget
|
protected |
Get whether one or more items may be collapse
|
protected |
Get whether one or more items may be expanded
|
protected |
Get whether all items may be selected
|
protected |
Get whether one (or more) items can be de-selected
|
protected |
Select all items in the hierarchy
|
protected |
Deselect all selected items in the hierarchy
| void hdps::gui::HierarchyWidget::setHeaderHidden | ( | bool | headerHidden | ) |
Set whether the header view is visible or not
| headerHidden | Boolean determining whether the header view is visible or not |
| void hdps::gui::HierarchyWidget::setItemTypeName | ( | const QString & | itemTypeName | ) |
Set item type name to itemTypeName
| void hdps::gui::HierarchyWidget::setNoItemsDescription | ( | const QString & | noItemsDescription | ) |
Set overlay widget description when no items are loaded
| noItemsDescription | Overlay widget description when no items are loaded |
| void hdps::gui::HierarchyWidget::setWindowIcon | ( | const QIcon & | icon | ) |
Override set window icon to update the overlay icons as well
| icon | Window icon |
| QModelIndex hdps::gui::HierarchyWidget::toSourceModelIndex | ( | const QModelIndex & | modelIndex | ) | const |
Maps a model index to source model index
| modelIndex | Model index to map |
|
protected |
Updates the visibility of the header