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

Used to create a histogram that can be shown in a Qwt Plot. See QmitkHistogramWidget for an example of its usage. More...

#include <QmitkHistogram.h>

Inheritance diagram for QmitkHistogram:
Collaboration diagram for QmitkHistogram:

Public Member Functions

 QmitkHistogram (const QString &title=QString::null)
 
 QmitkHistogram (const QwtText &title)
 
 ~QmitkHistogram () override
 
void setData (const QwtIntervalSeriesData &data)
 
const QwtIntervalSeriesData & data () const
 
void setColor (const QColor &)
 
QColor color () const
 
QRectF boundingRect () const override
 
void draw (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &) const override
 
void setBaseline (double reference)
 
double baseline () const
 

Protected Member Functions

virtual void drawBar (QPainter *, Qt::Orientation o, const QRect &) const
 

Detailed Description

Used to create a histogram that can be shown in a Qwt Plot. See QmitkHistogramWidget for an example of its usage.

Definition at line 27 of file QmitkHistogram.h.

Constructor & Destructor Documentation

◆ QmitkHistogram() [1/2]

QmitkHistogram::QmitkHistogram ( const QString &  title = QString::null)
explicit

Definition at line 33 of file QmitkHistogram.cpp.

◆ QmitkHistogram() [2/2]

QmitkHistogram::QmitkHistogram ( const QwtText &  title)
explicit

Definition at line 28 of file QmitkHistogram.cpp.

◆ ~QmitkHistogram()

QmitkHistogram::~QmitkHistogram ( )
override

Definition at line 38 of file QmitkHistogram.cpp.

Member Function Documentation

◆ baseline()

double QmitkHistogram::baseline ( ) const

Definition at line 63 of file QmitkHistogram.cpp.

Referenced by draw().

◆ boundingRect()

QRectF QmitkHistogram::boundingRect ( ) const
override

Definition at line 93 of file QmitkHistogram.cpp.

◆ color()

QColor QmitkHistogram::color ( ) const

Definition at line 88 of file QmitkHistogram.cpp.

Referenced by drawBar(), and setColor().

◆ data()

const QwtIntervalSeriesData & QmitkHistogram::data ( ) const

Definition at line 74 of file QmitkHistogram.cpp.

◆ draw()

void QmitkHistogram::draw ( QPainter *  painter,
const QwtScaleMap &  xMap,
const QwtScaleMap &  yMap,
const QRectF &   
) const
override

Definition at line 107 of file QmitkHistogram.cpp.

References baseline(), and drawBar().

◆ drawBar()

void QmitkHistogram::drawBar ( QPainter *  painter,
Qt::Orientation  o,
const QRect &  rect 
) const
protectedvirtual

Definition at line 145 of file QmitkHistogram.cpp.

References color().

Referenced by draw().

◆ setBaseline()

void QmitkHistogram::setBaseline ( double  reference)

Definition at line 54 of file QmitkHistogram.cpp.

◆ setColor()

void QmitkHistogram::setColor ( const QColor &  color)

Definition at line 79 of file QmitkHistogram.cpp.

References color().

◆ setData()

void QmitkHistogram::setData ( const QwtIntervalSeriesData &  data)

Definition at line 68 of file QmitkHistogram.cpp.


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