From eba47f8f0637f451e21348187591e1f1fd58ac74 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 2 Aug 2010 19:23:46 +0000 Subject: TQt conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1158446 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kfile-plugins/ps/gscreator.cpp | 38 +++++++++++++++++++------------------- kfile-plugins/ps/gscreator.h | 6 +++--- kfile-plugins/ps/kfile_ps.cpp | 18 +++++++++--------- kfile-plugins/ps/kfile_ps.h | 6 +++--- 4 files changed, 34 insertions(+), 34 deletions(-) (limited to 'kfile-plugins/ps') diff --git a/kfile-plugins/ps/gscreator.cpp b/kfile-plugins/ps/gscreator.cpp index 33cbc141..0f0c50e8 100644 --- a/kfile-plugins/ps/gscreator.cpp +++ b/kfile-plugins/ps/gscreator.cpp @@ -69,10 +69,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "gscreator.h" @@ -161,7 +161,7 @@ static const char *dvipsargs[] = { 0 }; -static bool correctDVI(const QString& filename); +static bool correctDVI(const TQString& filename); namespace { @@ -172,7 +172,7 @@ namespace { } -bool GSCreator::create(const QString &path, int width, int height, QImage &img) +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: @@ -194,7 +194,7 @@ bool GSCreator::create(const QString &path, int width, int height, QImage &img) int output[2]; int dvipipe[2]; - QByteArray data(1024); + TQByteArray data(1024); bool ok = false; @@ -216,7 +216,7 @@ bool GSCreator::create(const QString &path, int width, int height, QImage &img) if (no_dvi) { - FILE* fp = fopen(QFile::encodeName(path), "r"); + FILE* fp = fopen(TQFile::encodeName(path), "r"); if (fp == 0) return false; char buf[4096]; @@ -234,7 +234,7 @@ bool GSCreator::create(const QString &path, int width, int height, QImage &img) } const bool is_encapsulated = no_dvi && - (path.find(QRegExp("\\.epsi?$", false, false)) > 0) && + (path.find(TQRegExp("\\.epsi?$", false, false)) > 0) && (dsc.bbox()->width() > 0) && (dsc.bbox()->height() > 0) && (dsc.page_count() <= 1); @@ -246,7 +246,7 @@ bool GSCreator::create(const QString &path, int width, int height, QImage &img) // GhostScript's rendering at the extremely low resolutions // required for thumbnails leaves something to be desired. To // get nicer images, we render to four times the required - // resolution and let QImage scale the result. + // resolution and let TQImage scale the result. const int hres = (width * 72) / bbox->width(); const int vres = (height * 72) / bbox->height(); const int resolution = (hres > vres ? vres : hres) * 4; @@ -317,7 +317,7 @@ bool GSCreator::create(const QString &path, int width, int height, QImage &img) } // find next zero entry and put the filename there - QCString fname = QFile::encodeName( path ); + TQCString fname = TQFile::encodeName( path ); while (*arg) ++arg; if( no_dvi ) @@ -478,9 +478,9 @@ void GSCreator::comment(Name name) // Quick function to check if the filename corresponds to a valid DVI // file. Returns true if is a DVI file, false otherwise. -static bool correctDVI(const QString& filename) +static bool correctDVI(const TQString& filename) { - QFile f(filename); + TQFile f(filename); if (!f.open(IO_ReadOnly)) return FALSE; @@ -501,11 +501,11 @@ static bool correctDVI(const QString& filename) return TRUE; } -bool GSCreator::getEPSIPreview(const QString &path, long start, long - end, QImage &outimg, int imgwidth, int imgheight) +bool GSCreator::getEPSIPreview(const TQString &path, long start, long + end, TQImage &outimg, int imgwidth, int imgheight) { FILE *fp; - fp = fopen(QFile::encodeName(path), "r"); + fp = fopen(TQFile::encodeName(path), "r"); if (fp == 0) return false; const long previewsize = end - start + 1; @@ -521,7 +521,7 @@ bool GSCreator::getEPSIPreview(const QString &path, long start, long return false; } - QString previewstr = QString::fromLatin1(buf); + TQString previewstr = TQString::fromLatin1(buf); free(buf); int offset = 0; @@ -560,7 +560,7 @@ bool GSCreator::getEPSIPreview(const QString &path, long start, long } unsigned int colors = (1U << depth); - QImage img(width, height, imagedepth, colors); + TQImage img(width, height, imagedepth, colors); img.setAlphaBuffer(false); if (imagedepth <= 8) { @@ -575,7 +575,7 @@ bool GSCreator::getEPSIPreview(const QString &path, long start, long unsigned int bytes_per_scan_line = bits_per_scan_line / 8; if (bits_per_scan_line % 8) bytes_per_scan_line++; const unsigned int bindatabytes = height * bytes_per_scan_line; - QMemArray bindata(bindatabytes); + TQMemArray bindata(bindatabytes); for (unsigned int i = 0; i < bindatabytes; i++) { if (offset >= previewsize) diff --git a/kfile-plugins/ps/gscreator.h b/kfile-plugins/ps/gscreator.h index b91fb0b0..7139b233 100644 --- a/kfile-plugins/ps/gscreator.h +++ b/kfile-plugins/ps/gscreator.h @@ -27,14 +27,14 @@ class GSCreator : public ThumbCreator, public KDSCCommentHandler { public: GSCreator() {}; - virtual bool create(const QString &path, int, int, QImage &img); + virtual bool create(const TQString &path, int, int, TQImage &img); virtual Flags flags() const; void comment(Name name); private: - static bool getEPSIPreview(const QString &path, + static bool getEPSIPreview(const TQString &path, long start, long end, - QImage &outimg, + TQImage &outimg, int imgwidth, int imgheight); bool endComments; }; diff --git a/kfile-plugins/ps/kfile_ps.cpp b/kfile-plugins/ps/kfile_ps.cpp index 6d3caa31..01136d88 100644 --- a/kfile-plugins/ps/kfile_ps.cpp +++ b/kfile-plugins/ps/kfile_ps.cpp @@ -20,7 +20,7 @@ #include "kfile_ps.h" -#include +#include #include #include @@ -30,8 +30,8 @@ typedef KGenericFactory PSFactory; K_EXPORT_COMPONENT_FACTORY(kfile_ps, PSFactory("kfile_ps")) -KPSPlugin::KPSPlugin(QObject *parent, const char *name, - const QStringList &preferredItems) : +KPSPlugin::KPSPlugin(TQObject *parent, const char *name, + const TQStringList &preferredItems) : KFilePlugin( parent, name, preferredItems ) { kdDebug(7034) << "ps plugin\n"; @@ -47,11 +47,11 @@ void KPSPlugin::makeMimeTypeInfo( const char* mimeType ) // general group KFileMimeTypeInfo::GroupInfo* group = addGroupInfo(info, "General", i18n("General")); - addItemInfo(group, "Title", i18n("Title"), QVariant::String); - addItemInfo(group, "Creator", i18n("Creator"), QVariant::String); - addItemInfo(group, "CreationDate", i18n("Creation Date"), QVariant::String); - addItemInfo(group, "For", i18n("For"), QVariant::String); - addItemInfo(group, "Pages", i18n("Pages"), QVariant::UInt); + addItemInfo(group, "Title", i18n("Title"), TQVariant::String); + addItemInfo(group, "Creator", i18n("Creator"), TQVariant::String); + addItemInfo(group, "CreationDate", i18n("Creation Date"), TQVariant::String); + addItemInfo(group, "For", i18n("For"), TQVariant::String); + addItemInfo(group, "Pages", i18n("Pages"), TQVariant::UInt); } bool KPSPlugin::readInfo( KFileMetaInfo& info, uint /* what */) @@ -63,7 +63,7 @@ bool KPSPlugin::readInfo( KFileMetaInfo& info, uint /* what */) _dsc = new KDSC; _dsc->setCommentHandler( this ); - FILE* fp = fopen( QFile::encodeName( info.path() ), "r" ); + FILE* fp = fopen( TQFile::encodeName( info.path() ), "r" ); if( fp == 0 ) return false; diff --git a/kfile-plugins/ps/kfile_ps.h b/kfile-plugins/ps/kfile_ps.h index 339020d1..96a400a8 100644 --- a/kfile-plugins/ps/kfile_ps.h +++ b/kfile-plugins/ps/kfile_ps.h @@ -25,14 +25,14 @@ #include "dscparse_adapter.h" -class QStringList; +class TQStringList; class KPSPlugin: public KFilePlugin, public KDSCCommentHandler { Q_OBJECT public: - KPSPlugin( QObject *parent, const char *name, - const QStringList& preferredItems ); + KPSPlugin( TQObject *parent, const char *name, + const TQStringList& preferredItems ); virtual bool readInfo( KFileMetaInfo& info, uint what); -- cgit v1.2.1