Qwt User's Guide 6.3.0
Loading...
Searching...
No Matches
qwt_transform.h
1/******************************************************************************
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
35class QWT_EXPORT QwtTransform
36{
37 public:
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 private:
71 Q_DISABLE_COPY(QwtTransform)
72};
73
80class QWT_EXPORT QwtNullTransform : public QwtTransform
81{
82 public:
84 virtual ~QwtNullTransform();
85
86 virtual double transform( double value ) const QWT_OVERRIDE;
87 virtual double invTransform( double value ) const QWT_OVERRIDE;
88
89 virtual QwtTransform* copy() const QWT_OVERRIDE;
90};
100class QWT_EXPORT QwtLogTransform : public QwtTransform
101{
102 public:
104 virtual ~QwtLogTransform();
105
106 virtual double transform( double value ) const QWT_OVERRIDE;
107 virtual double invTransform( double value ) const QWT_OVERRIDE;
108
109 virtual double bounded( double value ) const QWT_OVERRIDE;
110
111 virtual QwtTransform* copy() const QWT_OVERRIDE;
112
113 static const double LogMin;
114 static const double LogMax;
115};
116
125class QWT_EXPORT QwtPowerTransform : public QwtTransform
126{
127 public:
128 explicit QwtPowerTransform( double exponent );
129 virtual ~QwtPowerTransform();
130
131 virtual double transform( double value ) const QWT_OVERRIDE;
132 virtual double invTransform( double value ) const QWT_OVERRIDE;
133
134 virtual QwtTransform* copy() const QWT_OVERRIDE;
135
136 private:
137 const double m_exponent;
138};
139
140#endif
Logarithmic transformation.
static const double LogMax
Largest allowed value for logarithmic scales: 1.0e150.
static const double LogMin
Smallest allowed value for logarithmic scales: 1.0e-150.
Null transformation.
A transformation using pow()
A transformation between coordinate systems.
virtual QwtTransform * copy() const =0
Virtualized copy operation.
virtual double transform(double value) const =0
virtual double invTransform(double value) const =0