summaryrefslogtreecommitdiffstats
path: root/noatun/modules/kjofol-skin/parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'noatun/modules/kjofol-skin/parser.cpp')
-rw-r--r--noatun/modules/kjofol-skin/parser.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/noatun/modules/kjofol-skin/parser.cpp b/noatun/modules/kjofol-skin/parser.cpp
index df5fdc40..aae5b12e 100644
--- a/noatun/modules/kjofol-skin/parser.cpp
+++ b/noatun/modules/kjofol-skin/parser.cpp
@@ -10,14 +10,14 @@
#include "kjprefs.h"
// system includes
-#include <qtextstream.h>
-#include <qimage.h>
-#include <qfile.h>
+#include <tqtextstream.h>
+#include <tqimage.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kmimemagic.h>
#include <kurl.h>
-Parser::Parser() : QDict<QStringList>(17,false)
+Parser::Parser() : TQDict<TQStringList>(17,false)
{
mSkinAbout="";
mImageCache.setAutoDelete(true);
@@ -29,27 +29,27 @@ void Parser::conserveMemory()
mImageCache.clear();
}
-void Parser::open(const QString &file)
+void Parser::open(const TQString &file)
{
clear();
mImageCache.clear();
mSkinAbout="";
mDir=KURL(file).directory();
- QFile f(file);
+ TQFile f(file);
if ( !f.exists() )
return;
f.open(IO_ReadOnly);
f.at(0);
- QTextStream stream(&f);
+ TQTextStream stream(&f);
while (!stream.eof())
{
- QString line=stream.readLine();
+ TQString line=stream.readLine();
line=line.simplifyWhiteSpace();
if ((!line.length()) || line[0]=='#')
continue;
- QStringList *l=new QStringList(QStringList::split(" ", (line.lower())));
- QString first=l->first();
+ TQStringList *l=new TQStringList(TQStringList::split(" ", (line.lower())));
+ TQString first=l->first();
// special handling for about-texts as the key "about" can appear multiple
// times and thus does not fit into qdict.
@@ -67,17 +67,17 @@ void Parser::open(const QString &file)
}
}
-QString Parser::fileItem(const QString &i) const
+TQString Parser::fileItem(const TQString &i) const
{
return dir()+'/'+i;
}
-QString Parser::dir() const
+TQString Parser::dir() const
{
return mDir;
}
-Parser::ImagePixmap* Parser::getPair(const QString &filenameOld) const
+Parser::ImagePixmap* Parser::getPair(const TQString &filenameOld) const
{
// is it in there?
ImagePixmap *pair;
@@ -87,9 +87,9 @@ Parser::ImagePixmap* Parser::getPair(const QString &filenameOld) const
return pair;
}
- QString filename=fileItem(filenameOld);
+ TQString filename=fileItem(filenameOld);
- QImage image;
+ TQImage image;
// Determine file-format trough mimetype (no stupid .ext test)
KMimeMagicResult * result = KMimeMagic::self()->findFileType( filename );
@@ -97,7 +97,7 @@ Parser::ImagePixmap* Parser::getPair(const QString &filenameOld) const
if ( result->mimeType() == "image/png" )
{
// image = NoatunApp::readPNG(filenameNoCase(filename));
- QImageIO iio;
+ TQImageIO iio;
iio.setFileName( filenameNoCase(filename) );
// forget about gamma-value, fix for broken PNGs
iio.setGamma( 0.00000001 );
@@ -113,12 +113,12 @@ Parser::ImagePixmap* Parser::getPair(const QString &filenameOld) const
}
else
{
- image = QImage(filenameNoCase(filename));
+ image = TQImage(filenameNoCase(filename));
}
//add to the cache
- QPixmap pixmap;
- pixmap.convertFromImage(image, QPixmap::AutoColor|QPixmap::ThresholdDither|QPixmap::AvoidDither);
+ TQPixmap pixmap;
+ pixmap.convertFromImage(image, TQPixmap::AutoColor|TQPixmap::ThresholdDither|TQPixmap::AvoidDither);
pair = new Parser::ImagePixmap;
pair->mImage = image;
pair->mPixmap = pixmap;
@@ -126,7 +126,7 @@ Parser::ImagePixmap* Parser::getPair(const QString &filenameOld) const
return pair;
}
-bool Parser::exist(const QString &i) const
+bool Parser::exist(const TQString &i) const
{
return (bool)find(i);
}