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

« back to all changes in this revision

Viewing changes to src/qwt_double_range.h

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2011-06-10 11:22:47 UTC
  • mfrom: (1.1.6 upstream) (2.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110610112247-0i1019vvmzaq6p86
Tags: 6.0.0-1
* New upstream release (Closes: #624107):
  - drop Qt3 support. (Closes: #604379, #626868)
* Register documentation with doc-base. (Closes: #626567)
* Drop patches:
  - 01_makefiles.diff
  - 02_add_missing_warnings.diff
  - 03_qwt_branch_pull_r544.diff
* Add qwt_install_paths.patch to fix the hardcoded installation paths.
* Update debian/control:
  - drop libqt3-mt-dev build dependency.
  - bump Standards-Version to 3.9.2 (no changes).
  - drop Qt3 related packages.
  - due to bump soname (and as we dropper Qt3 support):
    - libqwt5-qt4-dev -> libqwt-dev
    - libqwt5-qt4 -> libqwt6
    - libqwt5-doc -> libqwt-doc
* Update debian/copyright file.
* Update debian/rules: drop Qt3 packages support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
 
2
 * Qwt Widget Library
 
3
 * Copyright (C) 1997   Josef Wilgen
 
4
 * Copyright (C) 2002   Uwe Rathmann
 
5
 *
 
6
 * This library is free software; you can redistribute it and/or
 
7
 * modify it under the terms of the Qwt License, Version 1.0
 
8
 *****************************************************************************/
 
9
 
 
10
#ifndef QWT_DOUBLE_RANGE_H
 
11
#define QWT_DOUBLE_RANGE_H
 
12
 
 
13
#include "qwt_global.h"
 
14
 
 
15
/*!
 
16
  \brief A class which controls a value within an interval
 
17
 
 
18
  This class is useful as a base class or a member for sliders.
 
19
  It represents an interval of type double within which a value can
 
20
  be moved. The value can be either an arbitrary point inside
 
21
  the interval (see QwtDoubleRange::setValue), or it can be fitted
 
22
  into a step raster (see QwtDoubleRange::fitValue and
 
23
  QwtDoubleRange::incValue).
 
24
 
 
25
  As a special case, a QwtDoubleRange can be periodic, which means that
 
26
  a value outside the interval will be mapped to a value inside the
 
27
  interval when QwtDoubleRange::setValue(), QwtDoubleRange::fitValue(),
 
28
  QwtDoubleRange::incValue() or QwtDoubleRange::incPages() are called.
 
29
*/
 
30
 
 
31
class QWT_EXPORT QwtDoubleRange
 
32
{
 
33
public:
 
34
    QwtDoubleRange();
 
35
    virtual ~QwtDoubleRange();
 
36
 
 
37
    void setRange( double vmin, double vmax, 
 
38
        double vstep = 0.0, int pagesize = 1 );
 
39
 
 
40
    void setValid( bool );
 
41
    bool isValid() const;
 
42
 
 
43
    virtual void setValue( double );
 
44
    double value() const;
 
45
 
 
46
    void setPeriodic( bool tf );
 
47
    bool periodic() const;
 
48
 
 
49
    void setStep( double );
 
50
    double step() const;
 
51
 
 
52
    double maxValue() const;
 
53
    double minValue() const;
 
54
 
 
55
    int pageSize() const;
 
56
 
 
57
    virtual void incValue( int );
 
58
    virtual void incPages( int );
 
59
    virtual void fitValue( double );
 
60
 
 
61
protected:
 
62
 
 
63
    double exactValue() const;
 
64
    double exactPrevValue() const;
 
65
    double prevValue() const;
 
66
 
 
67
    virtual void valueChange();
 
68
    virtual void stepChange();
 
69
    virtual void rangeChange();
 
70
 
 
71
private:
 
72
    void setNewValue( double value, bool align = false );
 
73
 
 
74
    class PrivateData;
 
75
    PrivateData *d_data;
 
76
};
 
77
 
 
78
#endif