#include <Modules/Loadable/SubjectHierarchy/Widgets/qMRMLSubjectHierarchyTreeView.h>
|
QScopedPointer< qMRMLSubjectHierarchyTreeViewPrivate > | d_ptr |
|
◆ Superclass
◆ contextMenuEnabled
bool qMRMLSubjectHierarchyTreeView::contextMenuEnabled |
|
readwrite |
◆ editMenuActionVisible
bool qMRMLSubjectHierarchyTreeView::editMenuActionVisible |
|
readwrite |
This property controls whether the Edit properties context menu action is visible. Visible by default.
Definition at line 60 of file qMRMLSubjectHierarchyTreeView.h.
◆ highlightReferencedItems
bool qMRMLSubjectHierarchyTreeView::highlightReferencedItems |
|
readwrite |
◆ multiSelection
bool qMRMLSubjectHierarchyTreeView::multiSelection |
|
readwrite |
◆ showRootItem
bool qMRMLSubjectHierarchyTreeView::showRootItem |
|
readwrite |
This property controls whether the root item (folder, an item for a data node, or the scene itself), if any is visible. When the root item is visible, it appears as a top-level item, if it is hidden only its children are top-level items. It doesn't have any effect if rootItem() is invalid. Shown by default.
- See also
- setShowRootItem(), showRootItem(), setRootItem(), setRootIndex()
Definition at line 52 of file qMRMLSubjectHierarchyTreeView.h.
◆ qMRMLSubjectHierarchyTreeView()
qMRMLSubjectHierarchyTreeView::qMRMLSubjectHierarchyTreeView |
( |
QWidget * |
parent = 0 | ) |
|
◆ ~qMRMLSubjectHierarchyTreeView()
virtual qMRMLSubjectHierarchyTreeView::~qMRMLSubjectHierarchyTreeView |
( |
| ) |
|
|
virtual |
◆ applyReferenceHighlightForItems()
void qMRMLSubjectHierarchyTreeView::applyReferenceHighlightForItems |
( |
QList< vtkIdType > |
itemIDs | ) |
|
|
protected |
◆ clickDecoration()
virtual bool qMRMLSubjectHierarchyTreeView::clickDecoration |
( |
QMouseEvent * |
e | ) |
|
|
protectedvirtual |
Handles clicks on the decoration of items (i.e. icon). In visibility column this means either toggle visibility or show visibility context menu.
- Returns
- True if decoration of an enabled item was indeed clicked (and event handled). False otherwise
◆ collapseItem
virtual void qMRMLSubjectHierarchyTreeView::collapseItem |
( |
vtkIdType |
itemID | ) |
|
|
virtualslot |
Handle collapse item requests in the subject hierarchy tree. Collapses branch.
◆ contextMenuEnabled()
bool qMRMLSubjectHierarchyTreeView::contextMenuEnabled |
( |
| ) |
const |
◆ currentItem()
Q_INVOKABLE vtkIdType qMRMLSubjectHierarchyTreeView::currentItem |
( |
| ) |
const |
Get current (=selected) item. If there are multiple items selected, then the first one is returned.
◆ currentItemChanged
void qMRMLSubjectHierarchyTreeView::currentItemChanged |
( |
vtkIdType |
| ) |
|
|
signal |
◆ currentItemModified
void qMRMLSubjectHierarchyTreeView::currentItemModified |
( |
vtkIdType |
| ) |
|
|
signal |
◆ currentItems() [1/2]
QList<vtkIdType> qMRMLSubjectHierarchyTreeView::currentItems |
( |
| ) |
|
Get current (=selected) items.
◆ currentItems() [2/2]
Q_INVOKABLE void qMRMLSubjectHierarchyTreeView::currentItems |
( |
vtkIdList * |
selectedItems | ) |
|
Get current (=selected) items.
- Parameters
-
vtkIdList | for python compatibility |
◆ deleteSelectedItems
void qMRMLSubjectHierarchyTreeView::deleteSelectedItems |
( |
| ) |
|
|
slot |
Delete selected subject hierarchy items and associated data nodes.
◆ displayedItemCount()
Q_INVOKABLE int qMRMLSubjectHierarchyTreeView::displayedItemCount |
( |
| ) |
const |
Determine the number of shown items.
◆ editCurrentItem
virtual void qMRMLSubjectHierarchyTreeView::editCurrentItem |
( |
| ) |
|
|
virtualslot |
Edit properties of current item.
◆ editMenuActionVisible()
bool qMRMLSubjectHierarchyTreeView::editMenuActionVisible |
( |
| ) |
const |
◆ expandItem
virtual void qMRMLSubjectHierarchyTreeView::expandItem |
( |
vtkIdType |
itemID | ) |
|
|
virtualslot |
Handle expand item requests in the subject hierarchy tree. Expands branch.
◆ expandToDepthFromContextMenu
virtual void qMRMLSubjectHierarchyTreeView::expandToDepthFromContextMenu |
( |
| ) |
|
|
protectedvirtualslot |
Expand tree to depth specified by the clicked context menu action.
◆ firstSelectedSubjectHierarchyItemInBranch()
vtkIdType qMRMLSubjectHierarchyTreeView::firstSelectedSubjectHierarchyItemInBranch |
( |
vtkIdType |
itemID | ) |
|
|
protected |
Return the id of the first subject hierarchy item that is found to be selected within the branch that has the input item id as its root
◆ highlightReferencedItems()
bool qMRMLSubjectHierarchyTreeView::highlightReferencedItems |
( |
| ) |
const |
◆ keyPressEvent()
virtual void qMRMLSubjectHierarchyTreeView::keyPressEvent |
( |
QKeyEvent * |
e | ) |
|
|
protectedvirtual |
◆ model()
◆ mousePressEvent()
virtual void qMRMLSubjectHierarchyTreeView::mousePressEvent |
( |
QMouseEvent * |
e | ) |
|
|
protectedvirtual |
Handle mouse press event.
◆ mrmlScene()
Q_INVOKABLE vtkMRMLScene* qMRMLSubjectHierarchyTreeView::mrmlScene |
( |
| ) |
const |
◆ multiSelection()
bool qMRMLSubjectHierarchyTreeView::multiSelection |
( |
| ) |
|
Get whether multi-selection is enabled.
◆ onItemCollapsed
virtual void qMRMLSubjectHierarchyTreeView::onItemCollapsed |
( |
const QModelIndex & |
collapsedItemIndex | ) |
|
|
protectedvirtualslot |
Updates subject hierarchy item expanded property when item is collapsed.
◆ onItemExpanded
virtual void qMRMLSubjectHierarchyTreeView::onItemExpanded |
( |
const QModelIndex & |
expandedItemIndex | ) |
|
|
protectedvirtualslot |
Updates subject hierarchy item expanded property when item is expanded.
◆ onMRMLSceneCloseEnded
virtual void qMRMLSubjectHierarchyTreeView::onMRMLSceneCloseEnded |
( |
vtkObject * |
sceneObject | ) |
|
|
protectedvirtualslot |
Called when scene end is finished. Hierarchy is cleared in that case.
◆ onMRMLSceneEndBatchProcess
virtual void qMRMLSubjectHierarchyTreeView::onMRMLSceneEndBatchProcess |
( |
vtkObject * |
sceneObject | ) |
|
|
protectedvirtualslot |
Called when batch processing ends. Restores selection, which is lost when the hierarchy is rebuilt.
◆ onMRMLSceneStartBatchProcess
virtual void qMRMLSubjectHierarchyTreeView::onMRMLSceneStartBatchProcess |
( |
vtkObject * |
sceneObject | ) |
|
|
protectedvirtualslot |
Called when batch processing starts. Makes sure stored selection does not get emptied before restoring.
◆ onSelectionChanged
virtual void qMRMLSubjectHierarchyTreeView::onSelectionChanged |
( |
const QItemSelection & |
selected, |
|
|
const QItemSelection & |
deselected |
|
) |
| |
|
protectedvirtualslot |
◆ onSubjectHierarchyItemModified
virtual void qMRMLSubjectHierarchyTreeView::onSubjectHierarchyItemModified |
( |
vtkObject * |
caller, |
|
|
void * |
callData |
|
) |
| |
|
protectedvirtualslot |
Propagate item modified signal if the item or an item in its branch was selected in that treeview
◆ populateContextMenuForItem()
virtual void qMRMLSubjectHierarchyTreeView::populateContextMenuForItem |
( |
vtkIdType |
itemID | ) |
|
|
protectedvirtual |
Populate general context menu for given subject hierarchy item
- Parameters
-
itemID | Subject hierarchy item ID of the item to show context menu for. It is only used to determine whether empty area or scene was clicked. If not, then use the current items vector so that multi-selection can also be handled. |
◆ populateVisibilityContextMenuForItem()
virtual void qMRMLSubjectHierarchyTreeView::populateVisibilityContextMenuForItem |
( |
vtkIdType |
itemID | ) |
|
|
protectedvirtual |
Populate visibility context menu for given subject hierarchy item.
◆ removeAttributeFilter()
Q_INVOKABLE void qMRMLSubjectHierarchyTreeView::removeAttributeFilter |
( |
| ) |
|
Remove item attribute filtering.
- See also
- setAttribute
◆ renameCurrentItem
void qMRMLSubjectHierarchyTreeView::renameCurrentItem |
( |
| ) |
|
|
slot |
Rename currently selected one item by popping up a dialog.
◆ rootItem()
Q_INVOKABLE vtkIdType qMRMLSubjectHierarchyTreeView::rootItem |
( |
| ) |
const |
Get root item of the tree.
◆ selectPluginForCurrentItem
virtual void qMRMLSubjectHierarchyTreeView::selectPluginForCurrentItem |
( |
| ) |
|
|
virtualslot |
Handle manual selection of a plugin as the new owner of a subject hierarchy node.
◆ setAttributeFilter()
Q_INVOKABLE void qMRMLSubjectHierarchyTreeView::setAttributeFilter |
( |
const QString & |
attributeName, |
|
|
const QVariant & |
attributeValue = QVariant() |
|
) |
| |
Set attribute filter that allows showing only items that have the specified attribute and their parents.
- Parameters
-
attributeName | Name of the attribute by which the items are filtered |
attributeValue | Value of the specified attribute that needs to match this given value in order for it to be shown. If empty, then existence of the attribute is enough to show. Empty by default |
◆ setContextMenuEnabled
void qMRMLSubjectHierarchyTreeView::setContextMenuEnabled |
( |
bool |
enabled | ) |
|
|
slot |
◆ setCurrentItem
virtual void qMRMLSubjectHierarchyTreeView::setCurrentItem |
( |
vtkIdType |
itemID | ) |
|
|
virtualslot |
Set current (=selected) subject hierarchy item.
◆ setCurrentItems [1/2]
virtual void qMRMLSubjectHierarchyTreeView::setCurrentItems |
( |
QList< vtkIdType > |
items | ) |
|
|
virtualslot |
Set current (=selected) subject hierarchy items.
◆ setCurrentItems [2/2]
virtual void qMRMLSubjectHierarchyTreeView::setCurrentItems |
( |
vtkIdList * |
items | ) |
|
|
virtualslot |
Python compatibility function to set current (=selected) subject hierarchy items.
◆ setEditMenuActionVisible
void qMRMLSubjectHierarchyTreeView::setEditMenuActionVisible |
( |
bool |
visible | ) |
|
|
slot |
◆ setHighlightReferencedItems
void qMRMLSubjectHierarchyTreeView::setHighlightReferencedItems |
( |
bool |
highlightOn | ) |
|
|
slot |
◆ setLevelFilter()
Q_INVOKABLE void qMRMLSubjectHierarchyTreeView::setLevelFilter |
( |
QString & |
levelFilter | ) |
|
Set level filter that allows showing only items at a specified level and their parents. Show all items if empty.
◆ setMRMLScene
virtual void qMRMLSubjectHierarchyTreeView::setMRMLScene |
( |
vtkMRMLScene * |
scene | ) |
|
|
virtualslot |
◆ setMultiSelection
virtual void qMRMLSubjectHierarchyTreeView::setMultiSelection |
( |
bool |
multiSelectionOn | ) |
|
|
virtualslot |
◆ setNameFilter()
Q_INVOKABLE void qMRMLSubjectHierarchyTreeView::setNameFilter |
( |
QString & |
nameFilter | ) |
|
Set name filter that allows showing only items containing a specified string (case-insensitive). Show all items if empty.
◆ setRootItem
virtual void qMRMLSubjectHierarchyTreeView::setRootItem |
( |
vtkIdType |
itemID | ) |
|
|
virtualslot |
Set subject hierarchy item to be the root in the shown tree.
◆ setShowRootItem
void qMRMLSubjectHierarchyTreeView::setShowRootItem |
( |
bool |
show | ) |
|
|
slot |
Set root item visibility.
◆ setSubjectHierarchyNode()
Set the subject hierarchy node found in the given scene. Called only internally.
◆ showContextMenuHint
bool qMRMLSubjectHierarchyTreeView::showContextMenuHint |
( |
bool |
visibility = false | ) |
|
|
slot |
Show hint to user about context menus
- Parameters
-
visibility | True if visibility context menu hint is to be shown, false for general context menu. False by default |
- Returns
- Flag indicating whether hint could be shown (i.e. there was an item in the tree is displayable)
◆ showRootItem()
bool qMRMLSubjectHierarchyTreeView::showRootItem |
( |
| ) |
const |
Get root item visibility.
◆ sortFilterProxyModel()
◆ subjectHierarchyNode()
◆ toggleSubjectHierarchyItemVisibility()
void qMRMLSubjectHierarchyTreeView::toggleSubjectHierarchyItemVisibility |
( |
vtkIdType |
itemID | ) |
|
|
protected |
Toggle visibility for given subject hierarchy item.
◆ updateRootItem
virtual void qMRMLSubjectHierarchyTreeView::updateRootItem |
( |
| ) |
|
|
protectedvirtualslot |
Update root item to restore view (e.g. after tree was updated in the model from the subject hierarchy)
◆ updateSelectPluginActions
virtual void qMRMLSubjectHierarchyTreeView::updateSelectPluginActions |
( |
| ) |
|
|
virtualslot |
Update select plugin actions. Is called when the plugin selection sub-menu is opened, and when the user manually changes the owner plugin of a node. It sets checked state and update confidence values in the select plugin actions in the node context menu for the currently selected node.
◆ qMRMLSubjectHierarchyComboBox
◆ d_ptr
QScopedPointer<qMRMLSubjectHierarchyTreeViewPrivate> qMRMLSubjectHierarchyTreeView::d_ptr |
|
protected |
The documentation for this class was generated from the following file: