50 #ifndef HISTOGRAM_ITEM_H
51 #define HISTOGRAM_ITEM_H
56 #include "qwt_plot_item.h"
58 class QwtIntervalData;
88 void setData(
const QwtIntervalData &data);
89 const QwtIntervalData &data()
const;
95 void setColors( std::vector< QColor >& _colors);
101 virtual int rtti()
const;
104 virtual void draw(QPainter *,
const QwtScaleMap &xMap,
const QwtScaleMap &yMap,
const QRect &)
const;
106 void setBaseline(
double reference);
107 double baseline()
const;
109 enum HistogramAttribute
115 void setHistogramAttribute(HistogramAttribute,
bool on =
true);
116 bool testHistogramAttribute(HistogramAttribute)
const;
120 virtual void drawBar(QPainter *, Qt::Orientation o,
const QRect &)
const;
123 inline QColor color(uint i)
const;
HistogramItem(const QString &title=QString::null)
Constructor.
virtual ~HistogramItem()
Destructor.
void setColors(std::vector< QColor > &_colors)
Set colors.
virtual QwtDoubleRect boundingRect() const
Function hat will return the datas bounding rectangle (for rendering)
void setData(const QwtIntervalData &data)
set data to render
Histogram plotting widget.
virtual void draw(QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRect &) const
The actual draw function, drawing the bars inside the plot widget.
virtual void drawBar(QPainter *, Qt::Orientation o, const QRect &) const
Draws a single bar.