Overlay that displays a text string in a render window.
~QmitkTextOverlay() override
Destructor. Removes the property observer.
void UpdateFontProperties(mitk::PropertyList::Pointer pl)
Applies font-related properties from the PropertyList to the QLabel.
void SetupCallback(mitk::BaseProperty::Pointer prop)
Sets up an ITK observer on the given property to auto-update the text.
QSize GetNeededSize() override
Returns the minimum size needed to display the current text.
void UpdateDisplayedTextFromProperties()
Reads the current text from the property and updates the QLabel.
mitk::PropertyList::Pointer m_PropertyList
Cached PropertyList for property lookups.
void GenerateData(mitk::PropertyList::Pointer pl) override
Configures the text overlay from the given PropertyList.
QLabel * m_Label
QLabel internally representing the text overlay.
QmitkTextOverlay(const char *id)
Constructor. Creates the internal QLabel widget.
mitk::BaseProperty::Pointer m_ObservedProperty
The observed property for automatic text updates.
unsigned long m_ObserverTag
ITK observer tag for the property modification callback.