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

« back to all changes in this revision

Viewing changes to qwt-5.1.1/examples/event_filter/colorbar.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
 
#include <qwidget.h>
2
 
 
3
 
class ColorBar: public QWidget
4
 
{
5
 
    Q_OBJECT
6
 
 
7
 
public:
8
 
    ColorBar(Qt::Orientation = Qt::Horizontal, 
9
 
        QWidget * = NULL);
10
 
 
11
 
    virtual void setOrientation(Qt::Orientation o);
12
 
    Qt::Orientation orientation() const { return d_orientation; }
13
 
 
14
 
    void setRange(const QColor &light, const QColor &dark);
15
 
    void setLight(const QColor &light);
16
 
    void setDark(const QColor &dark);
17
 
 
18
 
    QColor light() const { return d_light; }
19
 
    QColor dark() const { return d_dark; }
20
 
 
21
 
signals:
22
 
    void selected(const QColor &);
23
 
 
24
 
protected:
25
 
    virtual void mousePressEvent(QMouseEvent *);
26
 
    virtual void paintEvent(QPaintEvent *);
27
 
 
28
 
    void drawColorBar(QPainter *, const QRect &) const;
29
 
 
30
 
private:
31
 
    Qt::Orientation d_orientation;
32
 
    QColor d_light;
33
 
    QColor d_dark;
34
 
};