QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
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 * Modified by ChenZongYan in 2024 <czy.t@163.com>
10 * Summary of major modifications (see ChangeLog.md for full history):
11 * 1. CMake build system & C++11 throughout.
12 * 2. Core panner/ zoomer refactored:
13 * - QwtPanner → QwtCachePanner (pixmap-cache version)
14 * - New real-time QwtPlotPanner derived from QwtPicker.
15 * 3. Zoomer supports multi-axis.
16 * 4. Parasite-plot framework:
17 * - QwtFigure, QwtPlotParasiteLayout, QwtPlotTransparentCanvas,
18 * - QwtPlotScaleEventDispatcher, built-in pan/zoom on axis.
19 * 5. New picker: QwtPlotSeriesDataPicker (works with date axis).
20 * 6. Raster & color-map extensions:
21 * - QwtGridRasterData (2-D table + interpolation)
22 * - QwtLinearColorMap::stopColors(), stopPos() API rename.
23 * 7. Bar-chart: expose pen/brush control.
24 * 8. Amalgamated build: single QwtPlot.h / QwtPlot.cpp pair in src-amalgamate.
25 *****************************************************************************/
26
27#ifndef QWT_TRANSFORM_H
28#define QWT_TRANSFORM_H
29
30#include "qwtcore_global.h"
31
46class QWTCORE_EXPORT QwtTransform
47{
48public:
52 virtual ~QwtTransform();
53
55 virtual double bounded(double value) const;
57 virtual double transform(double value) const = 0;
59 virtual double invTransform(double value) const = 0;
61 virtual QwtTransform* copy() const = 0;
62
63private:
64 QwtTransform(const QwtTransform&) = delete;
65 QwtTransform& operator=(const QwtTransform&) = delete;
66};
67
72class QWTCORE_EXPORT QwtNullTransform : public QwtTransform
73{
74public:
78 ~QwtNullTransform() override;
79
81 virtual double transform(double value) const override;
83 virtual double invTransform(double value) const override;
85 virtual QwtTransform* copy() const override;
86};
94class QWTCORE_EXPORT QwtLogTransform : public QwtTransform
95{
96public:
100 ~QwtLogTransform() override;
101
103 virtual double transform(double value) const override;
105 virtual double invTransform(double value) const override;
107 virtual double bounded(double value) const override;
109 virtual QwtTransform* copy() const override;
110
112 static const double LogMin;
114 static const double LogMax;
115};
116
124class QWTCORE_EXPORT QwtPowerTransform : public QwtTransform
125{
126public:
128 explicit QwtPowerTransform(double exponent);
130 ~QwtPowerTransform() override;
131
133 virtual double transform(double value) const override;
135 virtual double invTransform(double value) const override;
137 virtual QwtTransform* copy() const override;
138
139private:
140 const double m_exponent;
141};
142
143#endif
Logarithmic transformation
Definition qwt_transform.h:95
static const double LogMax
Largest allowed value for logarithmic scales: 1.0e150
Definition qwt_transform.h:114
static const double LogMin
Smallest allowed value for logarithmic scales: 1.0e-150
Definition qwt_transform.h:112
Null transformation
Definition qwt_transform.h:73
A transformation using pow()
Definition qwt_transform.h:125
A transformation between coordinate systems
Definition qwt_transform.h:47
virtual QwtTransform * copy() const =0
Virtualized copy operation
virtual double transform(double value) const =0
Transformation function
virtual double invTransform(double value) const =0
Inverse transformation function