|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Abstract base class for all Qt-based overlay widgets in MITK. More...
#include <QmitkOverlay.h>


Public Types | |
| enum | DisplayPosition { top_Left , top_Center , top_Right , middle_Left , middle_Right , bottom_Left , bottom_Center , bottom_Right } |
| Enumeration of all possible display positions in a render window. More... | |
Public Member Functions | |
| QmitkOverlay (const char *id) | |
| Constructor. More... | |
| ~QmitkOverlay () override | |
| Destructor. Deletes the internal widget unless it was set externally. More... | |
| virtual void | SetPosition (DisplayPosition pos) |
| Sets the display position of this overlay. More... | |
| virtual DisplayPosition | GetPosition () |
| Returns the current display position. More... | |
| virtual void | SetLayer (unsigned int layer) |
| Sets the stacking layer of this overlay. More... | |
| virtual unsigned int | GetLayer () |
| Returns the current stacking layer. More... | |
| virtual void | GenerateData (mitk::PropertyList::Pointer pl) |
| Configures the overlay using properties from the given PropertyList. More... | |
| virtual QWidget * | GetWidget () |
| Returns the internal QWidget representing this overlay. More... | |
| virtual QSize | GetNeededSize ()=0 |
| Returns the minimum size needed to fully display this overlay. More... | |
Protected Member Functions | |
| void | AddDropShadow (QWidget *widget) |
| Adds a drop shadow graphics effect to the given widget. More... | |
Protected Attributes | |
| const char * | m_Id |
| ID of the overlay, used as property key for lookups. More... | |
| DisplayPosition | m_Position |
| Current display position of the overlay. More... | |
| unsigned int | m_Layer |
| Stacking layer of the overlay. More... | |
| QWidget * | m_Widget |
| Internal QWidget representing the overlay content. More... | |
| bool | m_WidgetIsCustom |
| Flag indicating whether the widget was set externally (custom overlay). More... | |
Abstract base class for all Qt-based overlay widgets in MITK.
This class is the basis for all classes representing objects that can be visualized as overlays in MITK render windows. It encapsulates an ID, a display-position, and a layer.
The ID is used to access mitkProperties in a PropertyList that holds information needed for the visualization, e.g. text for TextOverlays or scaleFactor for ScalarBarOverlays.
The display-position encodes where on the screen the overlay will be positioned at (see and USE the constants defined by DisplayPosition):
* 0 - 1 - 2 * | | | * 3 - - 4 * | | | * 5 - 6 - 7 *
The layer is needed if several overlays shall be put in the same position. In this case the layer defines the order in which the objects are laid out.
Definition at line 54 of file QmitkOverlay.h.
Enumeration of all possible display positions in a render window.
Positions are arranged in a 3x3 grid (excluding the center cell): top-left(0), top-center(1), top-right(2), middle-left(3), middle-right(4), bottom-left(5), bottom-center(6), bottom-right(7).
Definition at line 66 of file QmitkOverlay.h.
| QmitkOverlay::QmitkOverlay | ( | const char * | id | ) |
Constructor.
| [in] | id | String identifier used to look up overlay properties in a PropertyList. |
|
override |
Destructor. Deletes the internal widget unless it was set externally.
|
protected |
Adds a drop shadow graphics effect to the given widget.
| [in] | widget | The widget to add the shadow effect to. |
|
virtual |
Configures the overlay using properties from the given PropertyList.
Subclasses override this to extract relevant properties (e.g. text, scale factor) from the PropertyList and apply them to the internal widget.
| [in] | pl | The PropertyList containing overlay configuration properties. |
Reimplemented in QmitkTextOverlay, and QmitkScalarBarOverlay.
|
virtual |
Returns the current stacking layer.
|
pure virtual |
Returns the minimum size needed to fully display this overlay.
Implemented in QmitkTextOverlay, QmitkScalarBarOverlay, and QmitkCustomWidgetOverlay.
|
virtual |
Returns the current display position.
|
virtual |
Returns the internal QWidget representing this overlay.
|
virtual |
Sets the stacking layer of this overlay.
| [in] | layer | The layer index (lower values are rendered first). |
|
virtual |
Sets the display position of this overlay.
| [in] | pos | The desired position in the render window. |
|
protected |
ID of the overlay, used as property key for lookups.
Definition at line 141 of file QmitkOverlay.h.
|
protected |
Stacking layer of the overlay.
Definition at line 147 of file QmitkOverlay.h.
|
protected |
Current display position of the overlay.
Definition at line 144 of file QmitkOverlay.h.
|
protected |
Internal QWidget representing the overlay content.
Definition at line 150 of file QmitkOverlay.h.
|
protected |
Flag indicating whether the widget was set externally (custom overlay).
Definition at line 153 of file QmitkOverlay.h.