~l3on/ubuntu/oneiric/qwt/fix-921430

« back to all changes in this revision

Viewing changes to qwt-5.0.1/examples/event_filter/colorbar.h

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2007-10-05 15:20:41 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20071005152041-qmybqh4fj9jejyo2
Tags: 5.0.2-2
* Handle nostrip build option. (Closes: #437877)
* Build libqwt5-doc package in binary-indep target. (Closes: #443110)

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
 
};