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

« back to all changes in this revision

Viewing changes to qwt-5.0.2/examples/realtime_plot/scrollbar.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
#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