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 /filters/karbon/png | |
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 'filters/karbon/png')
-rw-r--r-- | filters/karbon/png/pngexport.cc | 32 | ||||
-rw-r--r-- | filters/karbon/png/pngexport.h | 5 |
2 files changed, 19 insertions, 18 deletions
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 <qcstring.h> -#include <qdom.h> -#include <qfile.h> -#include <qstring.h> -#include <qvaluelist.h> -#include <qimage.h> +#include <tqcstring.h> +#include <tqdom.h> +#include <tqfile.h> +#include <tqstring.h> +#include <tqvaluelist.h> +#include <tqimage.h> #include <kgenericfactory.h> #include <KoFilter.h> @@ -43,13 +43,13 @@ typedef KGenericFactory<PngExport, KoFilter> 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 |