From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: 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 --- filters/karbon/png/pngexport.cc | 32 ++++++++++++++++---------------- filters/karbon/png/pngexport.h | 5 +++-- 2 files changed, 19 insertions(+), 18 deletions(-) (limited to 'filters/karbon/png') diff --git a/filters/karbon/png/pngexport.cc b/filters/karbon/png/pngexport.cc index 652074e9..4de61a44 100644 --- a/filters/karbon/png/pngexport.cc +++ b/filters/karbon/png/pngexport.cc @@ -17,12 +17,12 @@ * Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -43,13 +43,13 @@ typedef KGenericFactory PngExportFactory; K_EXPORT_COMPONENT_FACTORY( libkarbonpngexport, PngExportFactory( "kofficefilters" ) ) -PngExport::PngExport( KoFilter*, const char*, const QStringList& ) +PngExport::PngExport( KoFilter*, const char*, const TQStringList& ) : KoFilter() { } -KoFilter::ConversionStatus -PngExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus +PngExport::convert( const TQCString& from, const TQCString& to ) { if ( to != "image/png" || from != "application/x-karbon" ) { @@ -60,9 +60,9 @@ PngExport::convert( const QCString& from, const QCString& to ) if( !storeIn ) return KoFilter::StupidError; - QDomDocument domIn; + TQDomDocument domIn; domIn.setContent( storeIn ); - QDomElement docNode = domIn.documentElement(); + TQDomElement docNode = domIn.documentElement(); // load the document and export it: VDocument doc; @@ -74,18 +74,18 @@ PngExport::convert( const QCString& from, const QCString& to ) const KoRect &rect = bbox.boundingRect(); // create image with correct width and height - QImage img( int( rect.width() ), int( rect.height() ), 32 ); + TQImage img( int( rect.width() ), int( rect.height() ), 32 ); //img.setAlphaBuffer( true ); // Create painter and set up objects to draw VKoPainter p( img.bits(), rect.width(), rect.height() ); - p.clear( qRgba( 0xFF, 0xFF, 0xFF, 0xFF ) ); - p.setWorldMatrix( QWMatrix().translate( -rect.x(), -rect.y() ) ); + p.clear( tqRgba( 0xFF, 0xFF, 0xFF, 0xFF ) ); + p.setWorldMatrix( TQWMatrix().translate( -rect.x(), -rect.y() ) ); doc.draw( &p, &rect ); - QImage image = img.swapRGB(); - QImage mirrored = image.mirror( false, true ); + TQImage image = img.swapRGB(); + TQImage mirrored = image.mirror( false, true ); // save png mirrored.save( m_chain->outputFile(), "PNG" ); diff --git a/filters/karbon/png/pngexport.h b/filters/karbon/png/pngexport.h index a14e81c8..9fe9f7eb 100644 --- a/filters/karbon/png/pngexport.h +++ b/filters/karbon/png/pngexport.h @@ -27,12 +27,13 @@ class PngExport : public KoFilter, private VVisitor { Q_OBJECT + TQ_OBJECT public: - PngExport( KoFilter* parent, const char* name, const QStringList& ); + PngExport( KoFilter* tqparent, const char* name, const TQStringList& ); virtual ~PngExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif -- cgit v1.2.1