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
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 private:
71 Q_DISABLE_COPY(QwtTransform)
72};
73
80 class QWT_EXPORT QwtNullTransform : public QwtTransform
81{
82 public:
83 QwtNullTransform();
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};
100 class QWT_EXPORT QwtLogTransform : public QwtTransform
101{
102 public:
103 QwtLogTransform();
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
125 class 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
QwtLogTransform
Logarithmic transformation.
Definition qwt_transform.h:101
QwtLogTransform::LogMax
static const double LogMax
Largest allowed value for logarithmic scales: 1.0e150.
Definition qwt_transform.h:114
QwtLogTransform::LogMin
static const double LogMin
Smallest allowed value for logarithmic scales: 1.0e-150.
Definition qwt_transform.h:113
QwtNullTransform
Null transformation.
Definition qwt_transform.h:81
QwtPowerTransform
A transformation using pow()
Definition qwt_transform.h:126
QwtTransform
A transformation between coordinate systems.
Definition qwt_transform.h:36
QwtTransform::copy
virtual QwtTransform * copy() const =0
Virtualized copy operation.
QwtTransform::transform
virtual double transform(double value) const =0
QwtTransform::invTransform
virtual double invTransform(double value) const =0