~ubuntu-branches/ubuntu/oneiric/qwt/oneiric-proposed

« back to all changes in this revision

Viewing changes to qwt-5.1.1/examples/histogram/histogram_item.h

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2009-04-12 23:25:58 UTC
  • mfrom: (1.1.4 upstream) (2.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090412232558-3bl06x785yr8xm8u
Tags: 5.1.2-1
* New upstream release.
* Bump compat/debhelper to 7.
* Bump Standards-Version to 3.8.1. No changes needed.
* Invert Maintainers and Uploaders field.
* Fix lintian warnings:
  - dh_clean _k deprecated.
  - missing dependency on libc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2
 
 * Qwt Widget Library
3
 
 * Copyright (C) 1997   Josef Wilgen
4
 
 * Copyright (C) 2002   Uwe Rathmann
5
 
 *
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
 
 *****************************************************************************/
9
 
 
10
 
#ifndef HISTOGRAM_ITEM_H
11
 
#define HISTOGRAM_ITEM_H
12
 
 
13
 
#include <qglobal.h>
14
 
#include <qcolor.h>
15
 
 
16
 
#include "qwt_plot_item.h" 
17
 
 
18
 
class QwtIntervalData;
19
 
class QString;
20
 
 
21
 
class HistogramItem: public QwtPlotItem
22
 
{
23
 
public:
24
 
    explicit HistogramItem(const QString &title = QString::null);
25
 
    explicit HistogramItem(const QwtText &title);
26
 
    virtual ~HistogramItem();
27
 
 
28
 
    void setData(const QwtIntervalData &data);
29
 
    const QwtIntervalData &data() const;
30
 
 
31
 
    void setColor(const QColor &);
32
 
    QColor color() const;
33
 
 
34
 
    virtual QwtDoubleRect boundingRect() const;
35
 
 
36
 
    virtual int rtti() const;
37
 
 
38
 
    virtual void draw(QPainter *, const QwtScaleMap &xMap, 
39
 
        const QwtScaleMap &yMap, const QRect &) const;
40
 
 
41
 
    void setBaseline(double reference);
42
 
    double baseline() const;
43
 
 
44
 
    enum HistogramAttribute
45
 
    {
46
 
        Auto = 0,
47
 
        Xfy = 1
48
 
    };
49
 
 
50
 
    void setHistogramAttribute(HistogramAttribute, bool on = true);
51
 
    bool testHistogramAttribute(HistogramAttribute) const;
52
 
 
53
 
protected:
54
 
    virtual void drawBar(QPainter *,
55
 
        Qt::Orientation o, const QRect &) const;
56
 
 
57
 
private:
58
 
    void init();
59
 
 
60
 
    class PrivateData;
61
 
    PrivateData *d_data;
62
 
};
63
 
 
64
 
#endif