9 #include <qwt_global.h> 11 #if defined(QWT_VERSION) && QWT_VERSION<0x060000 13 #ifndef HISTOGRAM_ITEM_H 14 #define HISTOGRAM_ITEM_H 19 #include "qwt_plot_item.h" 21 class QwtIntervalData;
24 class HistogramItem:
public QwtPlotItem
27 explicit HistogramItem(
const QString &title = QString::null );
28 explicit HistogramItem(
const QwtText &title );
29 virtual ~HistogramItem();
31 void setData(
const QwtIntervalData &data );
32 const QwtIntervalData &data()
const;
34 void setColor(
const QColor & );
37 void setFlat(
bool flat );
40 void setSpacing(
int spacing );
43 void setPen(
const QPen& pen );
46 virtual QwtDoubleRect boundingRect()
const override;
48 virtual int rtti()
const override;
50 virtual void draw(
QPainter *,
const QwtScaleMap &xMap,
51 const QwtScaleMap &yMap,
const QRect & )
const override;
53 virtual void updateLegend( QwtLegend * )
const override;
55 void setBaseline(
double reference );
56 double baseline()
const;
58 enum HistogramAttribute
64 void setHistogramAttribute( HistogramAttribute,
bool on =
true );
65 bool testHistogramAttribute( HistogramAttribute )
const;
69 Qt::Orientation o,
QRect )
const;
81 #include <qwt_interval_data.h> 82 #include <qwt_painter.h> 83 #include <qwt_scale_map.h> 84 #include <qwt_legend_item.h> 86 class HistogramItem::PrivateData