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/document/io/RG21Loader.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/document/io/RG21Loader.cpp')
-rw-r--r-- | src/document/io/RG21Loader.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/document/io/RG21Loader.cpp b/src/document/io/RG21Loader.cpp index 84f3d03..d5df36d 100644 --- a/src/document/io/RG21Loader.cpp +++ b/src/document/io/RG21Loader.cpp @@ -38,11 +38,11 @@ #include "base/Track.h" #include "gui/editors/notation/NotationStrings.h" #include "gui/general/ProgressReporter.h" -#include <qfile.h> -#include <qobject.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqtextstream.h> #include <string> #include <vector> @@ -58,7 +58,7 @@ using namespace Accidentals; using namespace Marks; RG21Loader::RG21Loader(Studio *studio, - QObject *parent, const char* name) + TQObject *parent, const char* name) : ProgressReporter(parent, name), m_stream(0), m_studio(studio), @@ -95,7 +95,7 @@ bool RG21Loader::parseKey() if (m_tokens.count() < 3 || !m_currentSegment) return false; - QString keyBase = m_tokens[2]; + TQString keyBase = m_tokens[2]; if (keyBase.length() > 1) { // Deal correctly with e.g. Bb major keyBase = @@ -105,7 +105,7 @@ bool RG21Loader::parseKey() keyBase = keyBase.upper(); } - QString keyName = QString("%1 %2or") + TQString keyName = TQString("%1 %2or") .arg(keyBase) .arg(m_tokens[3].lower()); @@ -123,7 +123,7 @@ bool RG21Loader::parseMetronome() if (!m_composition) return false; - QStringList::Iterator i = m_tokens.begin(); + TQStringList::Iterator i = m_tokens.begin(); timeT duration = convertRG21Duration(i); bool isNumeric = false; @@ -145,7 +145,7 @@ bool RG21Loader::parseChordItem() if (m_tokens.count() < 4) return false; - QStringList::Iterator i = m_tokens.begin(); + TQStringList::Iterator i = m_tokens.begin(); timeT duration = convertRG21Duration(i); // get chord mod flags and nb of notes. chord mod is hex @@ -212,7 +212,7 @@ bool RG21Loader::parseRest() if (m_tokens.count() < 2) return false; - QStringList::Iterator i = m_tokens.begin(); + TQStringList::Iterator i = m_tokens.begin(); timeT duration = convertRG21Duration(i); Event *restEvent = new Event(Note::EventRestType, @@ -583,9 +583,9 @@ bool RG21Loader::parseStaveType() return true; } -timeT RG21Loader::convertRG21Duration(QStringList::Iterator& i) +timeT RG21Loader::convertRG21Duration(TQStringList::Iterator& i) { - QString durationString = (*i).lower(); + TQString durationString = (*i).lower(); ++i; if (durationString == "dotted") { @@ -665,21 +665,21 @@ bool RG21Loader::readNextLine() continue; // skip comments } - m_tokens = QStringList::split(' ', m_currentLine); + m_tokens = TQStringList::split(' ', m_currentLine); } while (inComment); return true; } -bool RG21Loader::load(const QString &fileName, Composition &comp) +bool RG21Loader::load(const TQString &fileName, Composition &comp) { m_composition = ∁ comp.clear(); - QFile file(fileName); + TQFile file(fileName); if (file.open(IO_ReadOnly)) { - m_stream = new QTextStream(&file); + m_stream = new TQTextStream(&file); } else { return false; } @@ -691,7 +691,7 @@ bool RG21Loader::load(const QString &fileName, Composition &comp) if (!readNextLine()) break; - QString firstToken = m_tokens.first(); + TQString firstToken = m_tokens.first(); if (firstToken == "Staves" || firstToken == "Staffs") { // nb staves |