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