Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
QmitkOverlay Class Referenceabstract

Abstract base class for all overlay-objects in MITK. More...

#include <QmitkOverlay.h>

Inheritance diagram for QmitkOverlay:
Collaboration diagram for QmitkOverlay:

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

Public Member Functions

 QmitkOverlay (const char *id)
 Constructor with string ID. More...
 
 ~QmitkOverlay () override
 Default Destructor. More...
 
virtual void SetPosition (DisplayPosition)
 setter for the display-position
More...
 
virtual DisplayPosition GetPosition ()
 getter for the display-position
More...
 
virtual void SetLayer (unsigned int)
 setter for the layer
More...
 
virtual unsigned int GetLayer ()
 getter for the layer
More...
 
virtual void GenerateData (mitk::PropertyList::Pointer)
 abstract method to internally setup the overlay More...
 
virtual QWidget * GetWidget ()
 returns the internally handled QWidget More...
 
virtual QSize GetNeededSize ()=0
 

Protected Member Functions

void AddDropShadow (QWidget *widget)
 Add drop shadow effect via QGraphicsEffect. More...
 

Protected Attributes

const char * m_Id
 ID of the overlay. More...
 
DisplayPosition m_Position
 position of the overlay More...
 
unsigned int m_Layer
 layer of the overlay More...
 
QWidget * m_Widget
 internal QWidget representing the overlay More...
 
bool m_WidgetIsCustom
 

Detailed Description

Abstract base class for all overlay-objects in MITK.

This class is the basis for all classes representing objects that can be visualized as overlays in MITK. It encapsulates an ID, as well as a display-position and a layer.

The ID is used to access mitkProperties in a PropertyList that holds information that is 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 layouted.

Definition at line 49 of file QmitkOverlay.h.

Member Enumeration Documentation

◆ DisplayPosition

enumeration of all possible display positions

Enumerator
top_Left 
top_Center 
top_Right 
middle_Left 
middle_Right 
bottom_Left 
bottom_Center 
bottom_Right 

Definition at line 55 of file QmitkOverlay.h.

Constructor & Destructor Documentation

◆ QmitkOverlay()

QmitkOverlay::QmitkOverlay ( const char *  id)

Constructor with string ID.

◆ ~QmitkOverlay()

QmitkOverlay::~QmitkOverlay ( )
override

Default Destructor.

Member Function Documentation

◆ AddDropShadow()

void QmitkOverlay::AddDropShadow ( QWidget *  widget)
protected

Add drop shadow effect via QGraphicsEffect.

◆ GenerateData()

virtual void QmitkOverlay::GenerateData ( mitk::PropertyList::Pointer  )
inlinevirtual

abstract method to internally setup the overlay

Reimplemented in QmitkTextOverlay, and QmitkScalarBarOverlay.

Definition at line 92 of file QmitkOverlay.h.

◆ GetLayer()

virtual unsigned int QmitkOverlay::GetLayer ( )
virtual

getter for the layer

◆ GetNeededSize()

virtual QSize QmitkOverlay::GetNeededSize ( )
pure virtual

◆ GetPosition()

virtual DisplayPosition QmitkOverlay::GetPosition ( )
virtual

getter for the display-position

◆ GetWidget()

virtual QWidget* QmitkOverlay::GetWidget ( )
virtual

returns the internally handled QWidget

◆ SetLayer()

virtual void QmitkOverlay::SetLayer ( unsigned int  )
virtual

setter for the layer

◆ SetPosition()

virtual void QmitkOverlay::SetPosition ( DisplayPosition  )
virtual

setter for the display-position

Member Data Documentation

◆ m_Id

const char* QmitkOverlay::m_Id
protected

ID of the overlay.

Definition at line 107 of file QmitkOverlay.h.

◆ m_Layer

unsigned int QmitkOverlay::m_Layer
protected

layer of the overlay

Definition at line 113 of file QmitkOverlay.h.

◆ m_Position

DisplayPosition QmitkOverlay::m_Position
protected

position of the overlay

Definition at line 110 of file QmitkOverlay.h.

◆ m_Widget

QWidget* QmitkOverlay::m_Widget
protected

internal QWidget representing the overlay

Definition at line 116 of file QmitkOverlay.h.

◆ m_WidgetIsCustom

bool QmitkOverlay::m_WidgetIsCustom
protected

Definition at line 118 of file QmitkOverlay.h.


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