Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkBasePropertyView Class Reference

Read-only QLabel that displays any mitk::BaseProperty value as text. More...

#include <QmitkBasePropertyView.h>

Inheritance diagram for QmitkBasePropertyView:
Collaboration diagram for QmitkBasePropertyView:

Public Member Functions

 QmitkBasePropertyView (const mitk::BaseProperty *property, QWidget *parent)
 Construct the view for the given property. More...
 
 ~QmitkBasePropertyView () override
 Destructor. More...
 
- Public Member Functions inherited from mitk::PropertyView
 PropertyView (const mitk::BaseProperty *property)
 Constructor. Begins observing the given property. More...
 
 ~PropertyView () override
 Destructor. Removes the ITK observer from the property. More...
 
void OnModified (const itk::EventObject &e)
 Callback for itk::ModifiedEvent on the observed property. More...
 
void OnDelete (const itk::EventObject &e)
 Callback for itk::DeleteEvent on the observed property. More...
 
- Public Member Functions inherited from mitk::PropertyObserver
 PropertyObserver ()
 Constructor. More...
 
virtual ~PropertyObserver ()
 Virtual destructor. More...
 

Protected Member Functions

void PropertyChanged () override
 Called when the observed property value changes. Updates the label text. More...
 
void PropertyRemoved () override
 Called when the observed property is removed. Sets text to "n/a". More...
 
- Protected Member Functions inherited from mitk::PropertyObserver
void BeginModifyProperty ()
 Marks the beginning of a self-initiated property modification. More...
 
void EndModifyProperty ()
 Marks the end of a self-initiated property modification. More...
 

Additional Inherited Members

- Protected Attributes inherited from mitk::PropertyView
const mitk::BaseProperty * m_Property
 The observed property (read-only). More...
 
- Protected Attributes inherited from mitk::PropertyObserver
unsigned long m_ModifiedTag
 ITK observer tag for the ModifiedEvent. More...
 
unsigned long m_DeleteTag
 ITK observer tag for the DeleteEvent. More...
 
bool m_SelfCall
 Guard flag to prevent re-entrant notification. More...
 

Detailed Description

Read-only QLabel that displays any mitk::BaseProperty value as text.

Observes a mitk::BaseProperty and updates the label text whenever the property value changes, using BaseProperty::GetValueAsString(). If the property is removed, the label displays "n/a".

See also
QmitkPropertyViewFactory, QmitkStringPropertyView, QmitkNumberPropertyView

Definition at line 29 of file QmitkBasePropertyView.h.

Constructor & Destructor Documentation

◆ QmitkBasePropertyView()

QmitkBasePropertyView::QmitkBasePropertyView ( const mitk::BaseProperty *  property,
QWidget *  parent 
)

Construct the view for the given property.

Parameters
[in]propertyThe mitk::BaseProperty to observe and display.
[in]parentThe parent widget.

◆ ~QmitkBasePropertyView()

QmitkBasePropertyView::~QmitkBasePropertyView ( )
override

Destructor.

Member Function Documentation

◆ PropertyChanged()

void QmitkBasePropertyView::PropertyChanged ( )
overrideprotectedvirtual

Called when the observed property value changes. Updates the label text.

Implements mitk::PropertyObserver.

◆ PropertyRemoved()

void QmitkBasePropertyView::PropertyRemoved ( )
overrideprotectedvirtual

Called when the observed property is removed. Sets text to "n/a".

Implements mitk::PropertyObserver.


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