summaryrefslogtreecommitdiffstats
path: root/kwordquiz/src/keduvocdata.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:39:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:39:55 +0000
commit0a6e0958c03e41c87b15557b6f407874f20c2f8d (patch)
tree2cdd58c4013b1be09cfcbb4ddae2b05712b9aeee /kwordquiz/src/keduvocdata.cpp
parent83f9dfafc157ff7823804b3ff457b43d021a5b4b (diff)
downloadtdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.tar.gz
tdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1157642 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kwordquiz/src/keduvocdata.cpp')
-rw-r--r--kwordquiz/src/keduvocdata.cpp36
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;
}