Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
QmitkTextOverlay.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef QmitkTextOverlay_h
14 #define QmitkTextOverlay_h
15 
16 // MITK
17 #include "QmitkOverlay.h"
18 #include "mitkCommon.h"
19 #include "mitkPropertyList.h"
20 
21 // Qt
22 #include <QLabel>
23 
24 #include <MitkQtOverlaysExports.h>
25 
56 {
57 public:
61  QmitkTextOverlay(const char *id);
62 
66  ~QmitkTextOverlay() override;
67 
77  void GenerateData(mitk::PropertyList::Pointer) override;
78 
79  QSize GetNeededSize() override;
80 
81 protected:
90  void UpdateFontProperties(mitk::PropertyList::Pointer);
91 
92  void SetupCallback(mitk::BaseProperty::Pointer prop);
93 
95 
97  QLabel *m_Label;
98 
99  mitk::PropertyList::Pointer m_PropertyList;
100 
101  mitk::BaseProperty::Pointer m_ObservedProperty;
102 
103  unsigned long m_ObserverTag;
104 };
105 
106 #endif
#define MITKQTOVERLAYS_EXPORT
Abstract base class for all overlay-objects in MITK.
Definition: QmitkOverlay.h:50
object representing a text that is drawn as an overlay
~QmitkTextOverlay() override
Default Destructor.
void SetupCallback(mitk::BaseProperty::Pointer prop)
void GenerateData(mitk::PropertyList::Pointer) override
Setup the QLabel with overlay specific information.
QSize GetNeededSize() override
void UpdateDisplayedTextFromProperties()
mitk::PropertyList::Pointer m_PropertyList
QLabel * m_Label
QLabel internally representing the TextOverlay.
QmitkTextOverlay(const char *id)
Default Constructor.
mitk::BaseProperty::Pointer m_ObservedProperty
void UpdateFontProperties(mitk::PropertyList::Pointer)
internal helper class to determine text-properties
unsigned long m_ObserverTag