diff options
Diffstat (limited to 'krita/colorspaces/wet')
-rw-r--r-- | krita/colorspaces/wet/kis_texture_filter.cc | 2 | ||||
-rw-r--r-- | krita/colorspaces/wet/kis_texture_filter.h | 8 | ||||
-rw-r--r-- | krita/colorspaces/wet/kis_texture_painter.cc | 6 | ||||
-rw-r--r-- | krita/colorspaces/wet/kis_texture_painter.h | 2 | ||||
-rw-r--r-- | krita/colorspaces/wet/kis_wet_colorspace.cc | 120 | ||||
-rw-r--r-- | krita/colorspaces/wet/kis_wet_colorspace.h | 106 | ||||
-rw-r--r-- | krita/colorspaces/wet/kis_wet_palette_widget.cc | 146 | ||||
-rw-r--r-- | krita/colorspaces/wet/kis_wet_palette_widget.h | 23 | ||||
-rw-r--r-- | krita/colorspaces/wet/kis_wetness_visualisation_filter.cc | 2 | ||||
-rw-r--r-- | krita/colorspaces/wet/kis_wetness_visualisation_filter.h | 9 | ||||
-rw-r--r-- | krita/colorspaces/wet/kis_wetop.cc | 32 | ||||
-rw-r--r-- | krita/colorspaces/wet/kis_wetop.h | 6 | ||||
-rw-r--r-- | krita/colorspaces/wet/wdgpressure.ui | 12 | ||||
-rw-r--r-- | krita/colorspaces/wet/wet_plugin.cc | 28 | ||||
-rw-r--r-- | krita/colorspaces/wet/wet_plugin.h | 3 | ||||
-rw-r--r-- | krita/colorspaces/wet/wetphysicsfilter.cc | 44 | ||||
-rw-r--r-- | krita/colorspaces/wet/wetphysicsfilter.h | 12 |
17 files changed, 282 insertions, 279 deletions
diff --git a/krita/colorspaces/wet/kis_texture_filter.cc b/krita/colorspaces/wet/kis_texture_filter.cc index 1fc2e4d3..57ff1db0 100644 --- a/krita/colorspaces/wet/kis_texture_filter.cc +++ b/krita/colorspaces/wet/kis_texture_filter.cc @@ -25,7 +25,7 @@ #include "kis_texture_painter.h" #include "kis_texture_filter.h" -void WetPaintDevAction::act(KisPaintDeviceSP device, Q_INT32 w, Q_INT32 h) const { +void WetPaintDevAction::act(KisPaintDeviceSP device, TQ_INT32 w, TQ_INT32 h) const { KisColorSpace * cs = device->colorSpace(); if (cs->id() != KisID("WET","")) { diff --git a/krita/colorspaces/wet/kis_texture_filter.h b/krita/colorspaces/wet/kis_texture_filter.h index fb2ef021..b4b32825 100644 --- a/krita/colorspaces/wet/kis_texture_filter.h +++ b/krita/colorspaces/wet/kis_texture_filter.h @@ -21,7 +21,7 @@ #ifndef _TEXTURE_FILTER_H #define _TEXTURE_FILTER_H -#include <qstring.h> +#include <tqstring.h> #include <klocale.h> #include <kis_paint_device_action.h> @@ -30,9 +30,9 @@ class WetPaintDevAction : public KisPaintDeviceAction { public: virtual ~WetPaintDevAction() {} - virtual void act(KisPaintDeviceSP device, Q_INT32 w = 0, Q_INT32 h = 0) const; - virtual QString name() const { return i18n("Wet Texture"); } - virtual QString description() const { return i18n("Add a texture to the wet canvas"); } + virtual void act(KisPaintDeviceSP device, TQ_INT32 w = 0, TQ_INT32 h = 0) const; + virtual TQString name() const { return i18n("Wet Texture"); } + virtual TQString description() const { return i18n("Add a texture to the wet canvas"); } }; #endif // _TEXTURE_FILTER_H diff --git a/krita/colorspaces/wet/kis_texture_painter.cc b/krita/colorspaces/wet/kis_texture_painter.cc index a98038e6..4b11b989 100644 --- a/krita/colorspaces/wet/kis_texture_painter.cc +++ b/krita/colorspaces/wet/kis_texture_painter.cc @@ -44,7 +44,7 @@ KisTexturePainter::KisTexturePainter(KisPaintDeviceSP device) : super(device) m_blurh = 0.7; } -void KisTexturePainter::createTexture( Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) +void KisTexturePainter::createTexture( TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) { double hscale = 128 * m_height / RAND_MAX; @@ -56,7 +56,7 @@ void KisTexturePainter::createTexture( Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT while (!i.isDone()) { WetPack* pack = reinterpret_cast<WetPack*>(i.rawData()); WetPix* w = &(pack->adsorb); - w->h = ( Q_UINT16)floor(128 + hscale * rand()); + w->h = ( TQ_UINT16)floor(128 + hscale * rand()); ++i; } } @@ -85,7 +85,7 @@ void KisTexturePainter::createTexture( Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT } } - // Vertical blurring was commented out in wetdreams, the effect seems to be achievable + //Qt::Vertical blurring was commented out in wetdreams, the effect seems to be achievable // without this. // I think this is because with blur in one direction, you get more the effect of // having 'fibers' in your paper diff --git a/krita/colorspaces/wet/kis_texture_painter.h b/krita/colorspaces/wet/kis_texture_painter.h index a3323492..00bcd135 100644 --- a/krita/colorspaces/wet/kis_texture_painter.h +++ b/krita/colorspaces/wet/kis_texture_painter.h @@ -31,7 +31,7 @@ public: KisTexturePainter(); KisTexturePainter(KisPaintDeviceSP device); - void createTexture( Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h); + void createTexture( TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h); private: double m_blurh, m_height; diff --git a/krita/colorspaces/wet/kis_wet_colorspace.cc b/krita/colorspaces/wet/kis_wet_colorspace.cc index 4ca96eb5..7d6f0d67 100644 --- a/krita/colorspaces/wet/kis_wet_colorspace.cc +++ b/krita/colorspaces/wet/kis_wet_colorspace.cc @@ -22,7 +22,7 @@ #include <config.h> #include LCMS_HEADER -#include <qimage.h> +#include <tqimage.h> #include <klocale.h> #include <kdebug.h> @@ -104,13 +104,13 @@ void wetPixFromDouble(WetPix * dst, WetPixDbl *src) int getH(int r, int g, int b) { int h, s, v; - QColor c(r,g, b); + TQColor c(r,g, b); c.getHsv(&h, &s, &v); return h; } -KisWetColorSpace::KisWetColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) : - KisAbstractColorSpace(KisID("WET", i18n("Watercolors")), 0, icMaxEnumData, parent, p) +KisWetColorSpace::KisWetColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) : + KisAbstractColorSpace(KisID("WET", i18n("Watercolors")), 0, icMaxEnumData, tqparent, p) { wet_init_render_tab(); @@ -148,7 +148,7 @@ KisWetColorSpace::KisWetColorSpace(KisColorSpaceFactoryRegistry * parent, KisPro m_channels.push_back(new KisChannelInfo(i18n("Adsorbed Water Volume"), "W", 14, KisChannelInfo::SUBSTANCE, KisChannelInfo::UINT16)); m_channels.push_back(new KisChannelInfo(i18n("Adsorbed Paper Height"), "H", 15, KisChannelInfo::SUBSTANCE, KisChannelInfo::UINT16)); - // Store the hue; we'll pick the paintbox color that closest to the given QColor's hue. + // Store the hue; we'll pick the paintbox color that closest to the given TQColor's hue. m_conversionMap[getH(240, 32, 160)] = m_paintbox[0]; // Quinacridone Rose m_conversionMap[getH(159, 88, 43)] = m_paintbox[1]; // Indian Red m_conversionMap[getH(254, 220, 64)] = m_paintbox[2]; // Cadmium Yellow @@ -173,15 +173,15 @@ KisWetColorSpace::~KisWetColorSpace() { } -void KisWetColorSpace::fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * /*profile*/) +void KisWetColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 *dst, KisProfile * /*profile*/) { WetPack* p = reinterpret_cast<WetPack*>(dst); int h = getH(c.red(), c.green(), c.blue()); int delta = 256; int key = 0; - QMap<int, WetPix>::Iterator it; - QMap<int, WetPix>::Iterator end = m_conversionMap.end(); + TQMap<int, WetPix>::Iterator it; + TQMap<int, WetPix>::Iterator end = m_conversionMap.end(); for (it = m_conversionMap.begin(); it != end; ++it) { if (abs(it.key() - h) < delta) { delta = abs(it.key() - h); @@ -189,8 +189,8 @@ void KisWetColorSpace::fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * /* } } - // Translate the special QCOlors from our paintbox to wetpaint paints. - if (m_conversionMap.contains(key)) { + // Translate the special TQCOlors from our paintbox to wetpaint paints. + if (m_conversionMap.tqcontains(key)) { (*p).paint = m_conversionMap[key]; (*p).adsorb = m_conversionMap[key]; // or maybe best add water here? } else { @@ -200,46 +200,46 @@ void KisWetColorSpace::fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * /* } } -void KisWetColorSpace::fromQColor(const QColor& c, Q_UINT8 /*opacity*/, Q_UINT8 *dst, KisProfile * /*profile*/) +void KisWetColorSpace::fromTQColor(const TQColor& c, TQ_UINT8 /*opacity*/, TQ_UINT8 *dst, KisProfile * /*profile*/) { - fromQColor(c, dst); + fromTQColor(c, dst); } - Q_UINT8 KisWetColorSpace::getAlpha(const Q_UINT8 */*pixel*/) const + TQ_UINT8 KisWetColorSpace::getAlpha(const TQ_UINT8 */*pixel*/) const { return OPACITY_OPAQUE; } -void KisWetColorSpace::setAlpha( Q_UINT8 * /*pixels*/, Q_UINT8 /*alpha*/, Q_INT32 /*nPixels*/) const +void KisWetColorSpace::setAlpha( TQ_UINT8 * /*pixels*/, TQ_UINT8 /*alpha*/, TQ_INT32 /*nPixels*/) const { } -void KisWetColorSpace::multiplyAlpha( Q_UINT8 * /*pixels*/, Q_UINT8 /*alpha*/, Q_INT32 /*nPixels*/) +void KisWetColorSpace::multiplyAlpha( TQ_UINT8 * /*pixels*/, TQ_UINT8 /*alpha*/, TQ_INT32 /*nPixels*/) { } -void KisWetColorSpace::applyAlphaU8Mask( Q_UINT8 * /*pixels*/, Q_UINT8 * /*alpha*/, Q_INT32 /*nPixels*/) +void KisWetColorSpace::applyAlphaU8Mask( TQ_UINT8 * /*pixels*/, TQ_UINT8 * /*alpha*/, TQ_INT32 /*nPixels*/) { } -void KisWetColorSpace::applyInverseAlphaU8Mask( Q_UINT8 * /*pixels*/, Q_UINT8 * /*alpha*/, Q_INT32 /*nPixels*/) +void KisWetColorSpace::applyInverseAlphaU8Mask( TQ_UINT8 * /*pixels*/, TQ_UINT8 * /*alpha*/, TQ_INT32 /*nPixels*/) { } - Q_UINT8 KisWetColorSpace::scaleToU8(const Q_UINT8 * /*srcPixel*/, Q_INT32 /*channelPos*/) + TQ_UINT8 KisWetColorSpace::scaleToU8(const TQ_UINT8 * /*srcPixel*/, TQ_INT32 /*channelPos*/) { return 0; } -Q_UINT16 KisWetColorSpace::scaleToU16(const Q_UINT8 * /*srcPixel*/, Q_INT32 /*channelPos*/) +TQ_UINT16 KisWetColorSpace::scaleToU16(const TQ_UINT8 * /*srcPixel*/, TQ_INT32 /*channelPos*/) { return 0; } -void KisWetColorSpace::toQColor(const Q_UINT8 *src, QColor *c, KisProfile * /*profile*/) +void KisWetColorSpace::toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * /*profile*/) { - Q_UINT8 * rgb = new Q_UINT8[3]; + TQ_UINT8 * rgb = new TQ_UINT8[3]; Q_CHECK_PTR(rgb); memset(rgb, 255, 3); @@ -259,37 +259,37 @@ void KisWetColorSpace::toQColor(const Q_UINT8 *src, QColor *c, KisProfile * /*pr delete[]rgb; } -void KisWetColorSpace::toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 */*opacity*/, KisProfile * /*profile*/) +void KisWetColorSpace::toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 */*opacity*/, KisProfile * /*profile*/) { - toQColor(src, c); + toTQColor(src, c); } -void KisWetColorSpace::mixColors(const Q_UINT8 **/*colors*/, const Q_UINT8 */*weights*/, Q_UINT32 /*nColors*/, Q_UINT8 */*dst*/) const +void KisWetColorSpace::mixColors(const TQ_UINT8 **/*colors*/, const TQ_UINT8 */*weights*/, TQ_UINT32 /*nColors*/, TQ_UINT8 */*dst*/) const { } -QValueVector<KisChannelInfo *> KisWetColorSpace::channels() const +TQValueVector<KisChannelInfo *> KisWetColorSpace::channels() const { return m_channels; } - Q_UINT32 KisWetColorSpace::nChannels() const + TQ_UINT32 KisWetColorSpace::nChannels() const { return 16; } - Q_UINT32 KisWetColorSpace::nColorChannels() const + TQ_UINT32 KisWetColorSpace::nColorChannels() const { return 12; } - Q_UINT32 KisWetColorSpace::nSubstanceChannels() const + TQ_UINT32 KisWetColorSpace::nSubstanceChannels() const { return 4; } - Q_UINT32 KisWetColorSpace::pixelSize() const + TQ_UINT32 KisWetColorSpace::pixelSize() const { return 32; // This color strategy wants an unsigned short for each // channel, and every pixel consists of two wetpix structs @@ -300,14 +300,14 @@ QValueVector<KisChannelInfo *> KisWetColorSpace::channels() const // XXX: use profiles to display correctly on calibrated displays. -QImage KisWetColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height, +TQImage KisWetColorSpace::convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height, KisProfile * /*dstProfile*/, - Q_INT32 /*renderingIntent*/, float /*exposure*/) + TQ_INT32 /*renderingIntent*/, float /*exposure*/) { - QImage img(width, height, 32); + TQImage img(width, height, 32); - Q_UINT8 *rgb = (Q_UINT8*) img.bits(); + TQ_UINT8 *rgb = (TQ_UINT8*) img.bits(); const WetPack* wetData = reinterpret_cast<const WetPack*>(data); // Clear to white -- the following code actually composits the contents of the @@ -316,7 +316,7 @@ QImage KisWetColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_I memset(rgb, 255, width * height * 4); // Composite the two layers in each pixelSize - Q_INT32 i = 0; + TQ_INT32 i = 0; while ( i < width * height) { // First the adsorption layers WetPack* wp = const_cast<WetPack*>(&wetData[i]); // XXX don't do these things! @@ -338,31 +338,31 @@ QImage KisWetColorSpace::convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_I } i++; - rgb += sizeof( Q_UINT32); // Because the QImage is 4 bytes deep. + rgb += sizeof( TQ_UINT32); // Because the TQImage is 4 bytes deep. } return img; } -void KisWetColorSpace::bitBlt( Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 */*srcAlphaMask*/, - Q_INT32 /*maskRowStride*/, - Q_UINT8 /*opacity*/, - Q_INT32 rows, - Q_INT32 cols, +void KisWetColorSpace::bitBlt( TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 */*srcAlphaMask*/, + TQ_INT32 /*tqmaskRowStride*/, + TQ_UINT8 /*opacity*/, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op) { if (rows <= 0 || cols <= 0) return; - Q_UINT8 *d; - const Q_UINT8 *s; + TQ_UINT8 *d; + const TQ_UINT8 *s; - Q_INT32 linesize = pixelSize() * cols; + TQ_INT32 linesize = pixelSize() * cols; d = dst; s = src; @@ -400,7 +400,7 @@ void KisWetColorSpace::wet_init_render_tab() double d; int a, b; - wet_render_tab = new Q_UINT32[4096]; + wet_render_tab = new TQ_UINT32[4096]; Q_CHECK_PTR(wet_render_tab); for (i = 0; i < 4096; i++) @@ -418,7 +418,7 @@ void KisWetColorSpace::wet_init_render_tab() } -void KisWetColorSpace::wet_composite(RGBMode m, Q_UINT8 *rgb, WetPix * wet) +void KisWetColorSpace::wet_composite(RGBMode m, TQ_UINT8 *rgb, WetPix * wet) { int r, g, b; int d, w; @@ -467,7 +467,7 @@ void KisWetColorSpace::wet_composite(RGBMode m, Q_UINT8 *rgb, WetPix * wet) rgb[0] = b; } -void KisWetColorSpace::wet_render_wetness( Q_UINT8 * rgb, WetPack * pack) +void KisWetColorSpace::wet_render_wetness( TQ_UINT8 * rgb, WetPack * pack) { int highlight = 255 - (pack->paint.w >> 1); @@ -487,27 +487,27 @@ KisCompositeOpList KisWetColorSpace::userVisiblecompositeOps() const return list; } -QString KisWetColorSpace::channelValueText(const Q_UINT8 *U8_pixel, Q_UINT32 channelIndex) const +TQString KisWetColorSpace::channelValueText(const TQ_UINT8 *U8_pixel, TQ_UINT32 channelIndex) const { Q_ASSERT(channelIndex < nChannels()); - const Q_UINT16 *pixel = reinterpret_cast<const Q_UINT16 *>(U8_pixel); - Q_UINT32 channelPosition = m_channels[channelIndex]->pos(); + const TQ_UINT16 *pixel = reinterpret_cast<const TQ_UINT16 *>(U8_pixel); + TQ_UINT32 channelPosition = m_channels[channelIndex]->pos(); - return QString().setNum(pixel[channelPosition]); + return TQString().setNum(pixel[channelPosition]); } -QString KisWetColorSpace::normalisedChannelValueText(const Q_UINT8 *U8_pixel, Q_UINT32 channelIndex) const +TQString KisWetColorSpace::normalisedChannelValueText(const TQ_UINT8 *U8_pixel, TQ_UINT32 channelIndex) const { Q_ASSERT(channelIndex < nChannels()); - const Q_UINT16 *pixel = reinterpret_cast<const Q_UINT16 *>(U8_pixel); - Q_UINT32 channelPosition = m_channels[channelIndex]->pos(); + const TQ_UINT16 *pixel = reinterpret_cast<const TQ_UINT16 *>(U8_pixel); + TQ_UINT32 channelPosition = m_channels[channelIndex]->pos(); - return QString().setNum(static_cast<float>(pixel[channelPosition]) / UINT16_MAX); + return TQString().setNum(static_cast<float>(pixel[channelPosition]) / UINT16_MAX); } -QValueList<KisFilter *> KisWetColorSpace::createBackgroundFilters() +TQValueList<KisFilter *> KisWetColorSpace::createBackgroundFilters() { - QValueList<KisFilter *> filterList; + TQValueList<KisFilter *> filterList; KisFilter * f = new WetPhysicsFilter(); filterList << f; return filterList; diff --git a/krita/colorspaces/wet/kis_wet_colorspace.h b/krita/colorspaces/wet/kis_wet_colorspace.h index 9c66c52e..3d6c6e57 100644 --- a/krita/colorspaces/wet/kis_wet_colorspace.h +++ b/krita/colorspaces/wet/kis_wet_colorspace.h @@ -18,10 +18,10 @@ #ifndef KIS_STRATEGY_COLORSPACE_WET_H_ #define KIS_STRATEGY_COLORSPACE_WET_H_ -#include <qcolor.h> -#include <qstringlist.h> -#include <qvaluelist.h> -#include <qmap.h> +#include <tqcolor.h> +#include <tqstringlist.h> +#include <tqvaluelist.h> +#include <tqmap.h> #include "kis_global.h" #include "kis_abstract_colorspace.h" @@ -53,17 +53,17 @@ typedef struct _WetPack WetPack; */ struct _WetPix { - Q_UINT16 rd; /* Total red channel concentration */ - Q_UINT16 rw; /* Myth-red concentration */ + TQ_UINT16 rd; /* Total red channel concentration */ + TQ_UINT16 rw; /* Myth-red concentration */ - Q_UINT16 gd; /* Total green channel concentration */ - Q_UINT16 gw; /* Myth-green concentration */ + TQ_UINT16 gd; /* Total green channel concentration */ + TQ_UINT16 gw; /* Myth-green concentration */ - Q_UINT16 bd; /* Total blue channel concentration */ - Q_UINT16 bw; /* Myth-blue concentration */ + TQ_UINT16 bd; /* Total blue channel concentration */ + TQ_UINT16 bw; /* Myth-blue concentration */ - Q_UINT16 w; /* Water volume */ - Q_UINT16 h; /* Height of paper surface XXX: This might just as well be a single + TQ_UINT16 w; /* Water volume */ + TQ_UINT16 h; /* Height of paper surface XXX: This might just as well be a single channel in our colour model that has two of these wetpix structs for every paint device pixels*/ }; @@ -92,7 +92,7 @@ void wetPixFromDouble(WetPix * dst, WetPixDbl *src); class KisWetColorSpace : public KisAbstractColorSpace { public: - KisWetColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p); + KisWetColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p); virtual ~KisWetColorSpace(); @@ -111,40 +111,40 @@ public: // Semi-clever: we have only fifteen wet paint colors that are mapped to the // qcolors that are put in the painter by the special wet paint palette. Other - // QColors are mapped to plain water... - virtual void fromQColor(const QColor& c, Q_UINT8 *dst, KisProfile * profile = 0); - virtual void fromQColor(const QColor& c, Q_UINT8 opacity, Q_UINT8 *dst, KisProfile * profile = 0); + // TQColors are mapped to plain water... + virtual void fromTQColor(const TQColor& c, TQ_UINT8 *dst, KisProfile * profile = 0); + virtual void fromTQColor(const TQColor& c, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * profile = 0); - virtual void toQColor(const Q_UINT8 *src, QColor *c, KisProfile * profile = 0); - virtual void toQColor(const Q_UINT8 *src, QColor *c, Q_UINT8 *opacity, KisProfile * profile = 0); + virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, KisProfile * profile = 0); + virtual void toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * profile = 0); - virtual Q_UINT8 getAlpha(const Q_UINT8 * pixel) const; - virtual void setAlpha( Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels) const; - virtual void multiplyAlpha( Q_UINT8 * pixels, Q_UINT8 alpha, Q_INT32 nPixels); + virtual TQ_UINT8 getAlpha(const TQ_UINT8 * pixel) const; + virtual void setAlpha( TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels) const; + virtual void multiplyAlpha( TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels); - virtual void applyAlphaU8Mask( Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels); - virtual void applyInverseAlphaU8Mask( Q_UINT8 * pixels, Q_UINT8 * alpha, Q_INT32 nPixels); + virtual void applyAlphaU8Mask( TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels); + virtual void applyInverseAlphaU8Mask( TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels); - virtual Q_UINT8 scaleToU8(const Q_UINT8 * srcPixel, Q_INT32 channelPos); - virtual Q_UINT16 scaleToU16(const Q_UINT8 * srcPixel, Q_INT32 channelPos); + virtual TQ_UINT8 scaleToU8(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos); + virtual TQ_UINT16 scaleToU16(const TQ_UINT8 * srcPixel, TQ_INT32 channelPos); - virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const; + virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const; - virtual QValueVector<KisChannelInfo *> channels() const; - virtual Q_UINT32 nChannels() const; - virtual Q_UINT32 nColorChannels() const; - virtual Q_UINT32 nSubstanceChannels() const; - virtual Q_UINT32 pixelSize() const; + virtual TQValueVector<KisChannelInfo *> channels() const; + virtual TQ_UINT32 nChannels() const; + virtual TQ_UINT32 nColorChannels() const; + virtual TQ_UINT32 nSubstanceChannels() const; + virtual TQ_UINT32 pixelSize() const; - virtual QString channelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const; - virtual QString normalisedChannelValueText(const Q_UINT8 *pixel, Q_UINT32 channelIndex) const; + virtual TQString channelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const; + virtual TQString normalisedChannelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const; - virtual QImage convertToQImage(const Q_UINT8 *data, Q_INT32 width, Q_INT32 height, + virtual TQImage convertToTQImage(const TQ_UINT8 *data, TQ_INT32 width, TQ_INT32 height, KisProfile * dstProfile, - Q_INT32 renderingIntent = INTENT_PERCEPTUAL, + TQ_INT32 renderingIntent = INTENT_PERCEPTUAL, float exposure = 0.0f); - virtual QValueList<KisFilter*> createBackgroundFilters(); + virtual TQValueList<KisFilter*> createBackgroundFilters(); virtual KisCompositeOpList userVisiblecompositeOps() const; @@ -162,15 +162,15 @@ public: dst->w = src1->w + src2->w; } protected: - virtual void bitBlt( Q_UINT8 *dst, - Q_INT32 dstRowSize, - const Q_UINT8 *src, - Q_INT32 srcRowStride, - const Q_UINT8 *srcAlphaMask, - Q_INT32 maskRowStride, - Q_UINT8 opacity, - Q_INT32 rows, - Q_INT32 cols, + virtual void bitBlt( TQ_UINT8 *dst, + TQ_INT32 dstRowSize, + const TQ_UINT8 *src, + TQ_INT32 srcRowStride, + const TQ_UINT8 *srcAlphaMask, + TQ_INT32 tqmaskRowStride, + TQ_UINT8 opacity, + TQ_INT32 rows, + TQ_INT32 cols, const KisCompositeOp& op); private: @@ -180,15 +180,15 @@ private: /// Convert a single pixel from its wet representation to rgb: internal rgb: rgb[0] = R, etc typedef enum { RGB, BGR } RGBMode; - void wet_composite(RGBMode m, Q_UINT8 *rgb, WetPix * wet); + void wet_composite(RGBMode m, TQ_UINT8 *rgb, WetPix * wet); - void wet_render_wetness( Q_UINT8 * rgb, WetPack * pack); + void wet_render_wetness( TQ_UINT8 * rgb, WetPack * pack); private: - Q_UINT32 * wet_render_tab; + TQ_UINT32 * wet_render_tab; - QStringList m_paintNames; - QMap<int, WetPix> m_conversionMap; + TQStringList m_paintNames; + TQMap<int, WetPix> m_conversionMap; bool m_paintwetness; int phase, phasebig; @@ -207,13 +207,13 @@ public: /** * lcms colorspace type definition. */ - virtual Q_UINT32 colorSpaceType() { return 0; }; + virtual TQ_UINT32 colorSpaceType() { return 0; }; virtual icColorSpaceSignature colorSpaceSignature() { return icMaxEnumData; }; - virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisWetColorSpace(parent, p); }; + virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisWetColorSpace(tqparent, p); }; - virtual QString defaultProfile() { return ""; }; + virtual TQString defaultProfile() { return ""; }; }; #endif // KIS_STRATEGY_COLORSPACE_WET_H_ diff --git a/krita/colorspaces/wet/kis_wet_palette_widget.cc b/krita/colorspaces/wet/kis_wet_palette_widget.cc index ae405f94..21876a39 100644 --- a/krita/colorspaces/wet/kis_wet_palette_widget.cc +++ b/krita/colorspaces/wet/kis_wet_palette_widget.cc @@ -19,18 +19,18 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qpushbutton.h> -#include <qapplication.h> -#include <qclipboard.h> -#include <qcolor.h> -#include <qdrawutil.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpainter.h> -#include <qspinbox.h> -#include <qstyle.h> -#include <qtooltip.h> +#include <tqpushbutton.h> +#include <tqapplication.h> +#include <tqclipboard.h> +#include <tqcolor.h> +#include <tqdrawutil.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqspinbox.h> +#include <tqstyle.h> +#include <tqtooltip.h> #include <klocale.h> #include <knuminput.h> @@ -46,140 +46,140 @@ #include "kis_wet_colorspace.h" #include "kis_wet_palette_widget.h" -KisWetPaletteWidget::KisWetPaletteWidget(QWidget *parent, const char *name) : super(parent, name) +KisWetPaletteWidget::KisWetPaletteWidget(TQWidget *tqparent, const char *name) : super(tqparent, name) { m_subject = 0; - QVBoxLayout * vl = new QVBoxLayout(this, 0, -1, "main layout"); + TQVBoxLayout * vl = new TQVBoxLayout(this, 0, -1, "main tqlayout"); - QGridLayout * l = new QGridLayout(vl, 2, 8, 2, "color wells grid"); + TQGridLayout * l = new TQGridLayout(vl, 2, 8, 2, "color wells grid"); KisColorCup * b; int WIDTH = 24; int HEIGHT = 24; b = new KisColorCup(this); - b->setColor( QColor(240, 32, 160) ); + b->setColor( TQColor(240, 32, 160) ); l->addWidget(b, 0, 0); - QToolTip::add(b, i18n("Quinacridone Rose")); + TQToolTip::add(b, i18n("Quinacridone Rose")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(159, 88, 43)); + b->setColor(TQColor(159, 88, 43)); l->addWidget(b, 0, 1); - QToolTip::add(b,i18n("Indian Red")); + TQToolTip::add(b,i18n("Indian Red")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor( QColor(254, 220, 64) ); + b->setColor( TQColor(254, 220, 64) ); l->addWidget(b, 0, 2); - QToolTip::add(b,i18n("Cadmium Yellow")); + TQToolTip::add(b,i18n("Cadmium Yellow")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(36, 180, 32)); + b->setColor(TQColor(36, 180, 32)); l->addWidget(b, 0, 3); - QToolTip::add(b,i18n("Hookers Green")); + TQToolTip::add(b,i18n("Hookers Green")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(16, 185, 215)); + b->setColor(TQColor(16, 185, 215)); l->addWidget(b, 0, 4); - QToolTip::add(b,i18n("Cerulean Blue")); + TQToolTip::add(b,i18n("Cerulean Blue")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(96, 32, 8)); + b->setColor(TQColor(96, 32, 8)); l->addWidget(b, 0, 5); - QToolTip::add(b,i18n("Burnt Umber")); + TQToolTip::add(b,i18n("Burnt Umber")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(254, 96, 8)); + b->setColor(TQColor(254, 96, 8)); l->addWidget(b, 0, 6); - QToolTip::add(b,i18n("Cadmium Red")); + TQToolTip::add(b,i18n("Cadmium Red")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(255, 136, 8)); + b->setColor(TQColor(255, 136, 8)); l->addWidget(b, 0, 7); - QToolTip::add(b,i18n("Brilliant Orange")); + TQToolTip::add(b,i18n("Brilliant Orange")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(240, 199, 8)); + b->setColor(TQColor(240, 199, 8)); l->addWidget(b, 1, 0); - QToolTip::add(b,i18n("Hansa Yellow")); + TQToolTip::add(b,i18n("Hansa Yellow")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(96, 170, 130)); + b->setColor(TQColor(96, 170, 130)); l->addWidget(b, 1, 1); - QToolTip::add(b,i18n("Phthalo Green")); + TQToolTip::add(b,i18n("Phthalo Green")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(48, 32, 170)); + b->setColor(TQColor(48, 32, 170)); l->addWidget(b, 1, 2); - QToolTip::add(b,i18n("French Ultramarine")); + TQToolTip::add(b,i18n("French Ultramarine")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(118, 16, 135)); + b->setColor(TQColor(118, 16, 135)); l->addWidget(b, 1, 3); - QToolTip::add(b,i18n("Interference Lilac")); + TQToolTip::add(b,i18n("Interference Lilac")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(254, 254, 254)); + b->setColor(TQColor(254, 254, 254)); l->addWidget(b, 1, 4); - QToolTip::add(b,i18n("Titanium White")); + TQToolTip::add(b,i18n("Titanium White")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(64, 64, 74)); + b->setColor(TQColor(64, 64, 74)); l->addWidget(b, 1, 5); - QToolTip::add(b,i18n("Ivory Black")); + TQToolTip::add(b,i18n("Ivory Black")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); b = new KisColorCup(this); - b->setColor(QColor(255, 255, 255)); + b->setColor(TQColor(255, 255, 255)); l->addWidget(b, 1, 6); - QToolTip::add(b,i18n("Pure Water")); + TQToolTip::add(b,i18n("Pure Water")); b->setFixedSize(WIDTH, HEIGHT); - connect(b, SIGNAL(changed(const QColor &)), SLOT(slotFGColorSelected(const QColor &))); + connect(b, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotFGColorSelected(const TQColor &))); - QGridLayout * g2 = new QGridLayout(vl, 2, 2); + TQGridLayout * g2 = new TQGridLayout(vl, 2, 2); - QLabel * label = new QLabel(i18n("Paint strength:"), this); + TQLabel * label = new TQLabel(i18n("Paint strength:"), this); g2->addWidget(label, 0, 0); m_strength = new KDoubleNumInput(0.0, 2.0, 1.0, 0.1, 1, this); m_strength->setRange(0.0, 2.0, 0.1, true); - connect(m_strength, SIGNAL(valueChanged(double)), this, SLOT(slotStrengthChanged(double))); + connect(m_strength, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(slotStrengthChanged(double))); g2->addWidget(m_strength, 0, 1); - label = new QLabel(i18n("Wetness:"), this); + label = new TQLabel(i18n("Wetness:"), this); g2->addWidget(label, 1, 0); m_wetness = new KIntNumInput(16, this); - connect(m_wetness, SIGNAL(valueChanged(int)), this, SLOT(slotWetnessChanged(int))); + connect(m_wetness, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotWetnessChanged(int))); m_wetness->setRange(0, 16, true); g2->addWidget(m_wetness, 1, 1); - g2->addItem(new QSpacerItem(1, 1, QSizePolicy::Expanding, QSizePolicy::Minimum)); + g2->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Expanding, TQSizePolicy::Minimum)); } @@ -189,17 +189,17 @@ void KisWetPaletteWidget::update(KisCanvasSubject *subject) } -void KisWetPaletteWidget::slotFGColorSelected(const QColor& c) +void KisWetPaletteWidget::slotFGColorSelected(const TQColor& c) { KisWetColorSpace* cs = dynamic_cast<KisWetColorSpace*>(KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("WET", ""), "")); Q_ASSERT(cs); WetPack pack; - Q_UINT8* data = reinterpret_cast< Q_UINT8*>(&pack); - cs->fromQColor(c, data); + TQ_UINT8* data = reinterpret_cast< TQ_UINT8*>(&pack); + cs->fromTQColor(c, data); pack.paint.w = 15 * m_wetness->value(); // upscale from double to uint16: - pack.paint.h = static_cast< Q_UINT16>(m_strength->value() * (double)(0xffff/2)); + pack.paint.h = static_cast< TQ_UINT16>(m_strength->value() * (double)(0xffff/2)); KisColor color(data, cs); if(m_subject) @@ -219,7 +219,7 @@ void KisWetPaletteWidget::slotWetnessChanged(int n) WetPack pack = *(reinterpret_cast<WetPack*>(color.data())); pack.paint.w = 15 * n; - color.setColor(reinterpret_cast< Q_UINT8*>(&pack), cs); + color.setColor(reinterpret_cast< TQ_UINT8*>(&pack), cs); m_subject->setFGColor(color); } @@ -235,9 +235,9 @@ void KisWetPaletteWidget::slotStrengthChanged(double n) KisColor color = m_subject->fgColor(); color.convertTo(cs); WetPack pack = *(reinterpret_cast<WetPack*>(color.data())); - pack.paint.h = static_cast< Q_UINT16>(n * (double)(0xffff/2)); // upscale from double to uint16 + pack.paint.h = static_cast< TQ_UINT16>(n * (double)(0xffff/2)); // upscale from double to uint16 - color.setColor(reinterpret_cast< Q_UINT8*>(&pack), cs); + color.setColor(reinterpret_cast< TQ_UINT8*>(&pack), cs); m_subject->setFGColor(color); } diff --git a/krita/colorspaces/wet/kis_wet_palette_widget.h b/krita/colorspaces/wet/kis_wet_palette_widget.h index fb2800d3..10c177e6 100644 --- a/krita/colorspaces/wet/kis_wet_palette_widget.h +++ b/krita/colorspaces/wet/kis_wet_palette_widget.h @@ -19,8 +19,8 @@ #ifndef KIS_WET_PALETTE_WIDGET_H #define KIS_WET_PALETTE_WIDGET_H -#include "qwidget.h" -#include "qpushbutton.h" +#include "tqwidget.h" +#include "tqpushbutton.h" #include "kis_canvas_subject.h" #include "kis_canvas_observer.h" @@ -28,28 +28,29 @@ #include <koffice_export.h> class KoFrameButton; -class QGridLayout; -class QColor; -class QLabel; -class QSpinBox; -class QColor; +class TQGridLayout; +class TQColor; +class TQLabel; +class TQSpinBox; +class TQColor; class KIntNumInput; class KDoubleNumInput; class KRITAUI_EXPORT KisWetPaletteWidget - : public QWidget, + : public TQWidget, public KisCanvasObserver { Q_OBJECT - typedef QWidget super; + TQ_OBJECT + typedef TQWidget super; public: - KisWetPaletteWidget(QWidget *parent = 0L, const char *name = 0); + KisWetPaletteWidget(TQWidget *tqparent = 0L, const char *name = 0); virtual ~KisWetPaletteWidget() {} protected slots: - void slotFGColorSelected(const QColor& c); + void slotFGColorSelected(const TQColor& c); void slotWetnessChanged(int); void slotStrengthChanged(double); diff --git a/krita/colorspaces/wet/kis_wetness_visualisation_filter.cc b/krita/colorspaces/wet/kis_wetness_visualisation_filter.cc index 411a3495..53bff69e 100644 --- a/krita/colorspaces/wet/kis_wetness_visualisation_filter.cc +++ b/krita/colorspaces/wet/kis_wetness_visualisation_filter.cc @@ -32,7 +32,7 @@ WetnessVisualisationFilter::WetnessVisualisationFilter(KisView* view) : m_view(view), m_action(0) { - connect(&m_timer, SIGNAL(timeout()), this, SLOT(slotTimeout())); + connect(&m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout())); } // XXX this needs to work on a per-layer basis! diff --git a/krita/colorspaces/wet/kis_wetness_visualisation_filter.h b/krita/colorspaces/wet/kis_wetness_visualisation_filter.h index ad5da5d3..55c1e817 100644 --- a/krita/colorspaces/wet/kis_wetness_visualisation_filter.h +++ b/krita/colorspaces/wet/kis_wetness_visualisation_filter.h @@ -21,15 +21,16 @@ #ifndef _WETNESS_VISUALISATION_FILTER_H #define _WETNESS_VISUALISATION_FILTER_H -#include <qobject.h> -#include <qtimer.h> +#include <tqobject.h> +#include <tqtimer.h> #include <kactionclasses.h> class KisView; -class WetnessVisualisationFilter : public QObject +class WetnessVisualisationFilter : public TQObject { Q_OBJECT + TQ_OBJECT public: WetnessVisualisationFilter(KisView* view); virtual ~WetnessVisualisationFilter() {} @@ -44,7 +45,7 @@ private slots: private: KisView * m_view; KToggleAction * m_action; - QTimer m_timer; + TQTimer m_timer; }; #endif // _WETNESS_VISUALISATION_FILTER_H diff --git a/krita/colorspaces/wet/kis_wetop.cc b/krita/colorspaces/wet/kis_wetop.cc index cff3ac1e..70e07280 100644 --- a/krita/colorspaces/wet/kis_wetop.cc +++ b/krita/colorspaces/wet/kis_wetop.cc @@ -16,8 +16,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qrect.h> -#include <qcheckbox.h> +#include <tqrect.h> +#include <tqcheckbox.h> #include <kdebug.h> @@ -36,10 +36,10 @@ #include "kis_wetop.h" #include "kis_wet_colorspace.h" -KisWetOpSettings::KisWetOpSettings(QWidget *parent) - : super(parent) +KisWetOpSettings::KisWetOpSettings(TQWidget *tqparent) + : super(tqparent) { - m_options = new WetPaintOptions(parent, "wet option widget"); + m_options = new WetPaintOptions(tqparent, "wet option widget"); } bool KisWetOpSettings::varySize() const @@ -67,13 +67,13 @@ KisPaintOp * KisWetOpFactory::createOp(const KisPaintOpSettings *settings, KisPa return op; } -KisPaintOpSettings* KisWetOpFactory::settings(QWidget * parent, const KisInputDevice& inputDevice) +KisPaintOpSettings* KisWetOpFactory::settings(TQWidget * tqparent, const KisInputDevice& inputDevice) { if (inputDevice == KisInputDevice::mouse()) { // No options for mouse, only tablet devices return 0; } else { - return new KisWetOpSettings(parent); + return new KisWetOpSettings(tqparent); } } @@ -120,8 +120,8 @@ void KisWetOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) dab = brush->image(KisMetaRegistry::instance()->csRegistry()->getAlpha8(), inf); } else { - KisAlphaMaskSP mask = brush->mask(inf); - dab = computeDab(mask, KisMetaRegistry::instance()->csRegistry()->getAlpha8()); + KisAlphaMaskSP tqmask = brush->tqmask(inf); + dab = computeDab(tqmask, KisMetaRegistry::instance()->csRegistry()->getAlpha8()); } KisColorSpace * cs = device->colorSpace(); @@ -143,7 +143,7 @@ void KisWetOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) // Get the paint info (we store the strength in the otherwise unused (?) height field of // the paint // double wetness = paint.w; // XXX: Was unused - // strength is a double in the 0 - 2 range, but upscaled to Q_UINT16: + // strength is a double in the 0 - 2 range, but upscaled to TQ_UINT16: //kdDebug() << "Original strength as in paint.h: " << paint.h << endl; double strength = 2.0 * static_cast<double>(paint.h) / (double)(0xffff); @@ -164,15 +164,15 @@ void KisWetOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) double eff_height; double press, contact; - int maskW = brush->maskWidth(inf); - int maskH = brush->maskHeight(inf); + int tqmaskW = brush->tqmaskWidth(inf); + int tqmaskH = brush->tqmaskHeight(inf); KoPoint dest = (pos - (brush->hotSpot(inf))); int xStart = (int)dest.x(); int yStart = (int)dest.y(); - for (int y = 0; y < maskH; y++) { - KisHLineIteratorPixel dabIt = dab->createHLineIterator(0, y, maskW, false); - KisHLineIteratorPixel it = device->createHLineIterator(xStart, yStart+y, maskW, true); + for (int y = 0; y < tqmaskH; y++) { + KisHLineIteratorPixel dabIt = dab->createHLineIterator(0, y, tqmaskW, false); + KisHLineIteratorPixel it = device->createHLineIterator(xStart, yStart+y, tqmaskW, true); while (!dabIt.isDone()) { // This only does something with .paint, and not with adsorb. @@ -226,5 +226,5 @@ void KisWetOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) } } - m_painter->addDirtyRect(QRect(xStart, yStart, maskW, maskH)); + m_painter->addDirtyRect(TQRect(xStart, yStart, tqmaskW, tqmaskH)); } diff --git a/krita/colorspaces/wet/kis_wetop.h b/krita/colorspaces/wet/kis_wetop.h index cc488bf9..37cd594a 100644 --- a/krita/colorspaces/wet/kis_wetop.h +++ b/krita/colorspaces/wet/kis_wetop.h @@ -36,19 +36,19 @@ public: virtual KisPaintOp * createOp(const KisPaintOpSettings *settings, KisPainter * painter); virtual KisID id() { return KisID("wetbrush", i18n("Watercolor Brush")); } virtual bool userVisible(KisColorSpace* cs) { return cs->id() == KisID("WET", ""); } - virtual KisPaintOpSettings *settings(QWidget * parent, const KisInputDevice& inputDevice); + virtual KisPaintOpSettings *settings(TQWidget * tqparent, const KisInputDevice& inputDevice); }; class KisWetOpSettings : public KisPaintOpSettings { typedef KisPaintOpSettings super; public: - KisWetOpSettings(QWidget *parent); + KisWetOpSettings(TQWidget *tqparent); bool varySize() const; bool varyWetness() const; bool varyStrength() const; - virtual QWidget *widget() const { return m_options; } + virtual TQWidget *widget() const { return m_options; } private: WetPaintOptions *m_options; diff --git a/krita/colorspaces/wet/wdgpressure.ui b/krita/colorspaces/wet/wdgpressure.ui index 92161294..96727ff1 100644 --- a/krita/colorspaces/wet/wdgpressure.ui +++ b/krita/colorspaces/wet/wdgpressure.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WetPaintOptions</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WetPaintOptions</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -27,7 +27,7 @@ <string>Pressure effects:</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>checkSize</cstring> </property> @@ -38,7 +38,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>checkWetness</cstring> </property> @@ -46,7 +46,7 @@ <string>Wetness</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>checkStrength</cstring> </property> @@ -56,5 +56,5 @@ </widget> </hbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/krita/colorspaces/wet/wet_plugin.cc b/krita/colorspaces/wet/wet_plugin.cc index cbb4787b..764d104e 100644 --- a/krita/colorspaces/wet/wet_plugin.cc +++ b/krita/colorspaces/wet/wet_plugin.cc @@ -20,13 +20,13 @@ #include <stdlib.h> #include <vector> -#include <qobject.h> -#include <qapplication.h> -#include <qclipboard.h> -#include <qdockwindow.h> -#include <qpoint.h> -#include <qlabel.h> -#include <qwidget.h> +#include <tqobject.h> +#include <tqapplication.h> +#include <tqclipboard.h> +#include <tqdockwindow.h> +#include <tqpoint.h> +#include <tqlabel.h> +#include <tqwidget.h> #include <kactionclasses.h> #include <klocale.h> @@ -66,14 +66,14 @@ typedef KGenericFactory<WetPlugin> WetPluginFactory; K_EXPORT_COMPONENT_FACTORY( kritawetplugin, WetPluginFactory( "kritacore" ) ) -WetPlugin::WetPlugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +WetPlugin::WetPlugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(WetPluginFactory::instance()); // This is not a gui plugin; only load it when the doc is created. - if ( parent->inherits("KisColorSpaceFactoryRegistry") ) { - KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>(parent); + if ( tqparent->inherits("KisColorSpaceFactoryRegistry") ) { + KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>(tqparent); KisColorSpace* colorSpaceWet = new KisWetColorSpace(f, 0); @@ -97,16 +97,16 @@ WetPlugin::WetPlugin(QObject *parent, const char *name, const QStringList &) // Texture Action: f->addPaintDeviceAction(colorSpaceWet, new WetPaintDevAction); } - else if (parent->inherits("KisView")) + else if (tqparent->inherits("KisView")) { setInstance(WetPluginFactory::instance()); setXMLFile(locate("data","kritaplugins/wetplugin.rc"), true); - m_view = dynamic_cast<KisView*>(parent); + m_view = dynamic_cast<KisView*>(tqparent); // Wetness visualisation WetnessVisualisationFilter * wf = new WetnessVisualisationFilter(m_view); wf->setAction(new KToggleAction(i18n("Wetness Visualisation"), 0, 0, wf, - SLOT(slotActivated()), actionCollection(), "wetnessvisualisation")); + TQT_SLOT(slotActivated()), actionCollection(), "wetnessvisualisation")); // Create the wet palette KisWetPaletteWidget * w = new KisWetPaletteWidget(m_view); diff --git a/krita/colorspaces/wet/wet_plugin.h b/krita/colorspaces/wet/wet_plugin.h index 117ee253..d2fdc083 100644 --- a/krita/colorspaces/wet/wet_plugin.h +++ b/krita/colorspaces/wet/wet_plugin.h @@ -32,8 +32,9 @@ class KisWetColorSpace; class WetPlugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - WetPlugin(QObject *parent, const char *name, const QStringList &); + WetPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~WetPlugin(); private: diff --git a/krita/colorspaces/wet/wetphysicsfilter.cc b/krita/colorspaces/wet/wetphysicsfilter.cc index 195a17be..d63574fd 100644 --- a/krita/colorspaces/wet/wetphysicsfilter.cc +++ b/krita/colorspaces/wet/wetphysicsfilter.cc @@ -43,7 +43,7 @@ * [11:16] <CyrilleB> boud: which one then ? * [11:16] <pippin> the error is distributed to the neighbour pixels (to the right, down and down to the left in pixels which have not yet been processed * [11:16] <pippin> ) - * [11:16] <boud> CyrilleB: it's only apparent when you let something dry for some time, it looks like meandering snakes (like the old game "snake") + * [11:16] <boud> CyrilleB: it's only aptqparent when you let something dry for some time, it looks like meandering snakes (like the old game "snake") * [11:16] <CyrilleB> pippin: somehow yes * [11:16] <boud> pippin: that is possible * [11:17] <pippin> boud: this leads to "bleeding" of data to the right and down,.. @@ -55,7 +55,7 @@ * [11:27] <boud> Well, I don't have time to investigate right now, but it sounds very plausible. * [11:27] <CyrilleB> pippin: :) * [11:28] <boud> of course, the code _is_ available :-) - * [11:28] <pippin> if there is some form of diffusion matrix that is directional around the current pixel,. having that mask rotate depending on the modulus of the current iteration # should cancel such an effect out + * [11:28] <pippin> if there is some form of diffusion matrix that is directional around the current pixel,. having that tqmask rotate depending on the modulus of the current iteration # should cancel such an effect out */ WetPhysicsFilter::WetPhysicsFilter() : KisFilter(id(), "artistic", i18n("Dry the Paint")) @@ -63,7 +63,7 @@ WetPhysicsFilter::WetPhysicsFilter() m_adsorbCount = 0; } -void WetPhysicsFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* /*config*/, const QRect& rect) +void WetPhysicsFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* /*config*/, const TQRect& rect) { kdDebug() << "Physics processing " << src->name() << m_adsorbCount << endl; // XXX: It would be nice be able to interleave this, instead of @@ -79,7 +79,7 @@ void WetPhysicsFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFi } -void WetPhysicsFilter::flow(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, const QRect & r) +void WetPhysicsFilter::flow(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, const TQRect & r) { /* XXX: Is this like a convolution operation? BSAR */ int width = r.width(); @@ -88,7 +88,7 @@ void WetPhysicsFilter::flow(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, cons kdDebug() << "Flowing: " << r << endl; /* width of a line in a layer in pixel units, not in bytes -- used to move to the next - line in the fluid masks below */ + line in the fluid tqmasks below */ int rs = width; // rowstride double * flow_t = new double[width * height]; @@ -124,13 +124,13 @@ void WetPhysicsFilter::flow(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, cons // We need three iterators, because we're working on a five-point convolution kernel (no corner pixels are being used) // First iteration: compute fluid deposits around the paper. - Q_INT32 dx, dy; + TQ_INT32 dx, dy; dx = r.x(); dy = r.y(); int ix = width + 1; // keeps track where we are in the one-dimensional arrays - for (Q_INT32 y2 = 1; y2 < height - 1; ++y2) { + for (TQ_INT32 y2 = 1; y2 < height - 1; ++y2) { KisHLineIteratorPixel srcIt = src->createHLineIterator(dx, dy + y2, width, false); KisHLineIteratorPixel upIt = src->createHLineIterator(dx + 1, dy + y2 - 1, width - 2, false); KisHLineIteratorPixel downIt = src->createHLineIterator(dx + 1, dy + y2 + 1, width - 2, false); @@ -181,7 +181,7 @@ void WetPhysicsFilter::flow(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, cons // Second iteration: Reduce flow in dry areas ix = width + 1; - for (Q_INT32 y2 = 1; y2 < height - 1; ++y2) { + for (TQ_INT32 y2 = 1; y2 < height - 1; ++y2) { KisHLineIteratorPixel srcIt = src->createHLineIterator(dx + 1, dy + y2, width - 2, false); while (!srcIt.isDone()) { if ((reinterpret_cast<WetPix*>(srcIt.rawData()))->w > 0) { @@ -203,7 +203,7 @@ void WetPhysicsFilter::flow(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, cons // Third iteration: Combine the paint from the flow areas. ix = width + 1; - for (Q_INT32 y2 = 1; y2 < height - 1; ++y2) { + for (TQ_INT32 y2 = 1; y2 < height - 1; ++y2) { KisHLineIteratorPixel srcIt = src->createHLineIterator(dx, dy + y2, width, false); KisHLineIteratorPixel upIt = src->createHLineIterator(dx + 1, dy + y2 - 1, width - 2, false); KisHLineIteratorPixel downIt = src->createHLineIterator(dx + 1, dy + y2 + 1, width - 2, false); @@ -255,14 +255,14 @@ void WetPhysicsFilter::flow(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, cons delete[] outflow; } -void WetPhysicsFilter::dry(KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect & r) +void WetPhysicsFilter::dry(KisPaintDeviceSP src, KisPaintDeviceSP dst, const TQRect & r) { kdDebug () << "Drying " << r << endl; - for (Q_INT32 y = 0; y < r.height(); y++) { + for (TQ_INT32 y = 0; y < r.height(); y++) { KisHLineIteratorPixel srcIt = src->createHLineIterator(r.x(), r.y() + y, r.width(), false); KisHLineIteratorPixel dstIt = dst->createHLineIterator(r.x(), r.y() + y, r.width(), true); - Q_UINT16 w; + TQ_UINT16 w; while (!srcIt.isDone()) { // Two wet pixels in one KisWetColorSpace pixels. @@ -284,10 +284,10 @@ void WetPhysicsFilter::dry(KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRe } } -void WetPhysicsFilter::adsorb(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, const QRect & r) +void WetPhysicsFilter::adsorb(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, const TQRect & r) { kdDebug() << "Adsorbing " << r << endl; - for (Q_INT32 y = 0; y < r.height(); y++) { + for (TQ_INT32 y = 0; y < r.height(); y++) { KisHLineIteratorPixel srcIt = src->createHLineIterator(r.x(), r.y() + y, r.width(), true); double ads; @@ -296,7 +296,7 @@ void WetPhysicsFilter::adsorb(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, co WetPixDbl wet_bot; WetPack * pack; - Q_UINT16 w; + TQ_UINT16 w; while (!srcIt.isDone()) { // Two wet pixels in one KisWetColorSpace pixels. @@ -312,7 +312,7 @@ void WetPhysicsFilter::adsorb(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, co } else { - ads = 0.5 / QMAX(w, 1); + ads = 0.5 / TQMAX(w, 1); wetPixToDouble(&wet_top, paint); wetPixToDouble(&wet_bot, adsorb); @@ -320,12 +320,12 @@ void WetPhysicsFilter::adsorb(KisPaintDeviceSP src, KisPaintDeviceSP /*dst*/, co mergePixel(&wet_bot, &wet_top, ads, &wet_bot); wetPixFromDouble(adsorb, &wet_bot); - paint->rd = (Q_UINT16) (paint->rd*(1 - ads)); - paint->rw = (Q_UINT16) (paint->rw*(1 - ads)); - paint->gd = (Q_UINT16) (paint->gd*(1 - ads)); - paint->gw = (Q_UINT16) (paint->gw*(1 - ads)); - paint->bd = (Q_UINT16) (paint->bd*(1 - ads)); - paint->bw = (Q_UINT16) (paint->bw*(1 - ads)); + paint->rd = (TQ_UINT16) (paint->rd*(1 - ads)); + paint->rw = (TQ_UINT16) (paint->rw*(1 - ads)); + paint->gd = (TQ_UINT16) (paint->gd*(1 - ads)); + paint->gw = (TQ_UINT16) (paint->gw*(1 - ads)); + paint->bd = (TQ_UINT16) (paint->bd*(1 - ads)); + paint->bw = (TQ_UINT16) (paint->bw*(1 - ads)); ++srcIt; } diff --git a/krita/colorspaces/wet/wetphysicsfilter.h b/krita/colorspaces/wet/wetphysicsfilter.h index a02f8402..a461ab18 100644 --- a/krita/colorspaces/wet/wetphysicsfilter.h +++ b/krita/colorspaces/wet/wetphysicsfilter.h @@ -29,7 +29,7 @@ #include "kis_wet_colorspace.h" class KisID; -class QRect; +class TQRect; /** @@ -46,7 +46,7 @@ class WetPhysicsFilter: public KisFilter public: WetPhysicsFilter(); public: - virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const QRect& r); + virtual void process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration*, const TQRect& r); static inline KisID id() { return KisID("wetphysics", i18n("Watercolor Physics Simulation Filter")); }; @@ -57,11 +57,11 @@ public: private: - void flow(KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect & r); - void dry(KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect & r); + void flow(KisPaintDeviceSP src, KisPaintDeviceSP dst, const TQRect & r); + void dry(KisPaintDeviceSP src, KisPaintDeviceSP dst, const TQRect & r); // Move stuff from the upperlayer to the lower layer. This is filter-level stuff. - void adsorb(KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect & r); + void adsorb(KisPaintDeviceSP src, KisPaintDeviceSP dst, const TQRect & r); // NOTE: this does not set the height fields void combinePixels (WetPixDbl *dst, WetPixDbl *src1, WetPixDbl *src2); @@ -79,7 +79,7 @@ private: private: - Q_INT32 m_adsorbCount; + TQ_INT32 m_adsorbCount; }; |