Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
QmitkNodeDescriptorManager manages a set of QmitkNodeDescriptors. More...
#include <QmitkNodeDescriptorManager.h>
Public Member Functions | |
virtual void | Initialize () |
void | AddDescriptor (QmitkNodeDescriptor *_Descriptor) |
void | RemoveDescriptor (QmitkNodeDescriptor *_Descriptor) |
QmitkNodeDescriptor * | GetDescriptor (const mitk::DataNode *_Node) const |
QmitkNodeDescriptor * | GetDescriptor (const QString &_ClassName) const |
QmitkNodeDescriptor * | GetUnknownDataNodeDescriptor () 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 QmitkNodeDescriptorManager * | GetInstance () |
Protected Member Functions | |
QmitkNodeDescriptorManager () | |
Protected Attributes | |
QmitkNodeDescriptor * | m_UnknownDataNodeDescriptor |
QList< QmitkNodeDescriptor * > | m_NodeDescriptors |
QmitkNodeDescriptorManager manages a set of QmitkNodeDescriptors.
Definition at line 30 of file QmitkNodeDescriptorManager.h.
|
virtual |
Deletes all Descriptors in the list
Definition at line 166 of file QmitkNodeDescriptorManager.cpp.
|
protected |
Creates the m_UnknownDataNodeDescriptor Calls Initialize
Definition at line 160 of file QmitkNodeDescriptorManager.cpp.
References Initialize().
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 |
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"
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
Definition at line 96 of file QmitkNodeDescriptorManager.cpp.
References m_NodeDescriptors, and m_UnknownDataNodeDescriptor.
|
static |
Definition at line 28 of file QmitkNodeDescriptorManager.cpp.
Referenced by QmitkDataManagerView::CreateQtPartControl(), QmitkDataStorageTreeModel::data(), QmitkDataStorageTableModel::data(), and QmitkDataManagerView::NodeTableViewContextMenuRequested().
QmitkNodeDescriptor * QmitkNodeDescriptorManager::GetUnknownDataNodeDescriptor | ( | ) | const |
Definition at line 172 of file QmitkNodeDescriptorManager.cpp.
References m_UnknownDataNodeDescriptor.
Referenced by QmitkDataManagerView::CreateQtPartControl().
|
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.
|
protected |
Holds all user defined descriptors
Definition at line 114 of file QmitkNodeDescriptorManager.h.
Referenced by AddDescriptor(), GetActions(), GetDescriptor(), and RemoveDescriptor().
|
protected |
This is the standard QmitkNodeDescriptor matching every node
Definition at line 110 of file QmitkNodeDescriptorManager.h.
Referenced by GetActions(), GetDescriptor(), and GetUnknownDataNodeDescriptor().