diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-08-02 19:23:46 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-08-02 19:23:46 +0000 |
commit | eba47f8f0637f451e21348187591e1f1fd58ac74 (patch) | |
tree | 448f10b95c656604acc331a3236c1e59bde5c1ad /kfile-plugins/ps | |
parent | c7e8736c69373f48b0401319757c742e8607431a (diff) | |
download | tdegraphics-eba47f8f0637f451e21348187591e1f1fd58ac74.tar.gz tdegraphics-eba47f8f0637f451e21348187591e1f1fd58ac74.zip |
TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1158446 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kfile-plugins/ps')
-rw-r--r-- | kfile-plugins/ps/gscreator.cpp | 38 | ||||
-rw-r--r-- | kfile-plugins/ps/gscreator.h | 6 | ||||
-rw-r--r-- | kfile-plugins/ps/kfile_ps.cpp | 18 | ||||
-rw-r--r-- | kfile-plugins/ps/kfile_ps.h | 6 |
4 files changed, 34 insertions, 34 deletions
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 <errno.h> #include <kdemacros.h> -#include <qcolor.h> -#include <qfile.h> -#include <qimage.h> -#include <qregexp.h> +#include <tqcolor.h> +#include <tqfile.h> +#include <tqimage.h> +#include <tqregexp.h> #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 <filename> 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<unsigned char> bindata(bindatabytes); + TQMemArray<unsigned char> 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 <qfile.h> +#include <tqfile.h> #include <klocale.h> #include <kgenericfactory.h> @@ -30,8 +30,8 @@ typedef KGenericFactory<KPSPlugin> 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); |