diff options
Diffstat (limited to 'digikam/utilities/imageeditor/editor/imageiface.cpp')
-rw-r--r-- | digikam/utilities/imageeditor/editor/imageiface.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/digikam/utilities/imageeditor/editor/imageiface.cpp b/digikam/utilities/imageeditor/editor/imageiface.cpp index 600482c..d6134b3 100644 --- a/digikam/utilities/imageeditor/editor/imageiface.cpp +++ b/digikam/utilities/imageeditor/editor/imageiface.cpp @@ -22,13 +22,13 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qwidget.h> -#include <qsize.h> -#include <qpixmap.h> -#include <qbitmap.h> -#include <qpainter.h> +#include <tqwidget.h> +#include <tqsize.h> +#include <tqpixmap.h> +#include <tqbitmap.h> +#include <tqpainter.h> // Local includes. @@ -67,9 +67,9 @@ public: int previewWidth; int previewHeight; - QPixmap qcheck; - QPixmap qpix; - QBitmap qmask; + TQPixmap qcheck; + TQPixmap qpix; + TQBitmap qtqmask; DImg previewImage; DImg targetPreviewImage; @@ -86,15 +86,15 @@ ImageIface::ImageIface(int w, int h) d->originalHeight = DImgInterface::defaultInterface()->origHeight(); d->originalBytesDepth = DImgInterface::defaultInterface()->bytesDepth(); - d->qpix.setMask(d->qmask); + d->qpix.setMask(d->qtqmask); d->qcheck.resize(8, 8); - QPainter p; + TQPainter p; p.begin(&d->qcheck); - p.fillRect(0, 0, 4, 4, QColor(144,144,144)); - p.fillRect(4, 4, 4, 4, QColor(144,144,144)); - p.fillRect(0, 4, 4, 4, QColor(100,100,100)); - p.fillRect(4, 0, 4, 4, QColor(100,100,100)); + p.fillRect(0, 0, 4, 4, TQColor(144,144,144)); + p.fillRect(4, 4, 4, 4, TQColor(144,144,144)); + p.fillRect(0, 4, 4, 4, TQColor(100,100,100)); + p.fillRect(4, 0, 4, 4, TQColor(100,100,100)); p.end(); } @@ -113,7 +113,7 @@ bool ImageIface::previewType() return d->usePreviewSelection; } -DColor ImageIface::getColorInfoFromOriginalImage(const QPoint& point) +DColor ImageIface::getColorInfoFromOriginalImage(const TQPoint& point) { if ( !DImgInterface::defaultInterface()->getImage() || point.x() > originalWidth() || point.y() > originalHeight() ) { @@ -124,7 +124,7 @@ DColor ImageIface::getColorInfoFromOriginalImage(const QPoint& point) return DImgInterface::defaultInterface()->getImg()->getPixelColor(point.x(), point.y()); } -DColor ImageIface::getColorInfoFromPreviewImage(const QPoint& point) +DColor ImageIface::getColorInfoFromPreviewImage(const TQPoint& point) { if ( d->previewImage.isNull() || point.x() > previewWidth() || point.y() > previewHeight() ) { @@ -135,7 +135,7 @@ DColor ImageIface::getColorInfoFromPreviewImage(const QPoint& point) return d->previewImage.getPixelColor(point.x(), point.y()); } -DColor ImageIface::getColorInfoFromTargetPreviewImage(const QPoint& point) +DColor ImageIface::getColorInfoFromTargetPreviewImage(const TQPoint& point) { if ( d->targetPreviewImage.isNull() || point.x() > previewWidth() || point.y() > previewHeight() ) { @@ -189,8 +189,8 @@ uchar* ImageIface::getPreviewImage() const } } - QSize sz(im->width(), im->height()); - sz.scale(d->constrainWidth, d->constrainHeight, QSize::ScaleMin); + TQSize sz(im->width(), im->height()); + sz.tqscale(d->constrainWidth, d->constrainHeight, TQSize::ScaleMin); d->previewImage = im->smoothScale(sz.width(), sz.height()); d->previewWidth = d->previewImage.width(); @@ -199,7 +199,7 @@ uchar* ImageIface::getPreviewImage() const // only create another copy if needed, in putPreviewImage d->targetPreviewImage = d->previewImage; - d->qmask.resize(d->previewWidth, d->previewHeight); + d->qtqmask.resize(d->previewWidth, d->previewHeight); d->qpix.resize(d->previewWidth, d->previewHeight); if (d->usePreviewSelection) @@ -248,7 +248,7 @@ void ImageIface::putPreviewImage(uchar* data) } } -void ImageIface::putOriginalImage(const QString &caller, uchar* data, int w, int h) +void ImageIface::putOriginalImage(const TQString &caller, uchar* data, int w, int h) { if (!data) return; @@ -256,12 +256,12 @@ void ImageIface::putOriginalImage(const QString &caller, uchar* data, int w, int DImgInterface::defaultInterface()->putImage(caller, data, w, h); } -void ImageIface::setEmbeddedICCToOriginalImage(const QString& profilePath) +void ImageIface::setEmbeddedICCToOriginalImage(const TQString& profilePath) { DImgInterface::defaultInterface()->setEmbeddedICCToOriginalImage( profilePath ); } -void ImageIface::putImageSelection(const QString &caller, uchar* data) +void ImageIface::putImageSelection(const TQString &caller, uchar* data) { if (!data) return; @@ -358,22 +358,22 @@ void ImageIface::convertOriginalColorDepth(int depth) DImgInterface::defaultInterface()->convertDepth(depth); } -QPixmap ImageIface::convertToPixmap(DImg& img) +TQPixmap ImageIface::convertToPixmap(DImg& img) { return DImgInterface::defaultInterface()->convertToPixmap(img); } -QByteArray ImageIface::getEmbeddedICCFromOriginalImage() +TQByteArray ImageIface::getEmbeddedICCFromOriginalImage() { return DImgInterface::defaultInterface()->getEmbeddedICC(); } -QByteArray ImageIface::getExifFromOriginalImage() +TQByteArray ImageIface::getExifFromOriginalImage() { return DImgInterface::defaultInterface()->getExif(); } -QByteArray ImageIface::getIptcFromOriginalImage() +TQByteArray ImageIface::getIptcFromOriginalImage() { return DImgInterface::defaultInterface()->getIptc(); } @@ -386,19 +386,19 @@ PhotoInfoContainer ImageIface::getPhotographInformations() const return meta.getPhotographInformations(); } -void ImageIface::paint(QPaintDevice* device, int x, int y, int w, int h, +void ImageIface::paint(TQPaintDevice* device, int x, int y, int w, int h, bool underExposure, bool overExposure) { if ( !d->targetPreviewImage.isNull() ) { if (d->targetPreviewImage.hasAlpha()) { - QPainter p(&d->qpix); + TQPainter p(&d->qpix); p.drawTiledPixmap(0, 0, d->qpix.width(), d->qpix.height(), d->qcheck); p.end(); } - QPixmap pixImage; + TQPixmap pixImage; ICCSettingsContainer *iccSettings = DImgInterface::defaultInterface()->getICCSettings(); if (iccSettings) @@ -420,7 +420,7 @@ void ImageIface::paint(QPaintDevice* device, int x, int y, int w, int h, pixImage = d->targetPreviewImage.convertToPixmap(); } - bitBlt(&d->qpix, 0, 0, &pixImage, 0, 0, w, h, Qt::CopyROP, false); + bitBlt(TQT_TQPAINTDEVICE(&d->qpix), 0, 0, TQT_TQPAINTDEVICE(&pixImage), 0, 0, w, h, TQt::CopyROP, false); // Show the Over/Under exposure pixels indicators @@ -432,13 +432,13 @@ void ImageIface::paint(QPaintDevice* device, int x, int y, int w, int h, expoSettings.underExposureColor = DImgInterface::defaultInterface()->underExposureColor(); expoSettings.overExposureColor = DImgInterface::defaultInterface()->overExposureColor(); - QImage pureColorMask = d->targetPreviewImage.pureColorMask(&expoSettings); - QPixmap pixMask(pureColorMask); - bitBlt(&d->qpix, 0, 0, &pixMask, 0, 0, w, h, Qt::CopyROP, false); + TQImage pureColorMask = d->targetPreviewImage.pureColorMask(&expoSettings); + TQPixmap pixMask(pureColorMask); + bitBlt(TQT_TQPAINTDEVICE(&d->qpix), 0, 0, TQT_TQPAINTDEVICE(&pixMask), 0, 0, w, h, TQt::CopyROP, false); } } - bitBlt(device, x, y, &d->qpix, 0, 0, -1, -1, Qt::CopyROP, false); + bitBlt(TQT_TQPAINTDEVICE(device), x, y, TQT_TQPAINTDEVICE(&d->qpix), 0, 0, -1, -1, TQt::CopyROP, false); } } // namespace Digikam |