summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/kopetepicture.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/libkopete/kopetepicture.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/libkopete/kopetepicture.cpp')
-rw-r--r--kopete/libkopete/kopetepicture.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/kopete/libkopete/kopetepicture.cpp b/kopete/libkopete/kopetepicture.cpp
index 1c586b40..05468c21 100644
--- a/kopete/libkopete/kopetepicture.cpp
+++ b/kopete/libkopete/kopetepicture.cpp
@@ -16,7 +16,7 @@
*/
#include "kopetepicture.h"
-#include <qbuffer.h>
+#include <tqbuffer.h>
#include <kabc/picture.h>
@@ -33,9 +33,9 @@ public:
Private()
{}
- QString pictureBase64;
- QImage pictureImage;
- QString picturePath;
+ TQString pictureBase64;
+ TQImage pictureImage;
+ TQString picturePath;
};
Picture::Picture()
@@ -43,13 +43,13 @@ Picture::Picture()
{
}
-Picture::Picture(const QString &path)
+Picture::Picture(const TQString &path)
: d(new Private)
{
setPicture(path);
}
-Picture::Picture(const QImage &image)
+Picture::Picture(const TQImage &image)
: d(new Private)
{
setPicture(image);
@@ -74,25 +74,25 @@ Picture &Picture::operator=(const Picture &other)
return *this;
}
-QImage Picture::image()
+TQImage Picture::image()
{
// Do the conversion if only needed.
// If the image is null, the path is not empty then.
if( d->pictureImage.isNull() )
{
- d->pictureImage = QImage(d->picturePath);
+ d->pictureImage = TQImage(d->picturePath);
}
return d->pictureImage;
}
-QString Picture::base64()
+TQString Picture::base64()
{
if( d->pictureBase64.isEmpty() )
{
// Generate base64 cache for the picture.
- QByteArray tempArray;
- QBuffer tempBuffer( tempArray );
+ TQByteArray tempArray;
+ TQBuffer tempBuffer( tempArray );
tempBuffer.open( IO_WriteOnly );
// Make sure it create a image cache.
if( image().save( &tempBuffer, "PNG" ) )
@@ -104,23 +104,23 @@ QString Picture::base64()
return d->pictureBase64;
}
-QString Picture::path()
+TQString Picture::path()
{
if( d->picturePath.isEmpty() )
{
// For a image source, finding a filename is tricky.
// I decided to use MD5 Hash as the filename.
- QString localPhotoPath;
+ TQString localPhotoPath;
// Generate MD5 Hash for the image.
- QByteArray tempArray;
- QBuffer tempBuffer(tempArray);
+ TQByteArray tempArray;
+ TQBuffer tempBuffer(tempArray);
tempBuffer.open( IO_WriteOnly );
image().save(&tempBuffer, "PNG");
KMD5 context(tempArray);
// Save the image to a file.
localPhotoPath = context.hexDigest() + ".png";
- localPhotoPath = locateLocal( "appdata", QString::fromUtf8("metacontactpicturecache/%1").arg( localPhotoPath) );
+ localPhotoPath = locateLocal( "appdata", TQString::fromUtf8("metacontactpicturecache/%1").arg( localPhotoPath) );
if( image().save(localPhotoPath, "PNG") )
{
d->picturePath = localPhotoPath;
@@ -145,30 +145,30 @@ bool Picture::isNull()
void Picture::clear()
{
detach();
- d->pictureBase64 = QString::null;
- d->picturePath = QString::null;
- d->pictureImage = QImage();
+ d->pictureBase64 = TQString::null;
+ d->picturePath = TQString::null;
+ d->pictureImage = TQImage();
}
-void Picture::setPicture(const QImage &image)
+void Picture::setPicture(const TQImage &image)
{
detach();
d->pictureImage = image;
// Clear the path and base64, it will call the update of then when "getted"
- d->picturePath= QString::null;
- d->pictureBase64 = QString::null;
+ d->picturePath= TQString::null;
+ d->pictureBase64 = TQString::null;
}
-void Picture::setPicture(const QString &path)
+void Picture::setPicture(const TQString &path)
{
detach();
d->picturePath = path;
// Clear the image and base64, it will call the update of then when "getted"
- d->pictureImage = QImage();
- d->pictureBase64 = QString::null;
+ d->pictureImage = TQImage();
+ d->pictureBase64 = TQString::null;
}
void Picture::setPicture(const KABC::Picture &picture)