21#ifndef __qMRMLTreeView_h
22#define __qMRMLTreeView_h
30#include <ctkVTKObject.h>
35#include "qMRMLWidgetsExport.h"
37class qMRMLTreeViewPrivate;
227 static
bool isAncestor(const QModelIndex& index, const QModelIndex& potentialAncestor);
231 static QModelIndex
findAncestor(const QModelIndex& index, const QModelIndexList& potentialAncestors);
302 const QItemSelection & deselected);
324 QScopedPointer<qMRMLTreeViewPrivate>
d_ptr;
366 qDebug() <<
"DontHide: " << dontHide;
bool isEditMenuActionVisible() const
void onCustomContextMenu(const QPoint &point)
void decorationClicked(const QModelIndex &)
bool renameMenuActionVisible
void currentNodeChanged(vtkMRMLNode *node)
void currentNodeRenamed(const QString &newName)
void setListenNodeModifiedEvent(qMRMLSceneModel::NodeTypes listen)
void showEvent(QShowEvent *show) override
void currentNodeDeleted(const QModelIndex &index)
vtkMRMLNode * rootNode() const
bool editMenuActionVisible
void mousePressEvent(QMouseEvent *event) override
void onNumberOfVisibleIndexChanged()
QSize sizeHint() const override
bool eventFilter(QObject *object, QEvent *e) override
bool fitSizeToVisibleIndexes
static QModelIndex findAncestor(const QModelIndex &index, const QModelIndexList &potentialAncestors)
void setCurrentNode(vtkMRMLNode *node)
void prependSceneMenuAction(QAction *action)
QSize minimumSizeHint() const override
virtual void toggleVisibility(const QModelIndex &index)
void keyPressEvent(QKeyEvent *event) override
bool isRenameMenuActionVisible() const
void setFitSizeToVisibleIndexes(bool)
void mouseReleaseEvent(QMouseEvent *event) override
static bool isAncestor(const QModelIndex &index, const QModelIndex &potentialAncestor)
void editNodeRequested(vtkMRMLNode *node)
QVTK_OBJECTQString sceneModelType
void loadTreeExpandState()
void setMinSizeHint(QSize min)
void setSceneModelType(const QString &modelType)
void appendSceneMenuAction(QAction *action)
void removeNodeMenuAction(QAction *action)
Remove action from the "NodeMenu".
bool deleteMenuActionVisible
virtual bool clickDecoration(const QModelIndex &index)
vtkMRMLNode * currentNode() const
void setShowRootNode(bool show)
void setEditMenuActionVisible(bool show)
void setSortFilterProxyModel(qMRMLSortFilterProxyModel *newFilterModel)
Customize the filter model.
static QModelIndexList removeChildren(const QModelIndexList &indexes)
Remove indexes that have at least one ancestor in the list.
qMRMLSceneModel::NodeTypes listenNodeModifiedEvent
void setDeleteMenuActionVisible(bool show)
void saveTreeExpandState()
Q_INVOKABLE qMRMLSortFilterProxyModel * sortFilterProxyModel() const
virtual void setMRMLScene(vtkMRMLScene *scene)
void setShowScene(bool show)
vtkMRMLScene * mrmlScene() const
void setDontHideAll(bool)
bool isDeleteMenuActionVisible() const
qMRMLTreeView(QWidget *parent=nullptr)
void setSceneModel(qMRMLSceneModel *newSceneModel, const QString &modelType)
Customize the model.
void setRenameMenuActionVisible(bool show)
void setNodeTypes(const QStringList &nodeTypes)
void appendNodeMenuAction(QAction *action)
void prependNodeMenuAction(QAction *action)
void updateRootNode(vtkObject *modifiedRootNode)
void setRootNode(vtkMRMLNode *root)
Q_INVOKABLE qMRMLSceneModel * sceneModel() const
QScopedPointer< qMRMLTreeViewPrivate > d_ptr
void updateGeometries() override
void scrollTo(const QString &displayName)
virtual void onSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
Abstract Superclass for all specific types of MRML nodes.
A set of MRML Nodes that supports serialization and undo/redo.