00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- ***************************** 00002 * Qwt Widget Library 00003 * Copyright (C) 1997 Josef Wilgen 00004 * Copyright (C) 2002 Uwe Rathmann 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the Qwt License, Version 1.0 00008 *****************************************************************************/ 00009 00010 #ifndef QWT_TRANSFORM_H 00011 #define QWT_TRANSFORM_H 00012 00013 #include "qwt_global.h" 00014 00035 class QWT_EXPORT QwtTransform 00036 { 00037 public: 00038 QwtTransform(); 00039 virtual ~QwtTransform(); 00040 00045 virtual double bounded( double value ) const; 00046 00055 virtual double transform( double value ) const = 0; 00056 00065 virtual double invTransform( double value ) const = 0; 00066 00068 virtual QwtTransform *copy() const = 0; 00069 00070 private: 00071 Q_DISABLE_COPY(QwtTransform) 00072 }; 00073 00080 class QWT_EXPORT QwtNullTransform: public QwtTransform 00081 { 00082 public: 00083 QwtNullTransform(); 00084 virtual ~QwtNullTransform(); 00085 00086 virtual double transform( double value ) const; 00087 virtual double invTransform( double value ) const; 00088 00089 virtual QwtTransform *copy() const; 00090 }; 00100 class QWT_EXPORT QwtLogTransform: public QwtTransform 00101 { 00102 public: 00103 QwtLogTransform(); 00104 virtual ~QwtLogTransform(); 00105 00106 virtual double transform( double value ) const; 00107 virtual double invTransform( double value ) const; 00108 00109 virtual double bounded( double value ) const; 00110 00111 virtual QwtTransform *copy() const; 00112 00113 static const double LogMin; 00114 static const double LogMax; 00115 }; 00116 00125 class QWT_EXPORT QwtPowerTransform: public QwtTransform 00126 { 00127 public: 00128 explicit QwtPowerTransform( double exponent ); 00129 virtual ~QwtPowerTransform(); 00130 00131 virtual double transform( double value ) const; 00132 virtual double invTransform( double value ) const; 00133 00134 virtual QwtTransform *copy() const; 00135 00136 private: 00137 const double d_exponent; 00138 }; 00139 00140 #endif