|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
controller that manages the positioning and stacking of QmitkOverlays More...
#include <QmitkOverlayController.h>


Public Slots | |
| void | AdjustAllOverlayPosition () |
| Repositions all overlay container widgets to match the current render window geometry. More... | |
| void | AdjustOverlayPosition (QmitkOverlay::DisplayPosition displayPosition) |
| Repositions the overlay container widget at the specified display position. More... | |
| void | UpdateAllOverlays () |
| Updates the data of all managed overlays by calling their GenerateData() methods. More... | |
| void | UpdateOverlayData (QmitkOverlay *overlay) |
| Updates the data of a single overlay and readjusts its position. More... | |
Public Member Functions | |
| QmitkOverlayController (QmitkRenderWindow *rw, mitk::PropertyList *pl=nullptr) | |
| Constructor. More... | |
| ~QmitkOverlayController () override | |
| Destructor. More... | |
| void | AddOverlay (QmitkOverlay *overlay) |
| Adds an overlay to the managed render window. More... | |
| void | RemoveOverlay (QmitkOverlay *overlay) |
| Removes a specific overlay from the render window. More... | |
| void | RemoveAllOverlays () |
| Removes all overlays from the render window. More... | |
| void | SetOverlayVisibility (bool visible) |
| Sets the visibility of all overlay container widgets and their contents. More... | |
| void | SetPropertyList (mitk::PropertyList *pl) |
| Sets the render-window-specific PropertyList. More... | |
Protected Types | |
| typedef std::map< QmitkOverlay::DisplayPosition, QWidget * > | OverlayPositionMap |
| typedef std::vector< QmitkOverlay * > | OverlayVector |
Protected Member Functions | |
| void | InitializeOverlayLayout () |
| setting up the widgets that will hold all overlays More... | |
| virtual void | AlignOverlays () |
| re-aligning the overlays - not implemented yet More... | |
| void | InitializeWidget (QmitkOverlay::DisplayPosition pos) |
| initializes one QWidget - internally used by InitializeOverlayLayout() More... | |
| void | RestackOverlays (QmitkOverlay::DisplayPosition pos) |
| QSize | GetMinimumSizeForWidget (QmitkOverlay::DisplayPosition displayPosition) |
Protected Attributes | |
| OverlayVector | m_AllOverlays |
| all QmitkOverlays that are currently added More... | |
| OverlayPositionMap | m_PositionedOverlays |
| all possible positions and the QWidgets representing the corresponding QmitkOverlays More... | |
| QmitkRenderWindow * | m_RenderWindow |
| RenderWindow that all Overlays will be added to. More... | |
| mitk::PropertyList::Pointer | m_PropertyList |
| PropertyList for RenderWindow-specific properties. More... | |
controller that manages the positioning and stacking of QmitkOverlays
This controller manages all QmitkOverlays of one QmitkRenderWindow.
When constructed, it creates one QWidget for each possible display-position and sets the appropriate attributes and layouts.
It is possible to add new Overlays using AddOverlay( QmitkOverlay ). This overlay will be added to the correct Widget according to its destined position (stored in QmitkOverlay). If this widget already holds an overlay, the layer-property is taken into account. If no layer has been set, the overlay will be appended at the end.
It is possible to set the visibility of all overlays at a time using SetOverlayVisibility(bool).
RenderWindow specific properties can be set using the internal mitk::PropertyList. This propertyList and the 'default' propertyList of the RenderingManager will be concatenated before the overlay is set up. If one property exists in both propertyLists, the one in the QmitkOverlayController will be used!
Definition at line 52 of file QmitkOverlayController.h.
|
protected |
Definition at line 161 of file QmitkOverlayController.h.
|
protected |
Definition at line 162 of file QmitkOverlayController.h.
| QmitkOverlayController::QmitkOverlayController | ( | QmitkRenderWindow * | rw, |
| mitk::PropertyList * | pl = nullptr |
||
| ) |
Constructor.
Initializes overlay container widgets for all eight display positions and connects to the render window's moved() signal for automatic repositioning.
| [in] | rw | The QmitkRenderWindow that overlays will be displayed on. Must not be nullptr. |
| [in] | pl | Optional PropertyList with render-window-specific properties. |
|
override |
Destructor.
| void QmitkOverlayController::AddOverlay | ( | QmitkOverlay * | overlay | ) |
Adds an overlay to the managed render window.
The overlay is placed in the container widget corresponding to its display position. Its GenerateData() method is called with the concatenated property list, and the layout is restacked and repositioned.
| [in] | overlay | The overlay to add. Ignored if nullptr. |
|
slot |
Repositions all overlay container widgets to match the current render window geometry.
Called automatically when the render window is moved.
|
slot |
Repositions the overlay container widget at the specified display position.
| [in] | displayPosition | The display position whose container widget should be repositioned. |
|
protectedvirtual |
re-aligning the overlays - not implemented yet
|
protected |
|
protected |
setting up the widgets that will hold all overlays
This method sets up the 8 QWidgets that will later hold all QmitkOverlays. This includes the correct setting of layouts, alignments and the widget attributes necessary to achieve a translucent background and correct rendering on all platforms.
|
protected |
initializes one QWidget - internally used by InitializeOverlayLayout()
| void QmitkOverlayController::RemoveAllOverlays | ( | ) |
Removes all overlays from the render window.
All overlay widgets are unparented, hidden, and scheduled for deletion.
| void QmitkOverlayController::RemoveOverlay | ( | QmitkOverlay * | overlay | ) |
Removes a specific overlay from the render window.
The overlay's widget is unparented and hidden, and the overlay is scheduled for deletion.
| [in] | overlay | The overlay to remove. Ignored if nullptr. |
|
protected |
| void QmitkOverlayController::SetOverlayVisibility | ( | bool | visible | ) |
Sets the visibility of all overlay container widgets and their contents.
| [in] | visible | If true, all overlays are shown; if false, all are hidden. |
| void QmitkOverlayController::SetPropertyList | ( | mitk::PropertyList * | pl | ) |
Sets the render-window-specific PropertyList.
| [in] | pl | The new PropertyList. |
|
slot |
Updates the data of all managed overlays by calling their GenerateData() methods.
|
slot |
Updates the data of a single overlay and readjusts its position.
| [in] | overlay | The overlay to update. Ignored if nullptr. |
|
protected |
all QmitkOverlays that are currently added
Definition at line 167 of file QmitkOverlayController.h.
|
protected |
all possible positions and the QWidgets representing the corresponding QmitkOverlays
Definition at line 172 of file QmitkOverlayController.h.
|
protected |
PropertyList for RenderWindow-specific properties.
Definition at line 182 of file QmitkOverlayController.h.
|
protected |
RenderWindow that all Overlays will be added to.
Definition at line 177 of file QmitkOverlayController.h.