Slicer 4.2
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Public Types | Properties | Public Member Functions | Protected Member Functions
qMRMLSceneHierarchyModel Class Reference

#include <Libs/MRML/Widgets/qMRMLSceneHierarchyModel.h>

Inheritance diagram for qMRMLSceneHierarchyModel:
Inheritance graph
[legend]
Collaboration diagram for qMRMLSceneHierarchyModel:
Collaboration graph
[legend]

List of all members.

Public Types

typedef qMRMLSceneModel Superclass

Properties

int expandColumn

Public Member Functions

virtual bool canBeAChild (vtkMRMLNode *node) const
 fast function that only check the type of the node to know if it can be a child.
virtual bool canBeAParent (vtkMRMLNode *node) const
 fast function that only check the type of the node to know if it can be a parent.
int expandColumn () const
virtual int nodeIndex (vtkMRMLNode *node) const
 Must be reimplemented in derived classes.
virtual vtkMRMLNodeparentNode (vtkMRMLNode *node) const
 qMRMLSceneHierarchyModel (QObject *parent=0)
virtual bool reparent (vtkMRMLNode *node, vtkMRMLNode *newParent)
 if newParent == 0, set the node into the vtkMRMLScene
void setExpandColumn (int column)
virtual Qt::DropActions supportedDropActions () const
virtual ~qMRMLSceneHierarchyModel ()

Protected Member Functions

virtual int maxColumnId () const
 Must be reimplemented in subclasses that add new column types.
virtual QFlags< Qt::ItemFlag > nodeFlags (vtkMRMLNode *node, int column) const
virtual void observeNode (vtkMRMLNode *node)
 qMRMLSceneHierarchyModel (qMRMLSceneHierarchyModelPrivate *pimpl, QObject *parent=0)
void updateItemDataFromNode (QStandardItem *item, vtkMRMLNode *node, int column)
 Reimplemented to add expandColumn support.
void updateNodeFromItemData (vtkMRMLNode *node, QStandardItem *item)
 Reimplemented to add expandColumn support.

Detailed Description

Definition at line 28 of file qMRMLSceneHierarchyModel.h.


Member Typedef Documentation


Property Documentation

int qMRMLSceneHierarchyModel::expandColumn [read, write]

Control in which column vtkMRMLHierarchyNode is displayed (Qt::CheckStateRole) A value of -1 hides it. Hidden (-1) by default. Note that the expand column should be different than checkableColumn if not both set to -1. The Expanded property is on vtkMRMLDisplayableHierarchyNode.

Todo:
Move the Expanded property to vtkMRMLHierarchyNode.
See also:
nameColumn, idColumn, checkableColumn, visibilityColumn...

Definition at line 38 of file qMRMLSceneHierarchyModel.h.


Constructor & Destructor Documentation

qMRMLSceneHierarchyModel::qMRMLSceneHierarchyModel ( QObject *  parent = 0)
virtual qMRMLSceneHierarchyModel::~qMRMLSceneHierarchyModel ( ) [virtual]
qMRMLSceneHierarchyModel::qMRMLSceneHierarchyModel ( qMRMLSceneHierarchyModelPrivate *  pimpl,
QObject *  parent = 0 
) [protected]

Member Function Documentation

virtual bool qMRMLSceneHierarchyModel::canBeAChild ( vtkMRMLNode node) const [virtual]

fast function that only check the type of the node to know if it can be a child.

Reimplemented from qMRMLSceneModel.

Reimplemented in qMRMLSceneDisplayableModel, and qMRMLSceneModelHierarchyModel.

virtual bool qMRMLSceneHierarchyModel::canBeAParent ( vtkMRMLNode node) const [virtual]

fast function that only check the type of the node to know if it can be a parent.

Reimplemented from qMRMLSceneModel.

Reimplemented in qMRMLSceneDisplayableModel, qMRMLSceneModelHierarchyModel, and qMRMLSceneAnnotationModel.

int qMRMLSceneHierarchyModel::expandColumn ( ) const
virtual int qMRMLSceneHierarchyModel::maxColumnId ( ) const [protected, virtual]

Must be reimplemented in subclasses that add new column types.

Reimplemented from qMRMLSceneModel.

Reimplemented in qMRMLSceneDisplayableModel, qMRMLSceneAnnotationModel, and qMRMLSceneTractographyDisplayModel.

virtual QFlags<Qt::ItemFlag> qMRMLSceneHierarchyModel::nodeFlags ( vtkMRMLNode node,
int  column 
) const [protected, virtual]
virtual int qMRMLSceneHierarchyModel::nodeIndex ( vtkMRMLNode node) const [virtual]

Must be reimplemented in derived classes.

Reimplemented from qMRMLSceneModel.

virtual void qMRMLSceneHierarchyModel::observeNode ( vtkMRMLNode node) [protected, virtual]

Observe node and update item when the node is modified.

See also:
listenNodeModifiedEvent

Reimplemented from qMRMLSceneModel.

Reimplemented in qMRMLSceneDisplayableModel.

virtual vtkMRMLNode* qMRMLSceneHierarchyModel::parentNode ( vtkMRMLNode node) const [virtual]

Returns the parent node of the scene, 0 otherwise (the parent is the scene). Must be reimplemented in derived classes. If reimplemented, you might have to reimplement nodeIndex() as well. Returns 0 by default.

See also:
nodeIndex(), canBeAChild(), canBeAParent()

Reimplemented from qMRMLSceneModel.

Reimplemented in qMRMLSceneDisplayableModel, qMRMLSceneModelHierarchyModel, and qMRMLSceneAnnotationModel.

virtual bool qMRMLSceneHierarchyModel::reparent ( vtkMRMLNode node,
vtkMRMLNode newParent 
) [virtual]

if newParent == 0, set the node into the vtkMRMLScene

Reimplemented from qMRMLSceneModel.

void qMRMLSceneHierarchyModel::setExpandColumn ( int  column)
virtual Qt::DropActions qMRMLSceneHierarchyModel::supportedDropActions ( ) const [virtual]

Doesn't support drop actions, scene model subclasses can support drop actions though.

Reimplemented from qMRMLSceneModel.

void qMRMLSceneHierarchyModel::updateItemDataFromNode ( QStandardItem *  item,
vtkMRMLNode node,
int  column 
) [protected, virtual]

Reimplemented to add expandColumn support.

Reimplemented from qMRMLSceneModel.

Reimplemented in qMRMLSceneDisplayableModel, qMRMLSceneAnnotationModel, qMRMLSceneViewsModel, and qMRMLSceneTractographyDisplayModel.

void qMRMLSceneHierarchyModel::updateNodeFromItemData ( vtkMRMLNode node,
QStandardItem *  item 
) [protected, virtual]

Reimplemented to add expandColumn support.

Reimplemented from qMRMLSceneModel.

Reimplemented in qMRMLSceneDisplayableModel, qMRMLSceneAnnotationModel, qMRMLSceneViewsModel, and qMRMLSceneTractographyDisplayModel.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines