diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/kofficecore/KoPictureBase.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-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/KoPictureBase.cpp')
-rw-r--r-- | lib/kofficecore/KoPictureBase.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/lib/kofficecore/KoPictureBase.cpp b/lib/kofficecore/KoPictureBase.cpp index e608abc2a..29ec51b9f 100644 --- a/lib/kofficecore/KoPictureBase.cpp +++ b/lib/kofficecore/KoPictureBase.cpp @@ -27,10 +27,10 @@ #include <kglobal.h> #include <kmdcodec.h> -#include <qpainter.h> -#include <qpicture.h> -#include <qpixmap.h> -#include <qdragobject.h> +#include <tqpainter.h> +#include <tqpicture.h> +#include <tqpixmap.h> +#include <tqdragobject.h> static int s_useSlowResizeMode = -1; // unset @@ -64,28 +64,28 @@ bool KoPictureBase::isNull(void) const return true; // A KoPictureBase is always null. } -void KoPictureBase::draw(QPainter& painter, int x, int y, int width, int height, int, int, int, int, bool /*fastMode*/) +void KoPictureBase::draw(TQPainter& painter, int x, int y, int width, int height, int, int, int, int, bool /*fastMode*/) { // Draw a light red box (easier DEBUG) kdWarning(30003) << "Drawing light red rectangle! (KoPictureBase::draw)" << endl; painter.save(); - painter.setBrush(QColor(128,0,0)); + painter.setBrush(TQColor(128,0,0)); painter.drawRect(x,y,width,height); painter.restore(); } -bool KoPictureBase::load(QIODevice* io, const QString& extension) +bool KoPictureBase::load(TQIODevice* io, const TQString& extension) { return loadData(io->readAll(), extension); } -bool KoPictureBase::loadData(const QByteArray&, const QString&) +bool KoPictureBase::loadData(const TQByteArray&, const TQString&) { // Nothing to load! return false; } -bool KoPictureBase::save(QIODevice*) const +bool KoPictureBase::save(TQIODevice*) const { // Nothing to save! return false; @@ -93,28 +93,28 @@ bool KoPictureBase::save(QIODevice*) const bool KoPictureBase::saveAsBase64( KoXmlWriter& writer ) const { - QBuffer buffer; + TQBuffer buffer; buffer.open(IO_ReadWrite); - if ( !save( &buffer ) ) + if ( !save( TQT_TQIODEVICE(&buffer) ) ) return false; - QCString encoded = KCodecs::base64Encode( buffer.buffer() ); + TQCString encoded = KCodecs::base64Encode( buffer.buffer() ); writer.addTextNode( encoded ); return true; } -QSize KoPictureBase::getOriginalSize(void) const +TQSize KoPictureBase::getOriginalSize(void) const { - return QSize(0,0); + return TQSize(0,0); } -QPixmap KoPictureBase::generatePixmap(const QSize&, bool /*smoothScale*/) +TQPixmap KoPictureBase::generatePixmap(const TQSize&, bool /*smoothScale*/) { - return QPixmap(); + return TQPixmap(); } -QString KoPictureBase::getMimeType(const QString&) const +TQString KoPictureBase::getMimeType(const TQString&) const { - return QString(NULL_MIME_TYPE); + return TQString(NULL_MIME_TYPE); } bool KoPictureBase::isSlowResizeModeAllowed(void) const @@ -122,16 +122,16 @@ bool KoPictureBase::isSlowResizeModeAllowed(void) const return s_useSlowResizeMode != 0; } -QDragObject* KoPictureBase::dragObject( QWidget * dragSource, const char * name ) +TQDragObject* KoPictureBase::dragObject( TQWidget * dragSource, const char * name ) { - QImage image (generateImage(getOriginalSize())); + TQImage image (generateImage(getOriginalSize())); if (image.isNull()) return 0L; else - return new QImageDrag( image, dragSource, name ); + return new TQImageDrag( image, dragSource, name ); } -QImage KoPictureBase::generateImage(const QSize& size) +TQImage KoPictureBase::generateImage(const TQSize& size) { return generatePixmap(size,true).convertToImage(); } |