1
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
3
* Copyright (C) 1997 Josef Wilgen
4
* Copyright (C) 2002 Uwe Rathmann
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
*****************************************************************************/
10
#ifndef QWT_DOUBLE_RANGE_H
11
#define QWT_DOUBLE_RANGE_H
13
#include "qwt_global.h"
16
\brief A class which controls a value within an interval
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).
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.
31
class QWT_EXPORT QwtDoubleRange
35
virtual ~QwtDoubleRange();
37
void setRange(double vmin, double vmax, double vstep = 0.0,
43
virtual void setValue(double);
46
void setPeriodic(bool tf);
47
bool periodic() const;
52
double maxValue() const;
53
double minValue() const;
57
virtual void incValue(int);
58
virtual void incPages(int);
59
virtual void fitValue(double);
63
double exactValue() const;
64
double exactPrevValue() const;
65
double prevValue() const;
67
virtual void valueChange();
68
virtual void stepChange();
69
virtual void rangeChange();
72
void setNewValue(double x, bool align = false);
82
double d_exactPrevValue;