Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
QmitkScalarBarOverlay Class Reference

object representing a text that is drawn as an overlay More...

#include <QmitkScalarBarOverlay.h>

Inheritance diagram for QmitkScalarBarOverlay:
Collaboration diagram for QmitkScalarBarOverlay:

Public Member Functions

 QmitkScalarBarOverlay (const char *id)
 Default Constructor. More...
 
 ~QmitkScalarBarOverlay () override
 Default Destructor. More...
 
void GenerateData (mitk::PropertyList::Pointer) override
 Setup the QLabel with overlay specific information. More...
 
QSize GetNeededSize () override
 
- Public Member Functions inherited from QmitkOverlay
 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 QWidget * GetWidget ()
 returns the internally handled QWidget More...
 

Protected Member Functions

void GetProperties (mitk::PropertyList::Pointer)
 internal helper class to determine text-properties More...
 
void SetupCallback (mitk::BaseProperty::Pointer prop)
 
void SetScaleFactor ()
 
- Protected Member Functions inherited from QmitkOverlay
void AddDropShadow (QWidget *widget)
 Add drop shadow effect via QGraphicsEffect. More...
 

Protected Attributes

QmitkScalarBarm_ScalarBar
 QWidget internally representing the TextOverlay. More...
 
mitk::BaseProperty::Pointer m_ObservedProperty
 
mitk::PropertyList::Pointer m_PropertyList
 
unsigned long m_ObserverTag
 
- Protected Attributes inherited from QmitkOverlay
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
 

Additional Inherited Members

- Public Types inherited from QmitkOverlay
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...
 

Detailed Description

object representing a text that is drawn as an overlay

Definition at line 30 of file QmitkScalarBarOverlay.h.

Constructor & Destructor Documentation

◆ QmitkScalarBarOverlay()

QmitkScalarBarOverlay::QmitkScalarBarOverlay ( const char *  id)

Default Constructor.

Definition at line 23 of file QmitkScalarBarOverlay.cpp.

References QmitkOverlay::AddDropShadow(), m_ScalarBar, and QmitkOverlay::m_Widget.

◆ ~QmitkScalarBarOverlay()

QmitkScalarBarOverlay::~QmitkScalarBarOverlay ( )
override

Default Destructor.

Definition at line 29 of file QmitkScalarBarOverlay.cpp.

References QmitkOverlay::m_Id, m_ObserverTag, and m_PropertyList.

Member Function Documentation

◆ GenerateData()

void QmitkScalarBarOverlay::GenerateData ( mitk::PropertyList::Pointer  pl)
overridevirtual

Setup the QLabel with overlay specific information.

First, this method sets text-overlay specific properties as described in the class docu above. Secondly, the actual text of the label is set.

No error will be issued if the property containing the text is not found, the TextOverlay will show an empty string!

Reimplemented from QmitkOverlay.

Definition at line 35 of file QmitkScalarBarOverlay.cpp.

References GetProperties(), QmitkOverlay::m_Id, m_PropertyList, MITK_DEBUG, SetScaleFactor(), and SetupCallback().

◆ GetNeededSize()

QSize QmitkScalarBarOverlay::GetNeededSize ( )
overridevirtual

Implements QmitkOverlay.

Definition at line 124 of file QmitkScalarBarOverlay.cpp.

References QmitkOverlay::m_Widget.

◆ GetProperties()

void QmitkScalarBarOverlay::GetProperties ( mitk::PropertyList::Pointer  pl)
protected

internal helper class to determine text-properties

This method is only used internally to apply the text specific properties that can be set using a mitk::PropertyList. If a property cannot be found, a default value is used.

The values of these properties are then attributed to the label using QFont and QPalette.

Definition at line 69 of file QmitkScalarBarOverlay.cpp.

References m_ScalarBar, MITK_DEBUG, mitk::ColorProperty::New(), and QmitkScalarBar::SetPen().

Referenced by GenerateData().

◆ SetScaleFactor()

void QmitkScalarBarOverlay::SetScaleFactor ( )
protected

◆ SetupCallback()

void QmitkScalarBarOverlay::SetupCallback ( mitk::BaseProperty::Pointer  prop)
protected

Definition at line 98 of file QmitkScalarBarOverlay.cpp.

References m_ObservedProperty, m_ObserverTag, MITK_DEBUG, and SetScaleFactor().

Referenced by GenerateData().

Member Data Documentation

◆ m_ObservedProperty

mitk::BaseProperty::Pointer QmitkScalarBarOverlay::m_ObservedProperty
protected

Definition at line 75 of file QmitkScalarBarOverlay.h.

Referenced by SetupCallback().

◆ m_ObserverTag

unsigned long QmitkScalarBarOverlay::m_ObserverTag
protected

Definition at line 78 of file QmitkScalarBarOverlay.h.

Referenced by SetupCallback(), and ~QmitkScalarBarOverlay().

◆ m_PropertyList

mitk::PropertyList::Pointer QmitkScalarBarOverlay::m_PropertyList
protected

Definition at line 77 of file QmitkScalarBarOverlay.h.

Referenced by GenerateData(), SetScaleFactor(), and ~QmitkScalarBarOverlay().

◆ m_ScalarBar

QmitkScalarBar* QmitkScalarBarOverlay::m_ScalarBar
protected

QWidget internally representing the TextOverlay.

Definition at line 73 of file QmitkScalarBarOverlay.h.

Referenced by GetProperties(), QmitkScalarBarOverlay(), and SetScaleFactor().


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