summaryrefslogtreecommitdiffstats
path: root/src/gui/general/PresetGroup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/general/PresetGroup.cpp')
-rw-r--r--src/gui/general/PresetGroup.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/gui/general/PresetGroup.cpp b/src/gui/general/PresetGroup.cpp
index 4a457a9..bd5974f 100644
--- a/src/gui/general/PresetGroup.cpp
+++ b/src/gui/general/PresetGroup.cpp
@@ -36,10 +36,10 @@
#include <klocale.h>
#include <kstddirs.h>
#include <kglobal.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qstring.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqstring.h>
namespace Rosegarden
@@ -67,27 +67,27 @@ PresetGroup::PresetGroup() :
{
m_presetDirectory = KGlobal::dirs()->findResource("appdata", "presets/");
- QString language = KGlobal::locale()->language();
+ TQString language = KGlobal::locale()->language();
- QString presetFileName = QString("%1/presets-%2.xml")
+ TQString presetFileName = TQString("%1/presets-%2.xml")
.arg(m_presetDirectory).arg(language);
- if (!QFileInfo(presetFileName).isReadable()) {
+ if (!TQFileInfo(presetFileName).isReadable()) {
RG_DEBUG << "Failed to open " << presetFileName << endl;
- language.replace(QRegExp("_.*$"), "");
- presetFileName = QString("%1/presets-%2.xml")
+ language.replace(TQRegExp("_.*$"), "");
+ presetFileName = TQString("%1/presets-%2.xml")
.arg(m_presetDirectory).arg(language);
- if (!QFileInfo(presetFileName).isReadable()) {
+ if (!TQFileInfo(presetFileName).isReadable()) {
RG_DEBUG << "Failed to open " << presetFileName << endl;
- presetFileName = QString("%1/presets.xml")
+ presetFileName = TQString("%1/presets.xml")
.arg(m_presetDirectory);
- if (!QFileInfo(presetFileName).isReadable()) {
+ if (!TQFileInfo(presetFileName).isReadable()) {
RG_DEBUG << "Failed to open " << presetFileName << endl;
@@ -98,10 +98,10 @@ PresetGroup::PresetGroup() :
}
}
- QFile presetFile(presetFileName);
+ TQFile presetFile(presetFileName);
- QXmlInputSource source(presetFile);
- QXmlSimpleReader reader;
+ TQXmlInputSource source(presetFile);
+ TQXmlSimpleReader reader;
reader.setContentHandler(this);
reader.setErrorHandler(this);
bool ok = reader.parse(source);
@@ -118,17 +118,17 @@ PresetGroup::~PresetGroup()
}
bool
-PresetGroup::startElement(const QString &, const QString &,
- const QString &qName,
- const QXmlAttributes &attributes)
+PresetGroup::startElement(const TQString &, const TQString &,
+ const TQString &qName,
+ const TQXmlAttributes &attributes)
{
- QString lcName = qName.lower();
+ TQString lcName = qName.lower();
// RG_DEBUG << "PresetGroup::startElement: processing starting element: " << lcName << endl;
if (lcName == "category") {
- QString s = attributes.value("name");
+ TQString s = attributes.value("name");
if (s) {
m_elCategoryName = s;
// increment the current category number
@@ -150,7 +150,7 @@ PresetGroup::startElement(const QString &, const QString &,
} else if (lcName == "instrument") {
- QString s = attributes.value("name");
+ TQString s = attributes.value("name");
if (s) {
m_elInstrumentName = s;
m_name = true;
@@ -161,20 +161,20 @@ PresetGroup::startElement(const QString &, const QString &,
}
} else if (lcName == "clef") {
- QString s = attributes.value("type");
+ TQString s = attributes.value("type");
if (s) {
m_elClef = clefNameToClefIndex(s);
m_clef = true;
}
} else if (lcName == "transpose") {
- QString s = attributes.value("value");
+ TQString s = attributes.value("value");
if (s) {
m_elTranspose = s.toInt();
m_transpose = true;
}
} else if (lcName == "range") {
- QString s = attributes.value("class");
+ TQString s = attributes.value("class");
if (s == "amateur") {
s = attributes.value("low");
@@ -242,28 +242,28 @@ PresetGroup::startElement(const QString &, const QString &,
} // startElement
bool
-PresetGroup::error(const QXmlParseException& exception)
+PresetGroup::error(const TQXmlParseException& exception)
{
RG_DEBUG << "PresetGroup::error(): jubilation and glee, we have an error, whee!" << endl;
- m_errorString = QString("%1 at line %2, column %3: %4")
+ m_errorString = TQString("%1 at line %2, column %3: %4")
.arg(exception.message())
.arg(exception.lineNumber())
.arg(exception.columnNumber())
.arg(m_errorString);
- return QXmlDefaultHandler::error(exception);
+ return TQXmlDefaultHandler::error(exception);
}
bool
-PresetGroup::fatalError(const QXmlParseException& exception)
+PresetGroup::fatalError(const TQXmlParseException& exception)
{
RG_DEBUG << "PresetGroup::fatalError(): double your jubilation, and triple your glee, a fatal error doth it be!" << endl;
- m_errorString = QString("%1 at line %2, column %3: %4")
+ m_errorString = TQString("%1 at line %2, column %3: %4")
.arg(exception.message())
.arg(exception.lineNumber())
.arg(exception.columnNumber())
.arg(m_errorString);
- return QXmlDefaultHandler::fatalError(exception);
+ return TQXmlDefaultHandler::fatalError(exception);
}
}