Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkNodeSelectionButton Class Reference

Button class that can be used to display information about a given node. If the given node is a nullptr the node info text will be shown. The node info can be formatted text (e.g. HTML code; like the tooltip text). More...

#include <QmitkNodeSelectionButton.h>

Inheritance diagram for QmitkNodeSelectionButton:
Collaboration diagram for QmitkNodeSelectionButton:

Public Slots

virtual void SetSelectedNode (const mitk::DataNode *node)
 Sets the node to display. More...
 
virtual void SetNodeInfo (QString info)
 Sets the info text that is shown when no node is selected. More...
 
void SetSelectionIsOptional (bool isOptional)
 

Public Member Functions

 QmitkNodeSelectionButton (QWidget *parent=nullptr)
 
 ~QmitkNodeSelectionButton () override
 
const mitk::DataNode * GetSelectedNode () const
 Returns the currently selected data node, or nullptr if none is selected. More...
 
bool GetSelectionIsOptional () const
 Returns whether the selection is optional. More...
 

Protected Member Functions

void paintEvent (QPaintEvent *p) override
 
void changeEvent (QEvent *event) override
 
void AddNodeObserver ()
 
void RemoveNodeObserver ()
 
void OnNodeModified (const itk::Object *, const itk::EventObject &)
 

Protected Attributes

mitk::DataNode::ConstPointer m_SelectedNode
 
QString m_Info
 
bool m_OutDatedThumbNail
 
QPixmap m_ThumbNail
 
itk::ModifiedTimeType m_DataMTime
 
itk::ModifiedTimeType m_SelectionPropMTime
 
bool m_IsOptional
 
unsigned long m_NodeModifiedObserverTag
 
bool m_NodeObserved
 

Detailed Description

Button class that can be used to display information about a given node. If the given node is a nullptr the node info text will be shown. The node info can be formatted text (e.g. HTML code; like the tooltip text).

Definition at line 29 of file QmitkNodeSelectionButton.h.

Constructor & Destructor Documentation

◆ QmitkNodeSelectionButton()

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

◆ ~QmitkNodeSelectionButton()

QmitkNodeSelectionButton::~QmitkNodeSelectionButton ( )
override

Member Function Documentation

◆ AddNodeObserver()

void QmitkNodeSelectionButton::AddNodeObserver ( )
protected

◆ changeEvent()

void QmitkNodeSelectionButton::changeEvent ( QEvent *  event)
overrideprotected

◆ GetSelectedNode()

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

Returns the currently selected data node, or nullptr if none is selected.

◆ GetSelectionIsOptional()

bool QmitkNodeSelectionButton::GetSelectionIsOptional ( ) const

Returns whether the selection is optional.

◆ OnNodeModified()

void QmitkNodeSelectionButton::OnNodeModified ( const itk::Object *  ,
const itk::EventObject &   
)
protected

◆ paintEvent()

void QmitkNodeSelectionButton::paintEvent ( QPaintEvent *  p)
overrideprotected

◆ RemoveNodeObserver()

void QmitkNodeSelectionButton::RemoveNodeObserver ( )
protected

◆ SetNodeInfo

virtual void QmitkNodeSelectionButton::SetNodeInfo ( QString  info)
virtualslot

Sets the info text that is shown when no node is selected.

Parameters
[in]infoThe info text, which may contain HTML.

◆ SetSelectedNode

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

Sets the node to display.

Parameters
[in]nodeThe data node to display. May be nullptr.

◆ SetSelectionIsOptional

void QmitkNodeSelectionButton::SetSelectionIsOptional ( bool  isOptional)
slot

Set the widget into an optional mode. Optional means that the selection of no valid node does not mean an invalid state. Thus no node is a valid "node" selection too. The state influences if the info text is handled as an information (optional) or a warning (optional==false).

Member Data Documentation

◆ m_DataMTime

itk::ModifiedTimeType QmitkNodeSelectionButton::m_DataMTime
protected

Definition at line 72 of file QmitkNodeSelectionButton.h.

◆ m_Info

QString QmitkNodeSelectionButton::m_Info
protected

Definition at line 69 of file QmitkNodeSelectionButton.h.

◆ m_IsOptional

bool QmitkNodeSelectionButton::m_IsOptional
protected

Definition at line 75 of file QmitkNodeSelectionButton.h.

◆ m_NodeModifiedObserverTag

unsigned long QmitkNodeSelectionButton::m_NodeModifiedObserverTag
protected

Definition at line 77 of file QmitkNodeSelectionButton.h.

◆ m_NodeObserved

bool QmitkNodeSelectionButton::m_NodeObserved
protected

Definition at line 78 of file QmitkNodeSelectionButton.h.

◆ m_OutDatedThumbNail

bool QmitkNodeSelectionButton::m_OutDatedThumbNail
protected

Definition at line 70 of file QmitkNodeSelectionButton.h.

◆ m_SelectedNode

mitk::DataNode::ConstPointer QmitkNodeSelectionButton::m_SelectedNode
protected

Definition at line 68 of file QmitkNodeSelectionButton.h.

◆ m_SelectionPropMTime

itk::ModifiedTimeType QmitkNodeSelectionButton::m_SelectionPropMTime
protected

Definition at line 73 of file QmitkNodeSelectionButton.h.

◆ m_ThumbNail

QPixmap QmitkNodeSelectionButton::m_ThumbNail
protected

Definition at line 71 of file QmitkNodeSelectionButton.h.


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