qwt_transform.h
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
* 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;
};
class QWT_EXPORT QwtNullTransform: public QwtTransform
{
public:
QwtNullTransform();
virtual ~QwtNullTransform();
virtual double transform( double value ) const;
virtual double invTransform( double value ) const;
virtual QwtTransform *copy() const;
};
class QWT_EXPORT QwtLogTransform: public QwtTransform
{
public:
QwtLogTransform();
virtual ~QwtLogTransform();
virtual double transform( double value ) const;
virtual double invTransform( double value ) const;
virtual double bounded( double value ) const;
virtual QwtTransform *copy() const;
#if QT_VERSION >= 0x050400
static const double LogMin;
static const double LogMax;
#else
QT_STATIC_CONST double LogMin;
QT_STATIC_CONST double LogMax;
#endif
};
class QWT_EXPORT QwtPowerTransform: public QwtTransform
{
public:
QwtPowerTransform( double exponent );
virtual ~QwtPowerTransform();
virtual double transform( double value ) const;
virtual double invTransform( double value ) const;
virtual QwtTransform *copy() const;
private:
const double d_exponent;
};
#endif
QwtTransform::transform
virtual double transform(double value) const =0
QwtTransform
A transformation between coordinate systems.
Definition: qwt_transform.h:35
QwtLogTransform
Logarithmic transformation.
Definition: qwt_transform.h:97
QwtTransform::invTransform
virtual double invTransform(double value) const =0
QwtPowerTransform
A transformation using pow()
Definition: qwt_transform.h:127
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
QwtNullTransform
Null transformation.
Definition: qwt_transform.h:77
QwtTransform::copy
virtual QwtTransform * copy() const =0
Virtualized copy operation.
QwtTransform::bounded
virtual double bounded(double value) const
Definition: qwt_transform.cpp:49