Medical Imaging Interaction Toolkit  2016.11.0
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...
 
virtual ~QmitkOverlay ()
 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 53 of file QmitkOverlay.h.

Member Enumeration Documentation

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 59 of file QmitkOverlay.h.

Constructor & Destructor Documentation

QmitkOverlay::QmitkOverlay ( const char *  id)

Constructor with string ID.

Definition at line 23 of file QmitkOverlay.cpp.

QmitkOverlay::~QmitkOverlay ( )
virtual

Default Destructor.

Definition at line 28 of file QmitkOverlay.cpp.

References m_Widget, and m_WidgetIsCustom.

Member Function Documentation

void QmitkOverlay::AddDropShadow ( QWidget *  widget)
protected

Add drop shadow effect via QGraphicsEffect.

Definition at line 62 of file QmitkOverlay.cpp.

References m_Widget.

Referenced by QmitkCustomWidgetOverlay::QmitkCustomWidgetOverlay(), QmitkScalarBarOverlay::QmitkScalarBarOverlay(), and QmitkTextOverlay::QmitkTextOverlay().

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

abstract method to internally setup the overlay

Reimplemented in QmitkTextOverlay, and QmitkScalarBarOverlay.

Definition at line 96 of file QmitkOverlay.h.

Referenced by QmitkOverlayController::UpdateOverlayData().

unsigned int QmitkOverlay::GetLayer ( )
virtual

getter for the layer

Definition at line 47 of file QmitkOverlay.cpp.

References m_Layer.

virtual QSize QmitkOverlay::GetNeededSize ( )
pure virtual
QWidget * QmitkOverlay::GetWidget ( )
virtual

returns the internally handled QWidget

Definition at line 57 of file QmitkOverlay.cpp.

References m_Widget.

Referenced by QmitkOverlayController::AddOverlay(), QmitkOverlayController::RemoveAllOverlays(), and QmitkOverlayController::RemoveOverlay().

void QmitkOverlay::SetLayer ( unsigned int  layer)
virtual

setter for the layer

Definition at line 52 of file QmitkOverlay.cpp.

References m_Layer.

void QmitkOverlay::SetPosition ( DisplayPosition  pos)
virtual

setter for the display-position

Definition at line 42 of file QmitkOverlay.cpp.

References m_Position.

Member Data Documentation

unsigned int QmitkOverlay::m_Layer
protected

layer of the overlay

Definition at line 117 of file QmitkOverlay.h.

Referenced by GetLayer(), and SetLayer().

DisplayPosition QmitkOverlay::m_Position
protected

position of the overlay

Definition at line 114 of file QmitkOverlay.h.

Referenced by GetPosition(), and SetPosition().

bool QmitkOverlay::m_WidgetIsCustom
protected

Definition at line 122 of file QmitkOverlay.h.

Referenced by QmitkCustomWidgetOverlay::SetWidget(), and ~QmitkOverlay().


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