summaryrefslogtreecommitdiffstats
path: root/ktuberling/soundfactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ktuberling/soundfactory.cpp')
-rw-r--r--ktuberling/soundfactory.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/ktuberling/soundfactory.cpp b/ktuberling/soundfactory.cpp
index d9bdf48d..9831adcd 100644
--- a/ktuberling/soundfactory.cpp
+++ b/ktuberling/soundfactory.cpp
@@ -11,7 +11,7 @@
#include <kstandarddirs.h>
#include <kaudioplayer.h>
-#include <qdom.h>
+#include <tqdom.h>
#include "soundfactory.h"
#include "soundfactory.moc"
@@ -19,13 +19,13 @@
// Constructor
SoundFactory::SoundFactory(TopLevel *parent, const char *name, uint selectedLanguage)
- : QObject(parent, name)
+ : TQObject(parent, name)
{
topLevel = parent;
namesList = filesList = 0;
- QDomDocument layoutsDocument;
+ TQDomDocument layoutsDocument;
bool ok = topLevel->loadLayout(layoutsDocument);
if (ok) ok = registerLanguages(layoutsDocument);
if (ok) ok = loadLanguage(layoutsDocument, selectedLanguage);
@@ -42,17 +42,17 @@ SoundFactory::~SoundFactory()
// Change the language
void SoundFactory::change(uint selectedLanguage)
{
- QDomDocument layoutsDocument;
+ TQDomDocument layoutsDocument;
bool ok = topLevel->loadLayout(layoutsDocument);
if (ok) ok = loadLanguage(layoutsDocument, selectedLanguage);
if (!ok) loadFailure();
}
// Play some sound
-void SoundFactory::playSound(const QString &soundRef) const
+void SoundFactory::playSound(const TQString &soundRef) const
{
int sound;
- QString soundFile;
+ TQString soundFile;
if (!topLevel->isSoundEnabled()) return;
@@ -74,11 +74,11 @@ void SoundFactory::loadFailure()
}
// Register the various languages
-bool SoundFactory::registerLanguages(QDomDocument &layoutDocument)
+bool SoundFactory::registerLanguages(TQDomDocument &layoutDocument)
{
- QDomNodeList languagesList, menuItemsList, labelsList;
- QDomElement languageElement, menuItemElement, labelElement;
- QDomAttr codeAttribute, actionAttribute;
+ TQDomNodeList languagesList, menuItemsList, labelsList;
+ TQDomElement languageElement, menuItemElement, labelElement;
+ TQDomAttr codeAttribute, actionAttribute;
bool enabled;
languagesList = layoutDocument.elementsByTagName("language");
@@ -87,7 +87,7 @@ bool SoundFactory::registerLanguages(QDomDocument &layoutDocument)
for (uint i = 0; i < languagesList.count(); i++)
{
- languageElement = (const QDomElement &) languagesList.item(i).toElement();
+ languageElement = (const TQDomElement &) languagesList.item(i).toElement();
codeAttribute = languageElement.attributeNode("code");
enabled = locate("data", "ktuberling/sounds/" + codeAttribute.value() + "/") != 0;
@@ -95,13 +95,13 @@ bool SoundFactory::registerLanguages(QDomDocument &layoutDocument)
if (menuItemsList.count() != 1)
return false;
- menuItemElement = (const QDomElement &) menuItemsList.item(0).toElement();
+ menuItemElement = (const TQDomElement &) menuItemsList.item(0).toElement();
labelsList = menuItemElement.elementsByTagName("label");
if (labelsList.count() != 1)
return false;
- labelElement = (const QDomElement &) labelsList.item(0).toElement();
+ labelElement = (const TQDomElement &) labelsList.item(0).toElement();
actionAttribute = menuItemElement.attributeNode("action");
topLevel->registerLanguage(labelElement.text(), actionAttribute.value().latin1(), enabled);
}
@@ -110,19 +110,19 @@ bool SoundFactory::registerLanguages(QDomDocument &layoutDocument)
}
// Load the sounds of one given language
-bool SoundFactory::loadLanguage(QDomDocument &layoutDocument, uint toLoad)
+bool SoundFactory::loadLanguage(TQDomDocument &layoutDocument, uint toLoad)
{
- QDomNodeList languagesList,
+ TQDomNodeList languagesList,
soundNamesList;
- QDomElement languageElement,
+ TQDomElement languageElement,
soundNameElement;
- QDomAttr nameAttribute, fileAttribute;
+ TQDomAttr nameAttribute, fileAttribute;
languagesList = layoutDocument.elementsByTagName("language");
if (toLoad >= languagesList.count())
return false;
- languageElement = (const QDomElement &) languagesList.item(toLoad).toElement();
+ languageElement = (const TQDomElement &) languagesList.item(toLoad).toElement();
soundNamesList = languageElement.elementsByTagName("sound");
sounds = soundNamesList.count();
@@ -136,7 +136,7 @@ bool SoundFactory::loadLanguage(QDomDocument &layoutDocument, uint toLoad)
for (uint sound = 0; sound < sounds; sound++)
{
- soundNameElement = (const QDomElement &) soundNamesList.item(sound).toElement();
+ soundNameElement = (const TQDomElement &) soundNamesList.item(sound).toElement();
nameAttribute = soundNameElement.attributeNode("name");
namesList[sound] = nameAttribute.value();