diff options
Diffstat (limited to 'krita/core/kis_adjustment_layer.cc')
-rw-r--r-- | krita/core/kis_adjustment_layer.cc | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/krita/core/kis_adjustment_layer.cc b/krita/core/kis_adjustment_layer.cc index 873b24cf..69e8b939 100644 --- a/krita/core/kis_adjustment_layer.cc +++ b/krita/core/kis_adjustment_layer.cc @@ -18,7 +18,7 @@ */ #include <kdebug.h> -#include <qimage.h> +#include <tqimage.h> #include "kis_debug_areas.h" #include "kis_group_layer.h" @@ -30,7 +30,7 @@ #include "kis_selection.h" #include "kis_fill_painter.h" -KisAdjustmentLayer::KisAdjustmentLayer(KisImageSP img, const QString &name, KisFilterConfiguration * kfc, KisSelectionSP selection) +KisAdjustmentLayer::KisAdjustmentLayer(KisImageSP img, const TQString &name, KisFilterConfiguration * kfc, KisSelectionSP selection) : KisLayer (img, name, OPACITY_OPAQUE) { m_filterConfig = kfc; @@ -38,8 +38,8 @@ KisAdjustmentLayer::KisAdjustmentLayer(KisImageSP img, const QString &name, KisF m_cachedPaintDev = new KisPaintDevice( img->colorSpace(), name.latin1()); m_showSelection = true; Q_ASSERT(m_cachedPaintDev); - connect(img, SIGNAL(sigSelectionChanged(KisImageSP)), - this, SLOT(slotSelectionChanged(KisImageSP))); + connect(img, TQT_SIGNAL(sigSelectionChanged(KisImageSP)), + this, TQT_SLOT(slotSelectionChanged(KisImageSP))); } KisAdjustmentLayer::KisAdjustmentLayer(const KisAdjustmentLayer& rhs) @@ -50,8 +50,8 @@ KisAdjustmentLayer::KisAdjustmentLayer(const KisAdjustmentLayer& rhs) m_selection = new KisSelection( *rhs.m_selection.data() ); m_selection->setParentLayer(this); m_selection->setInterestedInDirtyness(true); - connect(rhs.image(), SIGNAL(sigSelectionChanged(KisImageSP)), - this, SLOT(slotSelectionChanged(KisImageSP))); + connect(rhs.image(), TQT_SIGNAL(sigSelectionChanged(KisImageSP)), + this, TQT_SLOT(slotSelectionChanged(KisImageSP))); } m_cachedPaintDev = new KisPaintDevice( *rhs.m_cachedPaintDev.data() ); m_showSelection = false; @@ -104,7 +104,7 @@ void KisAdjustmentLayer::setSelection(KisSelectionSP selection) gc.bitBlt(0, 0, COMPOSITE_COPY, selection.data(), 0, 0, image()->bounds().width(), image()->bounds().height()); } else { - gc.fillRect(image()->bounds(), KisColor(Qt::white, cs), MAX_SELECTED); + gc.fillRect(image()->bounds(), KisColor(TQt::white, cs), MAX_SELECTED); } gc.end(); @@ -118,14 +118,14 @@ void KisAdjustmentLayer::clearSelection() KisFillPainter gc(m_selection.data()); KisColorSpace * cs = KisMetaRegistry::instance()->csRegistry()->getRGB8(); - QRect bounds = extent(); + TQRect bounds = extent(); bounds |= image()->bounds(); - gc.fillRect(bounds, KisColor(Qt::white, cs), MIN_SELECTED); + gc.fillRect(bounds, KisColor(TQt::white, cs), MIN_SELECTED); gc.end(); } -Q_INT32 KisAdjustmentLayer::x() const +TQ_INT32 KisAdjustmentLayer::x() const { if (m_selection) return m_selection->getX(); @@ -133,7 +133,7 @@ Q_INT32 KisAdjustmentLayer::x() const return 0; } -void KisAdjustmentLayer::setX(Q_INT32 x) +void KisAdjustmentLayer::setX(TQ_INT32 x) { if (m_selection) { m_selection->setX(x); @@ -142,7 +142,7 @@ void KisAdjustmentLayer::setX(Q_INT32 x) } -Q_INT32 KisAdjustmentLayer::y() const +TQ_INT32 KisAdjustmentLayer::y() const { if (m_selection) return m_selection->getY(); @@ -150,7 +150,7 @@ Q_INT32 KisAdjustmentLayer::y() const return 0; } -void KisAdjustmentLayer::setY(Q_INT32 y) +void KisAdjustmentLayer::setY(TQ_INT32 y) { if (m_selection) { m_selection->setY(y); @@ -158,24 +158,24 @@ void KisAdjustmentLayer::setY(Q_INT32 y) } } -QRect KisAdjustmentLayer::extent() const +TQRect KisAdjustmentLayer::extent() const { if (m_selection) return m_selection->selectedRect(); else if (image()) return image()->bounds(); else - return QRect(); + return TQRect(); } -QRect KisAdjustmentLayer::exactBounds() const +TQRect KisAdjustmentLayer::exactBounds() const { if (m_selection) return m_selection->selectedRect(); else if (image()) return image()->bounds(); else - return QRect(); + return TQRect(); } bool KisAdjustmentLayer::accept(KisLayerVisitor & v) @@ -183,22 +183,22 @@ bool KisAdjustmentLayer::accept(KisLayerVisitor & v) return v.visit( this ); } -void KisAdjustmentLayer::paintSelection(QImage &img, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) +void KisAdjustmentLayer::paintSelection(TQImage &img, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) { if (showSelection() && selection()) selection()->paintSelection(img, x, y, w, h); } -void KisAdjustmentLayer::paintSelection(QImage &img, const QRect& scaledImageRect, const QSize& scaledImageSize, const QSize& imageSize) +void KisAdjustmentLayer::paintSelection(TQImage &img, const TQRect& scaledImageRect, const TQSize& scaledImageSize, const TQSize& imageSize) { if (showSelection() && selection()) selection()->paintSelection(img, scaledImageRect, scaledImageSize, imageSize); } -QImage KisAdjustmentLayer::createThumbnail(Q_INT32 w, Q_INT32 h) +TQImage KisAdjustmentLayer::createThumbnail(TQ_INT32 w, TQ_INT32 h) { if (!selection()) - return QImage(); + return TQImage(); int srcw, srch; if( image() ) @@ -208,7 +208,7 @@ QImage KisAdjustmentLayer::createThumbnail(Q_INT32 w, Q_INT32 h) } else { - const QRect e = extent(); + const TQRect e = extent(); srcw = e.width(); srch = e.height(); } @@ -216,29 +216,29 @@ QImage KisAdjustmentLayer::createThumbnail(Q_INT32 w, Q_INT32 h) if (w > srcw) { w = srcw; - h = Q_INT32(double(srcw) / w * h); + h = TQ_INT32(double(srcw) / w * h); } if (h > srch) { h = srch; - w = Q_INT32(double(srch) / h * w); + w = TQ_INT32(double(srch) / h * w); } if (srcw > srch) - h = Q_INT32(double(srch) / srcw * w); + h = TQ_INT32(double(srch) / srcw * w); else if (srch > srcw) - w = Q_INT32(double(srcw) / srch * h); + w = TQ_INT32(double(srcw) / srch * h); - QColor c; - Q_UINT8 opacity; - QImage img(w,h,32); + TQColor c; + TQ_UINT8 opacity; + TQImage img(w,h,32); - for (Q_INT32 y=0; y < h; ++y) { - Q_INT32 iY = (y * srch ) / h; - for (Q_INT32 x=0; x < w; ++x) { - Q_INT32 iX = (x * srcw ) / w; + for (TQ_INT32 y=0; y < h; ++y) { + TQ_INT32 iY = (y * srch ) / h; + for (TQ_INT32 x=0; x < w; ++x) { + TQ_INT32 iX = (x * srcw ) / w; m_selection->pixel(iX, iY, &c, &opacity); - img.setPixel(x, y, qRgb(opacity, opacity, opacity)); + img.setPixel(x, y, tqRgb(opacity, opacity, opacity)); } } |