13 #ifndef QmitkHistogram_h
14 #define QmitkHistogram_h
18 #include <qwt_plot_item.h>
19 #include <qwt_series_data.h>
59 const QwtIntervalSeriesData &
data()
const;
86 void draw(QPainter *painter,
const QwtScaleMap &xMap,
const QwtScaleMap &yMap,
const QRectF &canvasRect)
const override;
107 virtual void drawBar(QPainter *painter, Qt::Orientation o,
const QRect &rect)
const;
113 HistogramData *m_Data;
A QwtPlotItem that renders a histogram as vertical bars in a QwtPlot.
QRectF boundingRect() const override
Calculate the bounding rectangle of the histogram data.
~QmitkHistogram() override
Destructor.
const QwtIntervalSeriesData & data() const
Get the current interval series data.
void setData(const QwtIntervalSeriesData &data)
Set the interval series data for the histogram.
void setBaseline(double reference)
Set the baseline reference value for the histogram.
QColor color() const
Get the current bar color.
QmitkHistogram(const QwtText &title)
Construct a histogram with a formatted QwtText title.
QmitkHistogram(const QString &title=QString())
Construct a histogram with a plain text title.
double baseline() const
Get the current baseline reference value.
virtual void drawBar(QPainter *painter, Qt::Orientation o, const QRect &rect) const
Draw a single histogram bar with 3D shading.
void setColor(const QColor &color)
Set the fill color for the histogram bars.
void draw(QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect) const override
Draw the histogram bars onto the given painter.