From e69e8b1d09fb579316595b4e6a850e717358a8b1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sun, 19 Jun 2011 19:03:33 +0000 Subject: TQt4 port kdegraphics This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kfile-plugins/ps/gscreator.cpp | 12 ++++++------ kfile-plugins/ps/kfile_ps.cpp | 4 ++-- kfile-plugins/ps/kfile_ps.h | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) (limited to 'kfile-plugins/ps') diff --git a/kfile-plugins/ps/gscreator.cpp b/kfile-plugins/ps/gscreator.cpp index 0f0c50e8..9a9bafd7 100644 --- a/kfile-plugins/ps/gscreator.cpp +++ b/kfile-plugins/ps/gscreator.cpp @@ -20,7 +20,7 @@ */ /* This function gets a path of a DVI, EPS, PS or PDF file and - produces a PNG-Thumbnail which is stored as a QImage + produces a PNG-Thumbnail which is stored as a TQImage The program works as follows @@ -46,7 +46,7 @@ 9. Turn the PS,PDF or EPS file into a PNG file using gs 10. Parent process (1) - store data in a QImage + store data in a TQImage */ #ifdef HAVE_CONFIG_H @@ -176,7 +176,7 @@ bool GSCreator::create(const TQString &path, int width, int height, TQImage &img { // The code in the loop (when testing whether got_sig_term got set) // should read some variation of: -// parentJob()->wasKilled() +// tqparentJob()->wasKilled() // // Unfortunatelly, that's currently impossible without breaking BIC. // So we need to catch the signal ourselves. @@ -234,7 +234,7 @@ bool GSCreator::create(const TQString &path, int width, int height, TQImage &img } const bool is_encapsulated = no_dvi && - (path.find(TQRegExp("\\.epsi?$", false, false)) > 0) && + (path.tqfind(TQRegExp("\\.epsi?$", false, false)) > 0) && (dsc.bbox()->width() > 0) && (dsc.bbox()->height() > 0) && (dsc.page_count() <= 1); @@ -521,7 +521,7 @@ bool GSCreator::getEPSIPreview(const TQString &path, long start, long return false; } - TQString previewstr = TQString::fromLatin1(buf); + TQString previewstr = TQString::tqfromLatin1(buf); free(buf); int offset = 0; @@ -567,7 +567,7 @@ bool GSCreator::getEPSIPreview(const TQString &path, long start, long for (unsigned int gray = 0; gray < colors; gray++) { unsigned int grayvalue = (255U * (colors - 1 - gray)) / (colors - 1); - img.setColor(gray, qRgb(grayvalue, grayvalue, grayvalue)); + img.setColor(gray, tqRgb(grayvalue, grayvalue, grayvalue)); } } diff --git a/kfile-plugins/ps/kfile_ps.cpp b/kfile-plugins/ps/kfile_ps.cpp index 01136d88..7121af1b 100644 --- a/kfile-plugins/ps/kfile_ps.cpp +++ b/kfile-plugins/ps/kfile_ps.cpp @@ -30,9 +30,9 @@ typedef KGenericFactory PSFactory; K_EXPORT_COMPONENT_FACTORY(kfile_ps, PSFactory("kfile_ps")) -KPSPlugin::KPSPlugin(TQObject *parent, const char *name, +KPSPlugin::KPSPlugin(TQObject *tqparent, const char *name, const TQStringList &preferredItems) : - KFilePlugin( parent, name, preferredItems ) + KFilePlugin( tqparent, name, preferredItems ) { kdDebug(7034) << "ps plugin\n"; diff --git a/kfile-plugins/ps/kfile_ps.h b/kfile-plugins/ps/kfile_ps.h index 96a400a8..1b978713 100644 --- a/kfile-plugins/ps/kfile_ps.h +++ b/kfile-plugins/ps/kfile_ps.h @@ -30,8 +30,9 @@ class TQStringList; class KPSPlugin: public KFilePlugin, public KDSCCommentHandler { Q_OBJECT + TQ_OBJECT public: - KPSPlugin( TQObject *parent, const char *name, + KPSPlugin( TQObject *tqparent, const char *name, const TQStringList& preferredItems ); virtual bool readInfo( KFileMetaInfo& info, uint what); -- cgit v1.2.1