Loading...
Searching...
No Matches
qwt_transform.h
/******************************************************************************
* Qwt Widget Library
* Copyright (C) 1997 Josef Wilgen
* Copyright (C) 2002 Uwe Rathmann
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Qwt License, Version 1.0
*****************************************************************************/
#ifndef QWT_TRANSFORM_H
#define QWT_TRANSFORM_H
#include "qwt_global.h"
class QWT_EXPORT QwtTransform
{
public:
QwtTransform();
virtual ~QwtTransform();
virtual double bounded( double value ) const;
virtual double transform( double value ) const = 0;
virtual double invTransform( double value ) const = 0;
virtual QwtTransform* copy() const = 0;
private:
Q_DISABLE_COPY(QwtTransform)
};
class QWT_EXPORT QwtNullTransform : public QwtTransform
{
public:
QwtNullTransform();
virtual ~QwtNullTransform();
virtual double transform( double value ) const QWT_OVERRIDE;
virtual double invTransform( double value ) const QWT_OVERRIDE;
virtual QwtTransform* copy() const QWT_OVERRIDE;
};
class QWT_EXPORT QwtLogTransform : public QwtTransform
{
public:
QwtLogTransform();
virtual ~QwtLogTransform();
virtual double transform( double value ) const QWT_OVERRIDE;
virtual double invTransform( double value ) const QWT_OVERRIDE;
virtual double bounded( double value ) const QWT_OVERRIDE;
virtual QwtTransform* copy() const QWT_OVERRIDE;
static const double LogMin;
static const double LogMax;
};
class QWT_EXPORT QwtPowerTransform : public QwtTransform
{
public:
explicit QwtPowerTransform( double exponent );
virtual ~QwtPowerTransform();
virtual double transform( double value ) const QWT_OVERRIDE;
virtual double invTransform( double value ) const QWT_OVERRIDE;
virtual QwtTransform* copy() const QWT_OVERRIDE;
private:
const double m_exponent;
};
#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