summaryrefslogtreecommitdiffstats
path: root/kfile-plugins/pnm/kfile_pnm.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-02 19:23:46 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-02 19:23:46 +0000
commiteba47f8f0637f451e21348187591e1f1fd58ac74 (patch)
tree448f10b95c656604acc331a3236c1e59bde5c1ad /kfile-plugins/pnm/kfile_pnm.cpp
parentc7e8736c69373f48b0401319757c742e8607431a (diff)
downloadtdegraphics-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/pnm/kfile_pnm.cpp')
-rw-r--r--kfile-plugins/pnm/kfile_pnm.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/kfile-plugins/pnm/kfile_pnm.cpp b/kfile-plugins/pnm/kfile_pnm.cpp
index b0a1dcca..abe576b4 100644
--- a/kfile-plugins/pnm/kfile_pnm.cpp
+++ b/kfile-plugins/pnm/kfile_pnm.cpp
@@ -21,8 +21,8 @@
#include <math.h>
#include <kgenericfactory.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
static const char* formats[] = {
I18N_NOOP("plain"),
@@ -33,14 +33,14 @@ typedef KGenericFactory<KPnmPlugin> PnmFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_pnm, PnmFactory("kfile_pnm"))
-KPnmPlugin::KPnmPlugin(QObject *parent, const char *name, const QStringList &args) : KFilePlugin(parent, name, args)
+KPnmPlugin::KPnmPlugin(TQObject *parent, const char *name, const TQStringList &args) : KFilePlugin(parent, name, args)
{
makeMimeTypeInfo( "image/x-portable-bitmap" );
makeMimeTypeInfo( "image/x-portable-greymap" );
makeMimeTypeInfo( "image/x-portable-pixmap" );
}
-void KPnmPlugin::makeMimeTypeInfo(const QString& mimetype)
+void KPnmPlugin::makeMimeTypeInfo(const TQString& mimetype)
{
KFileMimeTypeInfo* info = addMimeTypeInfo( mimetype );
@@ -49,26 +49,26 @@ void KPnmPlugin::makeMimeTypeInfo(const QString& mimetype)
group = addGroupInfo(info, "General", i18n("General"));
- addItemInfo(group, "Format", i18n("Format"), QVariant::String);
+ addItemInfo(group, "Format", i18n("Format"), TQVariant::String);
- item = addItemInfo(group, "Dimensions", i18n("Dimensions"), QVariant::Size);
+ item = addItemInfo(group, "Dimensions", i18n("Dimensions"), TQVariant::Size);
setUnit(item, KFileMimeTypeInfo::Pixels);
- item = addItemInfo(group, "BitDepth", i18n("Bit Depth"), QVariant::Int);
+ item = addItemInfo(group, "BitDepth", i18n("Bit Depth"), TQVariant::Int);
setUnit(item, KFileMimeTypeInfo::BitsPerPixel);
- addItemInfo(group, "Comment", i18n("Comment"), QVariant::String);
+ addItemInfo(group, "Comment", i18n("Comment"), TQVariant::String);
}
bool KPnmPlugin::readInfo( KFileMetaInfo& info, uint /*what*/)
{
- QFile f(info.path());
+ TQFile f(info.path());
if(!f.open(IO_ReadOnly))
return false;
if(f.size() <= 2)
return false;
- QTextStream stream(&f);
+ TQTextStream stream(&f);
char c;
stream >> c;
@@ -83,7 +83,7 @@ bool KPnmPlugin::readInfo( KFileMetaInfo& info, uint /*what*/)
return false;
int type = (n - 1) % 3;
- QString comments, buffer;
+ TQString comments, buffer;
while(!stream.atEnd()) {
stream >> c;
// comment
@@ -94,11 +94,11 @@ bool KPnmPlugin::readInfo( KFileMetaInfo& info, uint /*what*/)
}
// image size
// unfortunately Qt doesn't have some kind of push-back method for
- // QTextStream, so we need to manually decode the first part of the
+ // TQTextStream, so we need to manually decode the first part of the
// image size.
if( c >= '0' && c <= '9' ) {
buffer = "";
- QChar tmp(c);
+ TQChar tmp(c);
while(!stream.atEnd() && tmp.isDigit()) {
buffer += tmp;
stream >> tmp;
@@ -125,7 +125,7 @@ bool KPnmPlugin::readInfo( KFileMetaInfo& info, uint /*what*/)
KFileMetaInfoGroup group = appendGroup(info, "General");
appendItem(group, "Format", formats[format]);
- appendItem(group, "Dimensions", QSize(x, y));
+ appendItem(group, "Dimensions", TQSize(x, y));
if(!comments.isEmpty())
appendItem(group, "Comment", comments.stripWhiteSpace());
appendItem(group, "BitDepth", bpp);