Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::PropertyEditor Class Reference

Read-write observer for a mitk::BaseProperty. More...

#include <mitkPropertyObserver.h>

Inheritance diagram for mitk::PropertyEditor:
Collaboration diagram for mitk::PropertyEditor:

Public Member Functions

 PropertyEditor (mitk::BaseProperty *property)
 Constructor. Begins observing the given property. More...
 
 ~PropertyEditor () 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...
 
virtual void PropertyChanged ()=0
 Called when the observed property value has changed. More...
 
virtual void PropertyRemoved ()=0
 Called when the observed property is about to be deleted. More...
 

Protected Attributes

mitk::BaseProperty * m_Property
 The observed property (read-write). 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...
 

Additional Inherited Members

- 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...
 

Detailed Description

Read-write observer for a mitk::BaseProperty.

Similar to PropertyView, but holds a non-const pointer to the property, allowing modification of the property value from within the observer.

See also
PropertyView
PropertyObserver

Definition at line 124 of file mitkPropertyObserver.h.

Constructor & Destructor Documentation

◆ PropertyEditor()

mitk::PropertyEditor::PropertyEditor ( mitk::BaseProperty *  property)

Constructor. Begins observing the given property.

Parameters
propertythe property to observe and potentially modify. Must not be nullptr.
Exceptions
std::invalid_argumentif property is nullptr.

◆ ~PropertyEditor()

mitk::PropertyEditor::~PropertyEditor ( )
override

Destructor. Removes the ITK observer from the property.

Member Function Documentation

◆ OnDelete()

void mitk::PropertyEditor::OnDelete ( const itk::EventObject &  e)

Callback for itk::DeleteEvent on the observed property.

Parameters
ethe ITK event object.

◆ OnModified()

void mitk::PropertyEditor::OnModified ( const itk::EventObject &  e)

Callback for itk::ModifiedEvent on the observed property.

Parameters
ethe ITK event object.

Member Data Documentation

◆ m_Property

mitk::BaseProperty* mitk::PropertyEditor::m_Property
protected

The observed property (read-write).

Definition at line 150 of file mitkPropertyObserver.h.


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