Qwt User's Guide 6.1.5

qwt_transform.h
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_TRANSFORM_H
11 #define QWT_TRANSFORM_H
12
13 #include "qwt_global.h"
14
35 class QWT_EXPORT QwtTransform
36 {
37 public:
38 QwtTransform();
39 virtual ~QwtTransform();
40
45 virtual double bounded( double value ) const;
46
55 virtual double transform( double value ) const = 0;
56
65 virtual double invTransform( double value ) const = 0;
66
68 virtual QwtTransform *copy() const = 0;
69 };
70
77 class QWT_EXPORT QwtNullTransform: public QwtTransform
78 {
79 public:
80 QwtNullTransform();
81 virtual ~QwtNullTransform();
82
83 virtual double transform( double value ) const;
84 virtual double invTransform( double value ) const;
85
86 virtual QwtTransform *copy() const;
87 };
97 class QWT_EXPORT QwtLogTransform: public QwtTransform
98 {
99 public:
100 QwtLogTransform();
101 virtual ~QwtLogTransform();
102
103 virtual double transform( double value ) const;
104 virtual double invTransform( double value ) const;
105
106 virtual double bounded( double value ) const;
107
108 virtual QwtTransform *copy() const;
109
110 #if QT_VERSION >= 0x050400
111 static const double LogMin;
112 static const double LogMax;
113 #else
114 QT_STATIC_CONST double LogMin;
115 QT_STATIC_CONST double LogMax;
116 #endif
117 };
118
127 class QWT_EXPORT QwtPowerTransform: public QwtTransform
128 {
129 public:
130 QwtPowerTransform( double exponent );
131 virtual ~QwtPowerTransform();
132
133 virtual double transform( double value ) const;
134 virtual double invTransform( double value ) const;
135
136 virtual QwtTransform *copy() const;
137
138 private:
139 const double d_exponent;
140 };
141
142 #endif
QwtPowerTransform
A transformation using pow()
Definition: qwt_transform.h:127
QwtNullTransform
Null transformation.
Definition: qwt_transform.h:77
QwtTransform::transform
virtual double transform(double value) const =0
QwtTransform
A transformation between coordinate systems.
Definition: qwt_transform.h:35
QwtTransform::copy
virtual QwtTransform * copy() const =0
Virtualized copy operation.
QwtTransform::bounded
virtual double bounded(double value) const
Definition: qwt_transform.cpp:49
QwtTransform::invTransform
virtual double invTransform(double value) const =0
QwtLogTransform
Logarithmic transformation.
Definition: qwt_transform.h:97
QwtLogTransform::LogMax
QT_STATIC_CONST double LogMax
Largest allowed value for logarithmic scales: 1.0e150.
Definition: qwt_transform.h:115
QwtLogTransform::LogMin
QT_STATIC_CONST double LogMin
Smallest allowed value for logarithmic scales: 1.0e-150.
Definition: qwt_transform.h:114