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

« back to all changes in this revision

Viewing changes to qwt-5.1.2/examples/realtime_plot/scrollbar.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
#ifndef _SCROLLBAR_H
 
2
#define _SCROLLBAR_H 1
 
3
 
 
4
#include <qscrollbar.h>
 
5
 
 
6
class ScrollBar: public QScrollBar
 
7
{
 
8
    Q_OBJECT
 
9
 
 
10
public:
 
11
    ScrollBar(QWidget *parent = NULL);
 
12
    ScrollBar(Qt::Orientation, QWidget *parent = NULL);
 
13
    ScrollBar(double minBase, double maxBase,       
 
14
        Qt::Orientation o, QWidget *parent = NULL);
 
15
 
 
16
    void setInverted(bool);
 
17
    bool isInverted() const;
 
18
 
 
19
    double minBaseValue() const;
 
20
    double maxBaseValue() const;
 
21
 
 
22
    double minSliderValue() const;
 
23
    double maxSliderValue() const;
 
24
 
 
25
    int extent() const;
 
26
 
 
27
signals:
 
28
    void sliderMoved(Qt::Orientation, double, double);
 
29
    void valueChanged(Qt::Orientation, double, double);
 
30
 
 
31
public slots:
 
32
    virtual void setBase(double min, double max);
 
33
    virtual void moveSlider(double min, double max);
 
34
 
 
35
protected:
 
36
    void sliderRange(int value, double &min, double &max) const;
 
37
    int mapToTick(double) const;
 
38
    double mapFromTick(int) const;
 
39
 
 
40
private slots:
 
41
    void catchValueChanged(int value);
 
42
    void catchSliderMoved(int value);
 
43
 
 
44
private:
 
45
    void init();
 
46
 
 
47
    bool d_inverted;
 
48
    double d_minBase;
 
49
    double d_maxBase;
 
50
    int d_baseTicks;
 
51
};
 
52
 
 
53
#endif