diff options
Diffstat (limited to 'kwordquiz/src/keduvocdata.cpp')
-rw-r--r-- | kwordquiz/src/keduvocdata.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/kwordquiz/src/keduvocdata.cpp b/kwordquiz/src/keduvocdata.cpp index 4d46d7d9..48b20f8e 100644 --- a/kwordquiz/src/keduvocdata.cpp +++ b/kwordquiz/src/keduvocdata.cpp @@ -18,7 +18,7 @@ #include "keduvocdata.h" -#include <qfile.h> +#include <tqfile.h> #include <kdebug.h> @@ -33,7 +33,7 @@ KEduVocDataItem::KEduVocDataItem() } -KEduVocDataItem::KEduVocDataItem(QDomElement &entry) +KEduVocDataItem::KEduVocDataItem(TQDomElement &entry) { domElement = entry; } @@ -43,39 +43,39 @@ KEduVocDataItem::~KEduVocDataItem() } -QString KEduVocDataItem::originalText() const +TQString KEduVocDataItem::originalText() const { return getText("o"); } -QString KEduVocDataItem::translatedText() const +TQString KEduVocDataItem::translatedText() const { return getText("t"); } // protected methods -QString KEduVocDataItem::getText(const QString &tagName) const +TQString KEduVocDataItem::getText(const TQString &tagName) const { if(!domElement.isNull()) { - QDomNodeList list = domElement.elementsByTagName(tagName); + TQDomNodeList list = domElement.elementsByTagName(tagName); if(list.count() > 0) { - QDomElement element = list.item(0).toElement(); + TQDomElement element = list.item(0).toElement(); if(!element.isNull()) { return element.text(); } else - return QString::null; + return TQString::null; } else - return QString::null; + return TQString::null; } else - return QString::null; + return TQString::null; } //////////////////////////////////////////////////////////////////////////////// @@ -88,24 +88,24 @@ QString KEduVocDataItem::getText(const QString &tagName) const */ KEduVocData::KEduVocData() { - document = new QDomDocument(); + document = new TQDomDocument(); } -KEduVocDataItemList KEduVocData::parse(const QString &fileName) +KEduVocDataItemList KEduVocData::parse(const TQString &fileName) { KEduVocDataItemList list; - //QDomDocument document; - QFile file(fileName); + //TQDomDocument document; + TQFile file(fileName); document->setContent(&file); - QDomNodeList entries = document->elementsByTagName("e"); + TQDomNodeList entries = document->elementsByTagName("e"); // loop through the "e" (entry) tags looking for data for(uint i = 0 ; i < entries.count() ; i++) { // get an entry to operate on - QDomElement entry = entries.item(i).toElement(); + TQDomElement entry = entries.item(i).toElement(); // if the "node" is in fact an element -- i.e. not null if(!entry.isNull()) { @@ -148,7 +148,7 @@ int KEduVocData::numRows() /*! \fn KEduVocData::language(int col) */ -QString KEduVocData::language(int col) +TQString KEduVocData::language(int col) { if (!document->isNull()) if (col == 0) @@ -156,7 +156,7 @@ QString KEduVocData::language(int col) else return document -> documentElement().namedItem("e").namedItem("t").toElement().attribute("l"); else - return QString::null; + return TQString::null; } |