Medical Imaging Interaction Toolkit  2024.06.00
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
 
 ~QmitkNodeDescriptorManager () override
 

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 26 of file QmitkNodeDescriptorManager.h.

Constructor & Destructor Documentation

◆ ~QmitkNodeDescriptorManager()

QmitkNodeDescriptorManager::~QmitkNodeDescriptorManager ( )
override

Deletes all Descriptors in the list

◆ QmitkNodeDescriptorManager()

QmitkNodeDescriptorManager::QmitkNodeDescriptorManager ( )
protected

Creates the m_UnknownDataNodeDescriptor Calls Initialize

Member Function Documentation

◆ AddDescriptor()

void QmitkNodeDescriptorManager::AddDescriptor ( QmitkNodeDescriptor descriptor)

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

◆ GetActions() [1/2]

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.

◆ GetActions() [2/2]

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

◆ GetDescriptor() [1/2]

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()

◆ GetDescriptor() [2/2]

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

◆ GetInstance()

static QmitkNodeDescriptorManager* QmitkNodeDescriptorManager::GetInstance ( )
static
Returns
the solely instance of QmitkNodeDescriptorManager

◆ GetUnknownDataNodeDescriptor()

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

◆ Initialize()

virtual void QmitkNodeDescriptorManager::Initialize ( )
virtual

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

◆ RemoveDescriptor()

void QmitkNodeDescriptorManager::RemoveDescriptor ( QmitkNodeDescriptor descriptor)

Removes and deletes a descriptor from the manager

Member Data Documentation

◆ m_NodeDescriptors

QList<QmitkNodeDescriptor*> QmitkNodeDescriptorManager::m_NodeDescriptors
protected

Holds all user defined descriptors

Definition at line 111 of file QmitkNodeDescriptorManager.h.

◆ m_UnknownDataNodeDescriptor

QmitkNodeDescriptor* QmitkNodeDescriptorManager::m_UnknownDataNodeDescriptor
protected

This is the standard QmitkNodeDescriptor matching every node

Definition at line 107 of file QmitkNodeDescriptorManager.h.


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