Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkNodeDescriptorManager Class Reference

QmitkNodeDescriptorManager manages a set of QmitkNodeDescriptors. More...

#include <QmitkNodeDescriptorManager.h>

Inheritance diagram for QmitkNodeDescriptorManager:
Collaboration diagram for QmitkNodeDescriptorManager:

Public Member Functions

virtual void Initialize ()
 
void AddDescriptor (QmitkNodeDescriptor *_Descriptor)
 
void RemoveDescriptor (QmitkNodeDescriptor *_Descriptor)
 
QmitkNodeDescriptorGetDescriptor (const mitk::DataNode *_Node) const
 
QmitkNodeDescriptorGetDescriptor (const QString &_ClassName) const
 
QmitkNodeDescriptorGetUnknownDataNodeDescriptor () const
 
QList< QAction * > GetActions (const mitk::DataNode *_Node) const
 
QList< QAction * > GetActions (const QList< mitk::DataNode::Pointer > &_Nodes) const
 
virtual ~QmitkNodeDescriptorManager ()
 

Static Public Member Functions

static QmitkNodeDescriptorManagerGetInstance ()
 

Protected Member Functions

 QmitkNodeDescriptorManager ()
 

Protected Attributes

QmitkNodeDescriptorm_UnknownDataNodeDescriptor
 
QList< QmitkNodeDescriptor * > m_NodeDescriptors
 

Detailed Description

QmitkNodeDescriptorManager manages a set of QmitkNodeDescriptors.

See also
QmitkNodeDescriptor

Definition at line 30 of file QmitkNodeDescriptorManager.h.

Constructor & Destructor Documentation

QmitkNodeDescriptorManager::~QmitkNodeDescriptorManager ( )
virtual

Deletes all Descriptors in the list

Definition at line 166 of file QmitkNodeDescriptorManager.cpp.

QmitkNodeDescriptorManager::QmitkNodeDescriptorManager ( )
protected

Creates the m_UnknownDataNodeDescriptor Calls Initialize

Definition at line 160 of file QmitkNodeDescriptorManager.cpp.

References Initialize().

Member Function Documentation

void QmitkNodeDescriptorManager::AddDescriptor ( QmitkNodeDescriptor _Descriptor)

Adds a new descriptor to the manager. The manager takes the ownership.

Definition at line 65 of file QmitkNodeDescriptorManager.cpp.

References m_NodeDescriptors.

Referenced by Initialize().

QList< QAction * > QmitkNodeDescriptorManager::GetActions ( const mitk::DataNode _Node) const

Returns a list of all actions that are associated with the given node. If there are more than one Descriptors for this node all actions will be merged together. E.g. all actions from the "unknown" DataNodes will be added to this list. Generic Actions like Save, Load, etc. are stored there.

Definition at line 116 of file QmitkNodeDescriptorManager.cpp.

References QmitkNodeDescriptor::GetActions(), QmitkNodeDescriptor::GetBatchActions(), QmitkNodeDescriptor::GetSeparator(), m_NodeDescriptors, and m_UnknownDataNodeDescriptor.

Referenced by QmitkDataManagerView::NodeTableViewContextMenuRequested().

QList< QAction * > QmitkNodeDescriptorManager::GetActions ( const QList< mitk::DataNode::Pointer > &  _Nodes) const
Returns
a list of actions associated with the given nodes

Definition at line 136 of file QmitkNodeDescriptorManager.cpp.

References QmitkNodeDescriptor::GetBatchActions(), GetDescriptor(), QmitkNodeDescriptor::GetSeparator(), and m_UnknownDataNodeDescriptor.

QmitkNodeDescriptor * QmitkNodeDescriptorManager::GetDescriptor ( const mitk::DataNode _Node) const

Get the last descriptor in the descriptors list that matches the given node. Attention: More specialized Descriptors should therefore be appended at the end of the list, e.g. first add "Image", then add "Image Mask"

Returns
a QmitkNodeDescriptor for the given node or a QmitkNodeDescriptor describing unknown nodes (never 0)
See also
AddDescriptor()

Definition at line 83 of file QmitkNodeDescriptorManager.cpp.

References m_NodeDescriptors, and m_UnknownDataNodeDescriptor.

Referenced by QmitkDataManagerView::CreateQtPartControl(), QmitkDataStorageTreeModel::data(), QmitkDataStorageTableModel::data(), and GetActions().

QmitkNodeDescriptor * QmitkNodeDescriptorManager::GetDescriptor ( const QString &  _ClassName) const

Get the last QmitkNodeDescriptor for the given class name

Returns
a QmitkNodeDescriptor for the given class name or 0 if there is no QmitkNodeDescriptor for _ClassName

Definition at line 96 of file QmitkNodeDescriptorManager.cpp.

References m_NodeDescriptors, and m_UnknownDataNodeDescriptor.

QmitkNodeDescriptor * QmitkNodeDescriptorManager::GetUnknownDataNodeDescriptor ( ) const
Returns
The UnknownDataNodeDescriptor, which is the default Descriptor for all Nodes.

Definition at line 172 of file QmitkNodeDescriptorManager.cpp.

References m_UnknownDataNodeDescriptor.

Referenced by QmitkDataManagerView::CreateQtPartControl().

void QmitkNodeDescriptorManager::Initialize ( )
virtual

Initializes the QmitkNodeDescriptorManager. Adds a few standard Descriptors. This Descriptors are added:

Definition at line 34 of file QmitkNodeDescriptorManager.cpp.

References AddDescriptor(), mitk::BoolProperty::New(), mitk::NodePredicateNot::New(), mitk::NodePredicateAnd::New(), mitk::NodePredicateDataType::New(), and mitk::NodePredicateProperty::New().

Referenced by QmitkNodeDescriptorManager().

void QmitkNodeDescriptorManager::RemoveDescriptor ( QmitkNodeDescriptor _Descriptor)

Removes and deletes a descriptor from the manager

Definition at line 71 of file QmitkNodeDescriptorManager.cpp.

References m_NodeDescriptors.

Member Data Documentation

QList<QmitkNodeDescriptor *> QmitkNodeDescriptorManager::m_NodeDescriptors
protected

Holds all user defined descriptors

Definition at line 114 of file QmitkNodeDescriptorManager.h.

Referenced by AddDescriptor(), GetActions(), GetDescriptor(), and RemoveDescriptor().

QmitkNodeDescriptor* QmitkNodeDescriptorManager::m_UnknownDataNodeDescriptor
protected

This is the standard QmitkNodeDescriptor matching every node

Definition at line 110 of file QmitkNodeDescriptorManager.h.

Referenced by GetActions(), GetDescriptor(), and GetUnknownDataNodeDescriptor().


The documentation for this class was generated from the following files: