summaryrefslogtreecommitdiffstats
path: root/kiosktool/kioskdata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kiosktool/kioskdata.cpp')
-rw-r--r--kiosktool/kioskdata.cpp78
1 files changed, 39 insertions, 39 deletions
diff --git a/kiosktool/kioskdata.cpp b/kiosktool/kioskdata.cpp
index a007389..135c8f2 100644
--- a/kiosktool/kioskdata.cpp
+++ b/kiosktool/kioskdata.cpp
@@ -19,8 +19,8 @@
#include "kioskdata.h"
-#include <qdom.h>
-#include <qfile.h>
+#include <tqdom.h>
+#include <tqfile.h>
#include <kaction.h>
#include <kdebug.h>
@@ -28,7 +28,7 @@
#include <kstandarddirs.h>
#include <kstdaction.h>
-QDict<QString> *ComponentAction::s_stdActionCaptions = 0;
+TQDict<TQString> *ComponentAction::s_stdActionCaptions = 0;
ComponentAction::ComponentAction()
{
@@ -38,9 +38,9 @@ ComponentAction::~ComponentAction()
{
}
-static QDict<QString> *readStdActionCaptions()
+static TQDict<TQString> *readStdActionCaptions()
{
- QDict<QString> *captions = new QDict<QString>;
+ TQDict<TQString> *captions = new TQDict<TQString>;
for(int i = KStdAction::ActionNone; true;)
{
i++;
@@ -48,28 +48,28 @@ static QDict<QString> *readStdActionCaptions()
if (!action)
break;
- QString caption = action->text();
+ TQString caption = action->text();
caption.replace("&","");
- captions->insert(QString::fromLatin1(action->name()), new QString(caption));
+ captions->insert(TQString::tqfromLatin1(action->name()), new TQString(caption));
}
return captions;
}
-QString
-ComponentAction::expand(const QString &s)
+TQString
+ComponentAction::expand(const TQString &s)
{
if (s.contains("%action"))
{
if (!s_stdActionCaptions)
s_stdActionCaptions= readStdActionCaptions();
- QString action = key;
+ TQString action = key;
action.replace("action/", "");
- QString *caption = s_stdActionCaptions->find(action);
+ TQString *caption = s_stdActionCaptions->find(action);
if (caption)
{
- QString result = s;
+ TQString result = s;
result.replace("%action", *caption);
return result;
}
@@ -78,9 +78,9 @@ ComponentAction::expand(const QString &s)
}
bool
-ComponentAction::load(const QDomElement &docElem)
+ComponentAction::load(const TQDomElement &docElem)
{
- QString _type = docElem.attribute("type");
+ TQString _type = docElem.attribute("type");
if (_type == "immutable")
type = ActImmutable;
else if (_type == "action restriction")
@@ -109,10 +109,10 @@ ComponentAction::load(const QDomElement &docElem)
key = docElem.attribute("key");
defaultValue = (docElem.attribute("default").lower() == "true");
- QDomNode n = docElem.firstChild();
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() )
{
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if (e.tagName() == "caption")
caption = expand(i18n(e.text().simplifyWhiteSpace().utf8()));
@@ -147,12 +147,12 @@ ComponentData::~ComponentData()
{
}
-bool ComponentData::loadActions(const QDomElement &docElem)
+bool ComponentData::loadActions(const TQDomElement &docElem)
{
- QDomNode n = docElem.firstChild();
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() )
{
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if (e.tagName() != "action")
return false;
@@ -172,31 +172,31 @@ bool ComponentData::loadActions(const QDomElement &docElem)
}
void
-ComponentExecData::load(const QDomElement &e)
+ComponentExecData::load(const TQDomElement &e)
{
exec = e.attribute("binary");
dcop = e.attribute("dcop");
- options = QStringList::split(',', e.attribute("options"));
- args = QStringList::split(',', e.attribute("args"));
+ options = TQStringList::split(',', e.attribute("options"));
+ args = TQStringList::split(',', e.attribute("args"));
}
void
-ComponentData::loadSetup(const QDomElement &docElem)
+ComponentData::loadSetup(const TQDomElement &docElem)
{
- QDomNode n = docElem.firstChild();
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() )
{
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if (e.tagName() == "mutable")
{
- QString f = e.attribute("file");
+ TQString f = e.attribute("file");
if (!f.isEmpty())
mutableFiles.append(f);
}
else if (e.tagName() == "ignore")
{
- QString f = e.attribute("file");
+ TQString f = e.attribute("file");
if (!f.isEmpty())
ignoreFiles.append(f);
}
@@ -205,16 +205,16 @@ ComponentData::loadSetup(const QDomElement &docElem)
}
}
-bool ComponentData::load(const QDomElement &docElem)
+bool ComponentData::load(const TQDomElement &docElem)
{
id = docElem.attribute("name");
icon = docElem.attribute("icon");
if (id.isEmpty())
return false;
- QDomNode n = docElem.firstChild();
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() )
{
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if (e.tagName() == "caption")
{
@@ -256,37 +256,37 @@ KioskData::~KioskData()
bool KioskData::load()
{
- QString filename = locate("appdata", "kiosk_data.xml");
+ TQString filename = locate("appdata", "kiosk_data.xml");
if (filename.isEmpty())
{
m_errorMsg = i18n("<qt>Could not find <b>kiosk_data.xml</b></qt>");
return false;
}
- QDomDocument doc;
- QFile file( filename );
+ TQDomDocument doc;
+ TQFile file( filename );
if ( !file.open( IO_ReadOnly ) )
{
- m_errorMsg = i18n("<qt>Could not open <b>%1</b></qt>").arg(filename);
+ m_errorMsg = i18n("<qt>Could not open <b>%1</b></qt>").tqarg(filename);
return false;
}
- QString errorMsg;
+ TQString errorMsg;
int errorRow;
int errorCol;
if ( !doc.setContent( &file, &errorMsg, &errorRow, &errorCol ) )
{
- m_errorMsg = i18n("<qt>Syntax error in <b>%1</b><br>Line %3, column %4: %2</qt>").arg(filename, errorMsg).arg(errorRow).arg(errorCol);
+ m_errorMsg = i18n("<qt>Syntax error in <b>%1</b><br>Line %3, column %4: %2</qt>").tqarg(filename, errorMsg).tqarg(errorRow).tqarg(errorCol);
file.close();
return false;
}
file.close();
- QDomElement docElem = doc.documentElement();
- QDomNode n = docElem.firstChild();
+ TQDomElement docElem = doc.documentElement();
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() )
{
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if (e.tagName() == "group")
{