Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkNodeSelectionListItemWidget Class Reference

Widget representing a single data node selection item with a clear button. More...

#include <QmitkNodeSelectionListItemWidget.h>

Inheritance diagram for QmitkNodeSelectionListItemWidget:
Collaboration diagram for QmitkNodeSelectionListItemWidget:

Public Slots

virtual void SetSelectedNode (const mitk::DataNode *node)
 Set the data node to display. More...
 
virtual void SetClearAllowed (bool allowed)
 Enable or disable the clear button. More...
 

Signals

void ClearSelection (const mitk::DataNode *node)
 Emitted when the user clicks the clear button. More...
 

Public Member Functions

 QmitkNodeSelectionListItemWidget (QWidget *parent=nullptr)
 Construct the list item widget. More...
 
 ~QmitkNodeSelectionListItemWidget () override
 
const mitk::DataNode * GetSelectedNode () const
 Get the currently displayed data node. More...
 

Protected Slots

void OnClearSelection ()
 

Protected Member Functions

bool eventFilter (QObject *obj, QEvent *ev) override
 

Protected Attributes

std::unique_ptr< Ui::QmitkNodeSelectionListItemWidget > m_Controls
 

Detailed Description

Widget representing a single data node selection item with a clear button.

Displays the node's name and class icon, with an optional clear button to remove the selection. Used as an item widget in node selection lists.

See also
QmitkAbstractNodeSelectionWidget, QmitkSingleNodeSelectionWidget

Definition at line 33 of file QmitkNodeSelectionListItemWidget.h.

Constructor & Destructor Documentation

◆ QmitkNodeSelectionListItemWidget()

QmitkNodeSelectionListItemWidget::QmitkNodeSelectionListItemWidget ( QWidget *  parent = nullptr)
explicit

Construct the list item widget.

Parameters
[in]parentParent widget.

◆ ~QmitkNodeSelectionListItemWidget()

QmitkNodeSelectionListItemWidget::~QmitkNodeSelectionListItemWidget ( )
override

Member Function Documentation

◆ ClearSelection

void QmitkNodeSelectionListItemWidget::ClearSelection ( const mitk::DataNode *  node)
signal

Emitted when the user clicks the clear button.

Parameters
[in]nodeThe node being cleared.

◆ eventFilter()

bool QmitkNodeSelectionListItemWidget::eventFilter ( QObject *  obj,
QEvent *  ev 
)
overrideprotected

◆ GetSelectedNode()

const mitk::DataNode* QmitkNodeSelectionListItemWidget::GetSelectedNode ( ) const

Get the currently displayed data node.

Returns
The selected data node, or nullptr if none.

◆ OnClearSelection

void QmitkNodeSelectionListItemWidget::OnClearSelection ( )
protectedslot

◆ SetClearAllowed

virtual void QmitkNodeSelectionListItemWidget::SetClearAllowed ( bool  allowed)
virtualslot

Enable or disable the clear button.

Parameters
[in]allowedIf true, the clear button is shown.

◆ SetSelectedNode

virtual void QmitkNodeSelectionListItemWidget::SetSelectedNode ( const mitk::DataNode *  node)
virtualslot

Set the data node to display.

Parameters
[in]nodeThe data node to show in this item.

Member Data Documentation

◆ m_Controls

std::unique_ptr<Ui::QmitkNodeSelectionListItemWidget> QmitkNodeSelectionListItemWidget::m_Controls
protected

Definition at line 72 of file QmitkNodeSelectionListItemWidget.h.


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