~ubuntu-branches/ubuntu/saucy/goldencheetah/saucy

« back to all changes in this revision

Viewing changes to qwt/examples/realtime/scrollbar.h

  • Committer: Package Import Robot
  • Author(s): KURASHIKI Satoru
  • Date: 2013-08-18 07:02:45 UTC
  • mfrom: (4.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20130818070245-zgdvb47e1k3mtgil
Tags: 3.0-3
debian/control: remove needless dependency. (Closes: #719571)

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
Q_SIGNALS:
 
28
    void sliderMoved(Qt::Orientation, double, double);
 
29
    void valueChanged(Qt::Orientation, double, double);
 
30
 
 
31
public Q_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 Q_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