Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
QmitkNodeDescriptor Class Reference

Decorator class for mitk::DataNode. More...

#include <QmitkNodeDescriptor.h>

Inheritance diagram for QmitkNodeDescriptor:
Collaboration diagram for QmitkNodeDescriptor:

Public Slots

void ActionDestroyed (QObject *obj=nullptr)
 Called when an action was destroyed. More...
 

Public Member Functions

 QmitkNodeDescriptor (const QString &_ClassName, const QString &_PathToIcon, mitk::NodePredicateBase *_Predicate, QObject *parent)
 
 QmitkNodeDescriptor (const QString &_ClassName, const QIcon &_Icon, mitk::NodePredicateBase *_Predicate, QObject *parent)
 
 ~QmitkNodeDescriptor () override
 
virtual QString GetNameOfClass () const
 
virtual QIcon GetIcon (const mitk::DataNode *node) const
 
virtual QAction * GetSeparator () const
 
virtual bool CheckNode (const mitk::DataNode *node) const
 
virtual void AddAction (QAction *action, bool isBatchAction=true)
 
virtual void RemoveAction (QAction *_Action)
 
virtual QList< QAction * > GetActions () const
 
virtual QList< QAction * > GetBatchActions () const
 

Protected Attributes

QString m_ClassName
 
QIcon m_Icon
 
mitk::NodePredicateBase::Pointer m_Predicate
 
QList< QAction * > m_Actions
 
QList< QAction * > m_BatchActions
 
QAction * m_Separator
 

Detailed Description

Decorator class for mitk::DataNode.

See also
QmitkNodeDescriptorManager

Definition at line 33 of file QmitkNodeDescriptor.h.

Constructor & Destructor Documentation

◆ QmitkNodeDescriptor() [1/2]

QmitkNodeDescriptor::QmitkNodeDescriptor ( const QString &  _ClassName,
const QString &  _PathToIcon,
mitk::NodePredicateBase _Predicate,
QObject *  parent 
)

Creates a new QmitkNodeDescriptor

◆ QmitkNodeDescriptor() [2/2]

QmitkNodeDescriptor::QmitkNodeDescriptor ( const QString &  _ClassName,
const QIcon &  _Icon,
mitk::NodePredicateBase _Predicate,
QObject *  parent 
)

◆ ~QmitkNodeDescriptor()

QmitkNodeDescriptor::~QmitkNodeDescriptor ( )
override

Deletes all actions

Member Function Documentation

◆ ActionDestroyed

void QmitkNodeDescriptor::ActionDestroyed ( QObject *  obj = nullptr)
slot

Called when an action was destroyed.

◆ AddAction()

virtual void QmitkNodeDescriptor::AddAction ( QAction *  action,
bool  isBatchAction = true 
)
virtual

Create and return an action with this descriptor as owner

◆ CheckNode()

virtual bool QmitkNodeDescriptor::CheckNode ( const mitk::DataNode node) const
virtual

Check if this class describes the given node

◆ GetActions()

virtual QList<QAction *> QmitkNodeDescriptor::GetActions ( ) const
virtual

Get all actions associated with this class of nodes

◆ GetBatchActions()

virtual QList<QAction *> QmitkNodeDescriptor::GetBatchActions ( ) const
virtual

Get all actions for this descriptor class that can be executed on multiple nodes (no prior knowledge about the node is required)

◆ GetIcon()

virtual QIcon QmitkNodeDescriptor::GetIcon ( const mitk::DataNode node) const
virtual

Returns an Icon for this class of DataNodes

Reimplemented in QmitkColoredNodeDescriptor.

◆ GetNameOfClass()

virtual QString QmitkNodeDescriptor::GetNameOfClass ( ) const
virtual

Returns a name for this class of DataNodes (e.g. "Image", "Image Mask", etc.)

◆ GetSeparator()

virtual QAction* QmitkNodeDescriptor::GetSeparator ( ) const
virtual

Returns an Icon for this class of DataNodes

◆ RemoveAction()

virtual void QmitkNodeDescriptor::RemoveAction ( QAction *  _Action)
virtual

Remove and delete (!) an action

Member Data Documentation

◆ m_Actions

QList<QAction *> QmitkNodeDescriptor::m_Actions
protected

Definition at line 96 of file QmitkNodeDescriptor.h.

◆ m_BatchActions

QList<QAction *> QmitkNodeDescriptor::m_BatchActions
protected

Definition at line 97 of file QmitkNodeDescriptor.h.

◆ m_ClassName

QString QmitkNodeDescriptor::m_ClassName
protected

Definition at line 93 of file QmitkNodeDescriptor.h.

◆ m_Icon

QIcon QmitkNodeDescriptor::m_Icon
protected

Definition at line 94 of file QmitkNodeDescriptor.h.

◆ m_Predicate

mitk::NodePredicateBase::Pointer QmitkNodeDescriptor::m_Predicate
protected

Definition at line 95 of file QmitkNodeDescriptor.h.

◆ m_Separator

QAction* QmitkNodeDescriptor::m_Separator
protected

Definition at line 98 of file QmitkNodeDescriptor.h.


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