Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
Abstract base class for all overlay-objects 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 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 |
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.
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.
QmitkOverlay::QmitkOverlay | ( | const char * | id | ) |
Constructor with string ID.
Definition at line 23 of file QmitkOverlay.cpp.
|
virtual |
Default Destructor.
Definition at line 28 of file QmitkOverlay.cpp.
References m_Widget, and m_WidgetIsCustom.
|
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().
|
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().
|
virtual |
|
pure virtual |
Implemented in QmitkTextOverlay, QmitkScalarBarOverlay, and QmitkCustomWidgetOverlay.
Referenced by QmitkOverlayController::GetMinimumSizeForWidget().
|
virtual |
getter for the display-position
Definition at line 37 of file QmitkOverlay.cpp.
References m_Position.
Referenced by QmitkOverlayController::AddOverlay(), QmitkOverlayController::GetMinimumSizeForWidget(), QmitkOverlayController::RemoveOverlay(), and QmitkOverlayController::UpdateOverlayData().
|
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().
|
virtual |
|
virtual |
setter for the display-position
Definition at line 42 of file QmitkOverlay.cpp.
References m_Position.
|
protected |
ID of the overlay.
Definition at line 111 of file QmitkOverlay.h.
Referenced by QmitkScalarBarOverlay::GenerateData(), QmitkTextOverlay::GenerateData(), QmitkScalarBarOverlay::SetScaleFactor(), QmitkTextOverlay::UpdateDisplayedTextFromProperties(), QmitkScalarBarOverlay::~QmitkScalarBarOverlay(), and QmitkTextOverlay::~QmitkTextOverlay().
|
protected |
layer of the overlay
Definition at line 117 of file QmitkOverlay.h.
Referenced by GetLayer(), and SetLayer().
|
protected |
position of the overlay
Definition at line 114 of file QmitkOverlay.h.
Referenced by GetPosition(), and SetPosition().
|
protected |
internal QWidget representing the overlay
Definition at line 120 of file QmitkOverlay.h.
Referenced by AddDropShadow(), QmitkCustomWidgetOverlay::GetNeededSize(), QmitkScalarBarOverlay::GetNeededSize(), GetWidget(), QmitkCustomWidgetOverlay::QmitkCustomWidgetOverlay(), QmitkScalarBarOverlay::QmitkScalarBarOverlay(), QmitkTextOverlay::QmitkTextOverlay(), QmitkCustomWidgetOverlay::SetWidget(), and ~QmitkOverlay().
|
protected |
Definition at line 122 of file QmitkOverlay.h.
Referenced by QmitkCustomWidgetOverlay::SetWidget(), and ~QmitkOverlay().