diff options
Diffstat (limited to 'krita/core/kis_math_toolbox.h')
-rw-r--r-- | krita/core/kis_math_toolbox.h | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/krita/core/kis_math_toolbox.h b/krita/core/kis_math_toolbox.h index 0ddc545f..8d5bef50 100644 --- a/krita/core/kis_math_toolbox.h +++ b/krita/core/kis_math_toolbox.h @@ -21,7 +21,7 @@ #ifndef KIS_MATH_TOOLBOX_H #define KIS_MATH_TOOLBOX_H -#include <qobject.h> +#include <tqobject.h> // typedef unsigned int uint; @@ -31,14 +31,15 @@ #include <new> -class KisMathToolbox : public QObject { +class KisMathToolbox : public TQObject { Q_OBJECT + TQ_OBJECT public: struct KisFloatRepresentation { KisFloatRepresentation(uint nsize, uint ndepth) throw(std::bad_alloc ) : coeffs(new float[nsize*nsize*ndepth]) ,size(nsize), depth(ndepth) { // XXX: Valgrind shows that these are being used without being initialised. - for (Q_UINT32 i = 0; i < nsize*nsize*ndepth; ++i) { + for (TQ_UINT32 i = 0; i < nsize*nsize*ndepth; ++i) { coeffs[i] = 0; } } @@ -57,8 +58,8 @@ class KisMathToolbox : public QObject { * This function initialize a wavelet structure * @param lay the layer that will be used for the transformation */ - inline KisWavelet* initWavelet(KisPaintDeviceSP lay, const QRect&) throw(std::bad_alloc ); - inline uint fastWaveletTotalSteps(const QRect&); + inline KisWavelet* initWavelet(KisPaintDeviceSP lay, const TQRect&) throw(std::bad_alloc ); + inline uint fastWaveletTotalSteps(const TQRect&); /** * This function reconstruct the layer from the information of a wavelet * @param src layer from which the wavelet will be computed @@ -67,7 +68,7 @@ class KisMathToolbox : public QObject { * in transformToWavelet and in untransformToWavelet, use initWavelet to initialize * the buffer */ - virtual KisWavelet* fastWaveletTransformation(KisPaintDeviceSP src, const QRect&, KisWavelet* buff = 0) =0; + virtual KisWavelet* fastWaveletTransformation(KisPaintDeviceSP src, const TQRect&, KisWavelet* buff = 0) =0; /** * This function reconstruct the layer from the information of a wavelet * @param dst layer on which the wavelet will be untransform @@ -77,7 +78,7 @@ class KisMathToolbox : public QObject { * in transformToWavelet and in untransformToWavelet, use initWavelet to initialize * the buffer */ - virtual void fastWaveletUntransformation(KisPaintDeviceSP dst, const QRect&, KisWavelet* wav, KisWavelet* buff = 0) =0; + virtual void fastWaveletUntransformation(KisPaintDeviceSP dst, const TQRect&, KisWavelet* wav, KisWavelet* buff = 0) =0; signals: void nextStep(); protected: @@ -85,12 +86,12 @@ class KisMathToolbox : public QObject { * This function transform a paint device into a KisFloatRepresentation, this function is colorspace independant, * for Wavelet, Pyramid and FFT the data is allways the exact value of the channel stored in a float. */ - void transformToFR(KisPaintDeviceSP src, KisFloatRepresentation*, const QRect&); + void transformToFR(KisPaintDeviceSP src, KisFloatRepresentation*, const TQRect&); /** * This function transform a KisFloatRepresentation into a paint device, this function is colorspace independant, * for Wavelet, Pyramid and FFT the data is allways the exact value of the channel stored in a float. */ - void transformFromFR(KisPaintDeviceSP dst, KisFloatRepresentation*, const QRect&); + void transformFromFR(KisPaintDeviceSP dst, KisFloatRepresentation*, const TQRect&); private: KisID m_id; }; @@ -102,16 +103,16 @@ class KisMathToolboxFactoryRegistry : public KisGenericRegistry<KisMathToolbox*> }; -inline KisMathToolbox::KisWavelet* KisMathToolbox::initWavelet(KisPaintDeviceSP src, const QRect& rect) throw(std::bad_alloc ) +inline KisMathToolbox::KisWavelet* KisMathToolbox::initWavelet(KisPaintDeviceSP src, const TQRect& rect) throw(std::bad_alloc ) { int size; int maxrectsize = (rect.height() < rect.width()) ? rect.width() : rect.height(); for(size = 2; size < maxrectsize; size *= 2) ; - Q_INT32 depth = src->colorSpace()->nColorChannels(); + TQ_INT32 depth = src->colorSpace()->nColorChannels(); return new KisWavelet(size, depth); } -inline uint KisMathToolbox::fastWaveletTotalSteps(const QRect& rect) +inline uint KisMathToolbox::fastWaveletTotalSteps(const TQRect& rect) { int size, steps; int maxrectsize = (rect.height() < rect.width()) ? rect.width() : rect.height(); |