summaryrefslogtreecommitdiffstats
path: root/lib/kofficecore/KoPicture.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/kofficecore/KoPicture.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/kofficecore/KoPicture.cpp')
-rw-r--r--lib/kofficecore/KoPicture.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/lib/kofficecore/KoPicture.cpp b/lib/kofficecore/KoPicture.cpp
index 11bb89dd..8e74c0b5 100644
--- a/lib/kofficecore/KoPicture.cpp
+++ b/lib/kofficecore/KoPicture.cpp
@@ -18,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
-#include <qfile.h>
+#include <tqpainter.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kurl.h>
@@ -35,7 +35,7 @@ uint KoPicture::uniqueValue = 0;
KoPicture::KoPicture(void) : m_sharedData(NULL)
{
- m_uniqueName = "Pictures"+ QString::number(uniqueValue++);
+ m_uniqueName = "Pictures"+ TQString::number(uniqueValue++);
}
KoPicture::~KoPicture(void)
@@ -43,7 +43,7 @@ KoPicture::~KoPicture(void)
unlinkSharedData();
}
-QString KoPicture::uniqueName() const
+TQString KoPicture::uniqueName() const
{
return m_uniqueName;
}
@@ -60,12 +60,12 @@ void KoPicture::assignPictureId( uint _id)
m_sharedData->assignPictureId(_id);
}
-QString KoPicture::uniquePictureId() const
+TQString KoPicture::uniquePictureId() const
{
if ( m_sharedData )
return m_sharedData->uniquePictureId();
else
- return QString::null;
+ return TQString();
}
KoPicture& KoPicture::operator=( const KoPicture &other )
@@ -129,7 +129,7 @@ bool KoPicture::isNull(void) const
return true;
}
-void KoPicture::draw(QPainter& painter, int x, int y, int width, int height, int sx, int sy, int sw, int sh, bool fastMode)
+void KoPicture::draw(TQPainter& painter, int x, int y, int width, int height, int sx, int sy, int sw, int sh, bool fastMode)
{
if (m_sharedData)
m_sharedData->draw(painter, x, y, width, height, sx, sy, sw, sh, fastMode);
@@ -138,25 +138,25 @@ void KoPicture::draw(QPainter& painter, int x, int y, int width, int height, int
// Draw a white box
kdWarning(30003) << "Drawing white rectangle! (KoPicture::draw)" << endl;
painter.save();
- painter.setBrush(QColor(255, 255, 255));
+ painter.setBrush(TQColor(255, 255, 255));
painter.drawRect(x,y,width,height);
painter.restore();
}
}
-bool KoPicture::loadXpm(QIODevice* io)
+bool KoPicture::loadXpm(TQIODevice* io)
{
kdDebug(30003) << "KoPicture::loadXpm" << endl;
if (!io)
{
- kdError(30003) << "No QIODevice!" << endl;
+ kdError(30003) << "No TQIODevice!" << endl;
return false;
}
createSharedData();
return m_sharedData->loadXpm(io);
}
-bool KoPicture::save(QIODevice* io) const
+bool KoPicture::save(TQIODevice* io) const
{
if (!io)
return false;
@@ -177,66 +177,66 @@ void KoPicture::clear(void)
unlinkSharedData();
}
-void KoPicture::clearAndSetMode(const QString& newMode)
+void KoPicture::clearAndSetMode(const TQString& newMode)
{
createSharedData();
m_sharedData->clearAndSetMode(newMode);
}
-QString KoPicture::getExtension(void) const
+TQString KoPicture::getExtension(void) const
{
if (m_sharedData)
return m_sharedData->getExtension();
return "null"; // Just a dummy
}
-QString KoPicture::getMimeType(void) const
+TQString KoPicture::getMimeType(void) const
{
if (m_sharedData)
return m_sharedData->getMimeType();
- return QString(NULL_MIME_TYPE);
+ return TQString(NULL_MIME_TYPE);
}
-bool KoPicture::load(QIODevice* io, const QString& extension)
+bool KoPicture::load(TQIODevice* io, const TQString& extension)
{
- kdDebug(30003) << "KoPicture::load(QIODevice*, const QString&) " << extension << endl;
+ kdDebug(30003) << "KoPicture::load(TQIODevice*, const TQString&) " << extension << endl;
createSharedData();
return m_sharedData->load(io,extension);
}
-bool KoPicture::loadFromFile(const QString& fileName)
+bool KoPicture::loadFromFile(const TQString& fileName)
{
kdDebug(30003) << "KoPicture::loadFromFile " << fileName << endl;
createSharedData();
return m_sharedData->loadFromFile(fileName);
}
-bool KoPicture::loadFromBase64( const QCString& str )
+bool KoPicture::loadFromBase64( const TQCString& str )
{
createSharedData();
return m_sharedData->loadFromBase64( str );
}
-QSize KoPicture::getOriginalSize(void) const
+TQSize KoPicture::getOriginalSize(void) const
{
if (m_sharedData)
return m_sharedData->getOriginalSize();
- return QSize(0,0);
+ return TQSize(0,0);
}
-QPixmap KoPicture::generatePixmap(const QSize& size, bool smoothScale)
+TQPixmap KoPicture::generatePixmap(const TQSize& size, bool smoothScale)
{
if (m_sharedData)
return m_sharedData->generatePixmap(size, smoothScale);
- return QPixmap();
+ return TQPixmap();
}
-bool KoPicture::setKeyAndDownloadPicture(const KURL& url, QWidget *window)
+bool KoPicture::setKeyAndDownloadPicture(const KURL& url, TQWidget *window)
{
bool result=false;
- QString tmpFileName;
+ TQString tmpFileName;
if ( KIO::NetAccess::download(url, tmpFileName, window) )
{
KoPictureKey key;
@@ -249,18 +249,18 @@ bool KoPicture::setKeyAndDownloadPicture(const KURL& url, QWidget *window)
return result;
}
-QDragObject* KoPicture::dragObject( QWidget *dragSource, const char *name )
+TQDragObject* KoPicture::dragObject( TQWidget *dragSource, const char *name )
{
if (m_sharedData)
return m_sharedData->dragObject( dragSource, name );
return 0L;
}
-QImage KoPicture::generateImage(const QSize& size)
+TQImage KoPicture::generateImage(const TQSize& size)
{
if (m_sharedData)
return m_sharedData->generateImage( size );
- return QImage();
+ return TQImage();
}
bool KoPicture::hasAlphaBuffer() const
@@ -276,11 +276,11 @@ void KoPicture::setAlphaBuffer(bool enable)
m_sharedData->setAlphaBuffer(enable);
}
-QImage KoPicture::createAlphaMask(int conversion_flags) const
+TQImage KoPicture::createAlphaMask(int conversion_flags) const
{
if (m_sharedData)
return m_sharedData->createAlphaMask(conversion_flags);
- return QImage();
+ return TQImage();
}
void KoPicture::clearCache(void)