|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Node descriptor that recolors an SVG icon to match the DataNode color. More...
#include <QmitkColoredNodeDescriptor.h>


Public Member Functions | |
| QmitkColoredNodeDescriptor (const QString &className, const QString &pathToIcon, mitk::NodePredicateBase *predicate, QObject *parent=nullptr) | |
| Constructs a colored node descriptor. More... | |
| ~QmitkColoredNodeDescriptor () override | |
| QIcon | GetIcon (const mitk::DataNode *node) const override |
| Returns the icon with the magic color replaced by the node's color. More... | |
Public Member Functions inherited from QmitkNodeDescriptor | |
| 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 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 |
Additional Inherited Members | |
Public Slots inherited from QmitkNodeDescriptor | |
| void | ActionDestroyed (QObject *obj=nullptr) |
| Called when an action was destroyed. More... | |
Protected Attributes inherited from QmitkNodeDescriptor | |
| QString | m_ClassName |
| QIcon | m_Icon |
| mitk::NodePredicateBase::Pointer | m_Predicate |
| QList< QAction * > | m_Actions |
| QList< QAction * > | m_BatchActions |
| QAction * | m_Separator |
Node descriptor that recolors an SVG icon to match the DataNode color.
This class extends QmitkNodeDescriptor by replacing the magic color #00ff00 in the provided SVG icon template with the actual color of the mitk::DataNode. Recolored icons are cached internally so that each unique color is only rendered once.
Definition at line 30 of file QmitkColoredNodeDescriptor.h.
|
explicit |
Constructs a colored node descriptor.
| [in] | className | The class name this descriptor is associated with. |
| [in] | pathToIcon | Path to an SVG file containing the magic color #00ff00. |
| [in] | predicate | Node predicate that determines which nodes this descriptor matches. |
| [in] | parent | Optional parent QObject. |
|
override |
|
overridevirtual |
Returns the icon with the magic color replaced by the node's color.
The node's RGB color property is read and converted to a hex color code. The resulting icon is cached for future requests with the same color.
| [in] | node | The data node whose color is used for the icon. |
node is nullptr. Reimplemented from QmitkNodeDescriptor.