1
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
3
* Copyright (C) 1997 Josef Wilgen
4
* Copyright (C) 2002 Uwe Rathmann
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the Qwt License, Version 1.0
8
*****************************************************************************/
10
#ifndef HISTOGRAM_ITEM_H
11
#define HISTOGRAM_ITEM_H
16
#include "qwt_plot_item.h"
18
class QwtIntervalData;
21
class HistogramItem: public QwtPlotItem
24
explicit HistogramItem(const QString &title = QString::null);
25
explicit HistogramItem(const QwtText &title);
26
virtual ~HistogramItem();
28
void setData(const QwtIntervalData &data);
29
const QwtIntervalData &data() const;
31
void setColor(const QColor &);
34
virtual QwtDoubleRect boundingRect() const;
36
virtual int rtti() const;
38
virtual void draw(QPainter *, const QwtScaleMap &xMap,
39
const QwtScaleMap &yMap, const QRect &) const;
41
void setBaseline(double reference);
42
double baseline() const;
44
enum HistogramAttribute
50
void setHistogramAttribute(HistogramAttribute, bool on = true);
51
bool testHistogramAttribute(HistogramAttribute) const;
54
virtual void drawBar(QPainter *,
55
Qt::Orientation o, const QRect &) const;