From 47c8a359c5276062c4bc17f0e82410f29081b502 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:48:06 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- librss/image.cpp | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'librss/image.cpp') diff --git a/librss/image.cpp b/librss/image.cpp index 66e3e135..4ab66698 100644 --- a/librss/image.cpp +++ b/librss/image.cpp @@ -14,9 +14,9 @@ #include #include -#include -#include -#include +#include +#include +#include using namespace RSS; @@ -25,39 +25,39 @@ struct Image::Private : public Shared Private() : height(31), width(88), pixmapBuffer(NULL) { } - QString title; + TQString title; KURL url; KURL link; - QString description; + TQString description; unsigned int height; unsigned int width; - QBuffer *pixmapBuffer; + TQBuffer *pixmapBuffer; }; -Image::Image() : QObject(), d(new Private) +Image::Image() : TQObject(), d(new Private) { } -Image::Image(const Image &other) : QObject(), d(0) +Image::Image(const Image &other) : TQObject(), d(0) { *this = other; } -Image::Image(const QDomNode &node) : QObject(), d(new Private) +Image::Image(const TQDomNode &node) : TQObject(), d(new Private) { - QString elemText; + TQString elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("title"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("title"))).isNull()) d->title = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("url"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("url"))).isNull()) d->url = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("link"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("link"))).isNull()) d->link = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("description"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("description"))).isNull()) d->description = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("height"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("height"))).isNull()) d->height = elemText.toUInt(); - if (!(elemText = extractNode(node, QString::fromLatin1("width"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("width"))).isNull()) d->width = elemText.toUInt(); } @@ -71,7 +71,7 @@ Image::~Image() } } -QString Image::title() const +TQString Image::title() const { return d->title; } @@ -86,7 +86,7 @@ const KURL &Image::link() const return d->link; } -QString Image::description() const +TQString Image::description() const { return d->description; } @@ -111,21 +111,21 @@ void Image::getPixmap() d->pixmapBuffer->open(IO_WriteOnly); KIO::Job *job = KIO::get(d->url, false, false); - connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)), - this, SLOT(slotData(KIO::Job *, const QByteArray &))); - connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), + this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotResult(KIO::Job *))); } -void Image::slotData(KIO::Job *, const QByteArray &data) +void Image::slotData(KIO::Job *, const TQByteArray &data) { d->pixmapBuffer->writeBlock(data.data(), data.size()); } void Image::slotResult(KIO::Job *job) { - QPixmap pixmap; + TQPixmap pixmap; if (!job->error()) - pixmap = QPixmap(d->pixmapBuffer->buffer()); + pixmap = TQPixmap(d->pixmapBuffer->buffer()); emit gotPixmap(pixmap); delete d->pixmapBuffer; -- cgit v1.2.1