diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-06 20:59:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-06 20:59:29 +0000 |
commit | 11f31c37e5fa4889d9989f10272f44845449cb7b (patch) | |
tree | 4383da04a76c497950d957fc6120b0fd0d9082c2 /src/gui/editors/notation/NoteStyleFileReader.cpp | |
parent | 832eb69d571e8e518db45d0c0e6fbc0f00690209 (diff) | |
download | rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.tar.gz rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.zip |
Initial TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1172292 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/editors/notation/NoteStyleFileReader.cpp')
-rw-r--r-- | src/gui/editors/notation/NoteStyleFileReader.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/gui/editors/notation/NoteStyleFileReader.cpp b/src/gui/editors/notation/NoteStyleFileReader.cpp index b3f3464..41da5ed 100644 --- a/src/gui/editors/notation/NoteStyleFileReader.cpp +++ b/src/gui/editors/notation/NoteStyleFileReader.cpp @@ -26,8 +26,8 @@ #include <string> #include "NoteStyle.h" -#include <qfileinfo.h> -#include <qdir.h> +#include <tqfileinfo.h> +#include <tqdir.h> #include <kglobal.h> #include <kstddirs.h> @@ -44,23 +44,23 @@ NoteStyleFileReader::NoteStyleFileReader(std::string name) : m_style(new NoteStyle(name)), m_haveNote(false) { - QString styleDirectory = + TQString styleDirectory = KGlobal::dirs()->findResource("appdata", "styles/"); - QString styleFileName = - QString("%1/%2.xml").arg(styleDirectory).arg(strtoqstr(name)); + TQString styleFileName = + TQString("%1/%2.xml").arg(styleDirectory).arg(strtoqstr(name)); - QFileInfo fileInfo(styleFileName); + TQFileInfo fileInfo(styleFileName); if (!fileInfo.isReadable()) { throw StyleFileReadFailed (qstrtostr(i18n("Can't open style file %1").arg(styleFileName))); } - QFile styleFile(styleFileName); + TQFile styleFile(styleFileName); - QXmlInputSource source(styleFile); - QXmlSimpleReader reader; + TQXmlInputSource source(styleFile); + TQXmlSimpleReader reader; reader.setContentHandler(this); reader.setErrorHandler(this); bool ok = reader.parse(source); @@ -72,22 +72,22 @@ NoteStyleFileReader::NoteStyleFileReader(std::string name) : } bool -NoteStyleFileReader::startElement(const QString &, const QString &, - const QString &qName, - const QXmlAttributes &attributes) +NoteStyleFileReader::startElement(const TQString &, const TQString &, + const TQString &qName, + const TQXmlAttributes &attributes) { - QString lcName = qName.lower(); + TQString lcName = qName.lower(); if (lcName == "rosegarden-note-style") { - QString s = attributes.value("base-style"); + TQString s = attributes.value("base-style"); if (s) m_style->setBaseStyle(qstrtostr(s)); } else if (lcName == "note") { m_haveNote = true; - QString s = attributes.value("type"); + TQString s = attributes.value("type"); if (!s) { m_errorString = i18n("type is a required attribute of note"); return false; @@ -120,9 +120,9 @@ NoteStyleFileReader::startElement(const QString &, const QString &, bool NoteStyleFileReader::setFromAttributes(Note::Type type, - const QXmlAttributes &attributes) + const TQXmlAttributes &attributes) { - QString s; + TQString s; bool haveShape = false; s = attributes.value("shape"); |