summaryrefslogtreecommitdiffstats
path: root/src/document/io
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-06 20:59:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-06 20:59:29 +0000
commit11f31c37e5fa4889d9989f10272f44845449cb7b (patch)
tree4383da04a76c497950d957fc6120b0fd0d9082c2 /src/document/io
parent832eb69d571e8e518db45d0c0e6fbc0f00690209 (diff)
downloadrosegarden-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')
-rw-r--r--src/document/io/CsoundExporter.cpp4
-rw-r--r--src/document/io/CsoundExporter.h4
-rw-r--r--src/document/io/HydrogenLoader.cpp18
-rw-r--r--src/document/io/HydrogenLoader.h8
-rw-r--r--src/document/io/HydrogenXMLHandler.cpp26
-rw-r--r--src/document/io/HydrogenXMLHandler.h24
-rw-r--r--src/document/io/LilyPondExporter.cpp78
-rw-r--r--src/document/io/LilyPondExporter.h2
-rw-r--r--src/document/io/MupExporter.cpp4
-rw-r--r--src/document/io/MupExporter.h4
-rw-r--r--src/document/io/MusicXmlExporter.cpp4
-rw-r--r--src/document/io/MusicXmlExporter.h4
-rw-r--r--src/document/io/RG21Loader.cpp36
-rw-r--r--src/document/io/RG21Loader.h22
14 files changed, 119 insertions, 119 deletions
diff --git a/src/document/io/CsoundExporter.cpp b/src/document/io/CsoundExporter.cpp
index 9b61372..70f1e51 100644
--- a/src/document/io/CsoundExporter.cpp
+++ b/src/document/io/CsoundExporter.cpp
@@ -32,7 +32,7 @@
#include "base/Segment.h"
#include "base/Track.h"
#include "gui/general/ProgressReporter.h"
-#include <qobject.h>
+#include <tqobject.h>
#include <fstream>
#include "gui/application/RosegardenApplication.h"
@@ -40,7 +40,7 @@
namespace Rosegarden
{
-CsoundExporter::CsoundExporter(QObject *parent,
+CsoundExporter::CsoundExporter(TQObject *parent,
Composition *composition,
std::string fileName) :
ProgressReporter(parent, "csoundExporter"),
diff --git a/src/document/io/CsoundExporter.h b/src/document/io/CsoundExporter.h
index 0e8c2ac..f179fb6 100644
--- a/src/document/io/CsoundExporter.h
+++ b/src/document/io/CsoundExporter.h
@@ -30,7 +30,7 @@
#include <string>
-class QObject;
+class TQObject;
namespace Rosegarden
@@ -46,7 +46,7 @@ class Composition;
class CsoundExporter : public ProgressReporter
{
public:
- CsoundExporter(QObject *parent, Composition *, std::string fileName);
+ CsoundExporter(TQObject *parent, Composition *, std::string fileName);
~CsoundExporter();
bool write();
diff --git a/src/document/io/HydrogenLoader.cpp b/src/document/io/HydrogenLoader.cpp
index 38f85fe..984527d 100644
--- a/src/document/io/HydrogenLoader.cpp
+++ b/src/document/io/HydrogenLoader.cpp
@@ -25,34 +25,34 @@
#include "HydrogenLoader.h"
-#include <qxml.h>
+#include <tqxml.h>
#include "base/Composition.h"
#include "base/PropertyName.h"
#include "base/Segment.h"
#include "base/Studio.h"
#include "gui/general/ProgressReporter.h"
#include "HydrogenXMLHandler.h"
-#include <qfile.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqfile.h>
+#include <tqobject.h>
+#include <tqstring.h>
namespace Rosegarden
{
HydrogenLoader::HydrogenLoader(Studio *studio,
- QObject *parent, const char *name):
+ TQObject *parent, const char *name):
ProgressReporter(parent, name),
m_studio(studio)
{}
bool
-HydrogenLoader::load(const QString& fileName, Composition &comp)
+HydrogenLoader::load(const TQString& fileName, Composition &comp)
{
m_composition = &comp;
comp.clear();
- QFile file(fileName);
+ TQFile file(fileName);
if (!file.open(IO_ReadOnly)) {
return false;
}
@@ -61,8 +61,8 @@ HydrogenLoader::load(const QString& fileName, Composition &comp)
HydrogenXMLHandler handler(m_composition);
- QXmlInputSource source(file);
- QXmlSimpleReader reader;
+ TQXmlInputSource source(file);
+ TQXmlSimpleReader reader;
reader.setContentHandler(&handler);
reader.setErrorHandler(&handler);
diff --git a/src/document/io/HydrogenLoader.h b/src/document/io/HydrogenLoader.h
index f0cd724..bd3cffb 100644
--- a/src/document/io/HydrogenLoader.h
+++ b/src/document/io/HydrogenLoader.h
@@ -32,8 +32,8 @@
#include <vector>
-class QString;
-class QObject;
+class TQString;
+class TQObject;
namespace Rosegarden
@@ -54,14 +54,14 @@ class HydrogenLoader : public ProgressReporter
{
public:
HydrogenLoader(Studio *,
- QObject *parent = 0, const char *name = 0);
+ TQObject *parent = 0, const char *name = 0);
/**
* Load and parse the Hydrogen file \a fileName, and write it into the
* given Composition (clearing the existing segment data first).
* Return true for success.
*/
- bool load(const QString& fileName, Composition &);
+ bool load(const TQString& fileName, Composition &);
protected:
Composition *m_composition;
diff --git a/src/document/io/HydrogenXMLHandler.cpp b/src/document/io/HydrogenXMLHandler.cpp
index 68e1b20..9854648 100644
--- a/src/document/io/HydrogenXMLHandler.cpp
+++ b/src/document/io/HydrogenXMLHandler.cpp
@@ -36,7 +36,7 @@
#include "base/NotationTypes.h"
#include "base/Segment.h"
#include "base/Track.h"
-#include <qstring.h>
+#include <tqstring.h>
namespace Rosegarden
@@ -134,12 +134,12 @@ HydrogenXMLHandler::startDocument()
}
bool
-HydrogenXMLHandler::startElement(const QString& /*namespaceURI*/,
- const QString& /*localName*/,
- const QString& qName,
- const QXmlAttributes& /*atts*/)
+HydrogenXMLHandler::startElement(const TQString& /*namespaceURI*/,
+ const TQString& /*localName*/,
+ const TQString& qName,
+ const TQXmlAttributes& /*atts*/)
{
- QString lcName = qName.lower();
+ TQString lcName = qName.lower();
if (lcName == "note") {
@@ -171,11 +171,11 @@ HydrogenXMLHandler::startElement(const QString& /*namespaceURI*/,
}
bool
-HydrogenXMLHandler::endElement(const QString& /*namespaceURI*/,
- const QString& /*localName*/,
- const QString& qName)
+HydrogenXMLHandler::endElement(const TQString& /*namespaceURI*/,
+ const TQString& /*localName*/,
+ const TQString& qName)
{
- QString lcName = qName.lower();
+ TQString lcName = qName.lower();
if (lcName == "note") {
@@ -272,7 +272,7 @@ HydrogenXMLHandler::endElement(const QString& /*namespaceURI*/,
// whole bar unit segment.
//
m_segment->setEndMarkerTime(m_composition->getBarEnd(m_currentBar));
- QString label = QString("%1 - %2 %3 %4").arg(strtoqstr(m_patternName))
+ TQString label = TQString("%1 - %2 %3 %4").arg(strtoqstr(m_patternName))
.arg(strtoqstr(m_sequenceName))
.arg(i18n(" imported from Hydrogen ")).arg(strtoqstr(m_version));
m_segment->setLabel(qstrtostr(label));
@@ -292,9 +292,9 @@ HydrogenXMLHandler::endElement(const QString& /*namespaceURI*/,
}
bool
-HydrogenXMLHandler::characters(const QString& chars)
+HydrogenXMLHandler::characters(const TQString& chars)
{
- QString ch = chars.stripWhiteSpace();
+ TQString ch = chars.stripWhiteSpace();
if (ch == "")
return true;
diff --git a/src/document/io/HydrogenXMLHandler.h b/src/document/io/HydrogenXMLHandler.h
index 0bce68b..e5ec4fe 100644
--- a/src/document/io/HydrogenXMLHandler.h
+++ b/src/document/io/HydrogenXMLHandler.h
@@ -30,12 +30,12 @@
#include "base/MidiProgram.h"
#include "base/Track.h"
#include <string>
-#include <qstring.h>
+#include <tqstring.h>
#include <vector>
-#include <qxml.h>
+#include <tqxml.h>
-class QXmlAttributes;
+class TQXmlAttributes;
namespace Rosegarden
@@ -55,16 +55,16 @@ public:
* Overloaded handler functions
*/
virtual bool startDocument();
- virtual bool startElement(const QString& namespaceURI,
- const QString& localName,
- const QString& qName,
- const QXmlAttributes& atts);
+ virtual bool startElement(const TQString& namespaceURI,
+ const TQString& localName,
+ const TQString& qName,
+ const TQXmlAttributes& atts);
- virtual bool endElement(const QString& namespaceURI,
- const QString& localName,
- const QString& qName);
+ virtual bool endElement(const TQString& namespaceURI,
+ const TQString& localName,
+ const TQString& qName);
- virtual bool characters(const QString& ch);
+ virtual bool characters(const TQString& ch);
virtual bool endDocument ();
@@ -113,7 +113,7 @@ protected:
std::string m_version;
//
- QString m_currentProperty;
+ TQString m_currentProperty;
Segment *m_segment;
TrackId m_currentTrackNb;
diff --git a/src/document/io/LilyPondExporter.cpp b/src/document/io/LilyPondExporter.cpp
index 68731f8..cd29b60 100644
--- a/src/document/io/LilyPondExporter.cpp
+++ b/src/document/io/LilyPondExporter.cpp
@@ -68,11 +68,11 @@
#include "gui/widgets/CurrentProgressDialog.h"
#include <kconfig.h>
#include <kmessagebox.h>
-#include <qfileinfo.h>
-#include <qobject.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qtextcodec.h>
+#include <tqfileinfo.h>
+#include <tqobject.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqtextcodec.h>
#include <kapplication.h>
#include <sstream>
#include <algorithm>
@@ -88,7 +88,7 @@ const PropertyName LilyPondExporter::SKIP_PROPERTY
LilyPondExporter::LilyPondExporter(RosegardenGUIApp *parent,
RosegardenGUIDoc *doc,
std::string fileName) :
- ProgressReporter((QObject *)parent, "lilypondExporter"),
+ ProgressReporter((TQObject *)parent, "lilypondExporter"),
m_doc(doc),
m_fileName(fileName),
m_lastClefFound(Clef::Treble)
@@ -104,7 +104,7 @@ LilyPondExporter::LilyPondExporter(RosegardenGUIApp *parent,
LilyPondExporter::LilyPondExporter(NotationView *parent,
RosegardenGUIDoc *doc,
std::string fileName) :
- ProgressReporter((QObject *)parent, "lilypondExporter"),
+ ProgressReporter((TQObject *)parent, "lilypondExporter"),
m_doc(doc),
m_fileName(fileName),
m_lastClefFound(Clef::Treble)
@@ -349,17 +349,17 @@ std::string
LilyPondExporter::protectIllegalChars(std::string inStr)
{
- QString tmpStr = strtoqstr(inStr);
+ TQString tmpStr = strtoqstr(inStr);
- tmpStr.replace(QRegExp("&"), "\\&");
- tmpStr.replace(QRegExp("\\^"), "\\^");
- tmpStr.replace(QRegExp("%"), "\\%");
- tmpStr.replace(QRegExp("<"), "\\<");
- tmpStr.replace(QRegExp(">"), "\\>");
- tmpStr.replace(QRegExp("\\["), "");
- tmpStr.replace(QRegExp("\\]"), "");
- tmpStr.replace(QRegExp("\\{"), "");
- tmpStr.replace(QRegExp("\\}"), "");
+ tmpStr.replace(TQRegExp("&"), "\\&");
+ tmpStr.replace(TQRegExp("\\^"), "\\^");
+ tmpStr.replace(TQRegExp("%"), "\\%");
+ tmpStr.replace(TQRegExp("<"), "\\<");
+ tmpStr.replace(TQRegExp(">"), "\\>");
+ tmpStr.replace(TQRegExp("\\["), "");
+ tmpStr.replace(TQRegExp("\\]"), "");
+ tmpStr.replace(TQRegExp("\\{"), "");
+ tmpStr.replace(TQRegExp("\\}"), "");
//
// LilyPond uses utf8 encoding.
@@ -378,22 +378,22 @@ struct MarkerComp {
bool
LilyPondExporter::write()
{
- QString tmpName = strtoqstr(m_fileName);
+ TQString tmpName = strtoqstr(m_fileName);
// dmm - modified to act upon the filename itself, rather than the whole
// path; fixes bug #855349
// split name into parts:
- QFileInfo nfo(tmpName);
- QString dirName = nfo.dirPath();
- QString baseName = nfo.fileName();
+ TQFileInfo nfo(tmpName);
+ TQString dirName = nfo.dirPath();
+ TQString baseName = nfo.fileName();
// sed LilyPond-choking chars out of the filename proper
bool illegalFilename = (baseName.contains(' ') || baseName.contains("\\"));
- baseName.replace(QRegExp(" "), "");
- baseName.replace(QRegExp("\\\\"), "");
- baseName.replace(QRegExp("'"), "");
- baseName.replace(QRegExp("\""), "");
+ baseName.replace(TQRegExp(" "), "");
+ baseName.replace(TQRegExp("\\\\"), "");
+ baseName.replace(TQRegExp("'"), "");
+ baseName.replace(TQRegExp("\""), "");
// cat back together
tmpName = dirName + '/' + baseName;
@@ -1137,7 +1137,7 @@ LilyPondExporter::write()
currentVerse++) {
bool haveLyric = false;
bool firstNote = true;
- QString text = "";
+ TQString text = "";
timeT lastTime = (*i)->getStartTime();
for (Segment::iterator j = (*i)->begin();
@@ -1180,8 +1180,8 @@ LilyPondExporter::write()
(*j)->get<String>(Text::TextPropertyName, ssyllable);
text += " ";
- QString syllable(strtoqstr(ssyllable));
- syllable.replace(QRegExp("\\s+"), "");
+ TQString syllable(strtoqstr(ssyllable));
+ syllable.replace(TQRegExp("\\s+"), "");
text += "\"" + syllable + "\"";
haveLyric = true;
} else if (verse > lastVerse) {
@@ -1190,13 +1190,13 @@ LilyPondExporter::write()
}
}
- text.replace( QRegExp(" _+([^ ])") , " \\1" );
+ text.replace( TQRegExp(" _+([^ ])") , " \\1" );
text.replace( "\"_\"" , " " );
// Do not create empty context for lyrics.
// Does this save some vertical space, as was written
// in earlier comment?
- QRegExp rx( "\"" );
+ TQRegExp rx( "\"" );
if ( rx.search( text ) != -1 ) {
str << indent(col) << "\\lyricsto \"" << voiceNumber.str() << "\""
@@ -1430,7 +1430,7 @@ LilyPondExporter::writeBar(Segment *s,
writtenDuration += note.getDuration();
durationRatio = writeSkip(timeSignature, 0, note.getDuration(), true, str);
durationRatioSum = fractionSum(durationRatioSum,durationRatio);
- // str << qstrtostr(QString(" %{ %1/%2 %} ").arg(durationRatio.first).arg(durationRatio.second)); // DEBUG
+ // str << qstrtostr(TQString(" %{ %1/%2 %} ").arg(durationRatio.first).arg(durationRatio.second)); // DEBUG
}
timeT prevDuration = -1;
@@ -1452,8 +1452,8 @@ LilyPondExporter::writeBar(Segment *s,
// First test whether we're entering or leaving a group,
// before we consider how to write the event itself (at least
// for pre-2.0 LilyPond output)
- QString startGroupBeamingsStr = "";
- QString endGroupBeamingsStr = "";
+ TQString startGroupBeamingsStr = "";
+ TQString endGroupBeamingsStr = "";
if ((*i)->isa(Note::EventType) || (*i)->isa(Note::EventRestType) ||
(*i)->isa(Clef::EventType) || (*i)->isa(Rosegarden::Key::EventType)) {
@@ -1496,7 +1496,7 @@ LilyPondExporter::writeBar(Segment *s,
groupId = -1;
groupType = "";
} else {
- startGroupBeamingsStr += QString("\\times %1/%2 { ").arg(numerator).arg(denominator);
+ startGroupBeamingsStr += TQString("\\times %1/%2 { ").arg(numerator).arg(denominator);
tupletRatio = std::pair<int, int>(numerator, denominator);
// Require explicit beamed groups,
// fixes bug #1683205.
@@ -1688,7 +1688,7 @@ LilyPondExporter::writeBar(Segment *s,
writtenDuration += soundingDuration;
std::pair<int,int> ratio = fractionProduct(durationRatio,tupletRatio);
durationRatioSum = fractionSum(durationRatioSum, ratio);
- // str << qstrtostr(QString(" %{ %1/%2 * %3/%4 = %5/%6 %} ").arg(durationRatio.first).arg(durationRatio.second).arg(tupletRatio.first).arg(tupletRatio.second).arg(ratio.first).arg(ratio.second)); // DEBUG
+ // str << qstrtostr(TQString(" %{ %1/%2 * %3/%4 = %5/%6 %} ").arg(durationRatio.first).arg(durationRatio.second).arg(tupletRatio.first).arg(tupletRatio.second).arg(ratio.first).arg(ratio.second)); // DEBUG
std::vector<Mark> marks(chord.getMarksForChord());
// problem here: stem direction unavailable (it's a view-local property)
@@ -1869,7 +1869,7 @@ LilyPondExporter::writeBar(Segment *s,
writtenDuration += soundingDuration;
std::pair<int,int> ratio = fractionProduct(durationRatio,tupletRatio);
durationRatioSum = fractionSum(durationRatioSum, ratio);
- // str << qstrtostr(QString(" %{ %1/%2 * %3/%4 = %5/%6 %} ").arg(durationRatio.first).arg(durationRatio.second).arg(tupletRatio.first).arg(tupletRatio.second).arg(ratio.first).arg(ratio.second)); // DEBUG
+ // str << qstrtostr(TQString(" %{ %1/%2 * %3/%4 = %5/%6 %} ").arg(durationRatio.first).arg(durationRatio.second).arg(tupletRatio.first).arg(tupletRatio.second).arg(ratio.first).arg(ratio.second)); // DEBUG
} else if ((*i)->isa(Clef::EventType)) {
try {
@@ -2050,16 +2050,16 @@ LilyPondExporter::writeBar(Segment *s,
if (overlong) {
str << std::endl << indent(col) <<
- qstrtostr(QString("% %1").
+ qstrtostr(TQString("% %1").
arg(i18n("warning: overlong bar truncated here")));
}
if (fractionSmaller(durationRatioSum, barDurationRatio)) {
str << std::endl << indent(col) <<
- qstrtostr(QString("% %1").
+ qstrtostr(TQString("% %1").
arg(i18n("warning: bar too short, padding with rests")));
str << std::endl << indent(col) <<
- qstrtostr(QString("% %1/%2 < %3/%4").
+ qstrtostr(TQString("% %1/%2 < %3/%4").
arg(durationRatioSum.first).
arg(durationRatioSum.second).
arg(barDurationRatio.first).
diff --git a/src/document/io/LilyPondExporter.h b/src/document/io/LilyPondExporter.h
index ffb831d..6ba3a21 100644
--- a/src/document/io/LilyPondExporter.h
+++ b/src/document/io/LilyPondExporter.h
@@ -47,7 +47,7 @@
#include <utility>
-class QObject;
+class TQObject;
namespace Rosegarden
diff --git a/src/document/io/MupExporter.cpp b/src/document/io/MupExporter.cpp
index 067c909..6207512 100644
--- a/src/document/io/MupExporter.cpp
+++ b/src/document/io/MupExporter.cpp
@@ -37,7 +37,7 @@
#include "base/Sets.h"
#include "base/Track.h"
#include "gui/general/ProgressReporter.h"
-#include <qobject.h>
+#include <tqobject.h>
using std::string;
@@ -45,7 +45,7 @@ namespace Rosegarden
{
using namespace BaseProperties;
-MupExporter::MupExporter(QObject *parent,
+MupExporter::MupExporter(TQObject *parent,
Composition *composition,
string fileName) :
ProgressReporter(parent, "mupExporter"),
diff --git a/src/document/io/MupExporter.h b/src/document/io/MupExporter.h
index 3740252..1ba8d5d 100644
--- a/src/document/io/MupExporter.h
+++ b/src/document/io/MupExporter.h
@@ -36,7 +36,7 @@
#include <fstream>
-class QObject;
+class TQObject;
namespace Rosegarden
@@ -55,7 +55,7 @@ class Composition;
class MupExporter : public ProgressReporter
{
public:
- MupExporter(QObject *parent, Composition *, std::string fileName);
+ MupExporter(TQObject *parent, Composition *, std::string fileName);
~MupExporter();
bool write();
diff --git a/src/document/io/MusicXmlExporter.cpp b/src/document/io/MusicXmlExporter.cpp
index e1384c6..365a792 100644
--- a/src/document/io/MusicXmlExporter.cpp
+++ b/src/document/io/MusicXmlExporter.cpp
@@ -39,14 +39,14 @@
#include "document/RosegardenGUIDoc.h"
#include "gui/application/RosegardenApplication.h"
#include "gui/general/ProgressReporter.h"
-#include <qobject.h>
+#include <tqobject.h>
namespace Rosegarden
{
using namespace BaseProperties;
-MusicXmlExporter::MusicXmlExporter(QObject *parent,
+MusicXmlExporter::MusicXmlExporter(TQObject *parent,
RosegardenGUIDoc *doc,
std::string fileName) :
ProgressReporter(parent, "musicXmlExporter"),
diff --git a/src/document/io/MusicXmlExporter.h b/src/document/io/MusicXmlExporter.h
index f730de8..7d8287d 100644
--- a/src/document/io/MusicXmlExporter.h
+++ b/src/document/io/MusicXmlExporter.h
@@ -38,7 +38,7 @@
#include <string>
-class QObject;
+class TQObject;
namespace Rosegarden
@@ -60,7 +60,7 @@ public:
typedef std::multiset<Event*, Event::EventCmp> eventstartlist;
typedef std::multiset<Event*, Event::EventEndCmp> eventendlist;
public:
- MusicXmlExporter(QObject *parent, RosegardenGUIDoc *, std::string fileName);
+ MusicXmlExporter(TQObject *parent, RosegardenGUIDoc *, std::string fileName);
~MusicXmlExporter();
bool write();
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;
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
diff --git a/src/document/io/RG21Loader.h b/src/document/io/RG21Loader.h
index 1e944af..583367c 100644
--- a/src/document/io/RG21Loader.h
+++ b/src/document/io/RG21Loader.h
@@ -31,14 +31,14 @@
#include "gui/general/ProgressReporter.h"
#include <map>
#include <string>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <vector>
#include "base/Event.h"
-class QTextStream;
-class QObject;
+class TQTextStream;
+class TQObject;
class Iterator;
@@ -58,7 +58,7 @@ class RG21Loader : public ProgressReporter
{
public:
RG21Loader(Studio *,
- QObject *parent = 0, const char *name = 0);
+ TQObject *parent = 0, const char *name = 0);
~RG21Loader();
/**
@@ -66,7 +66,7 @@ public:
* given Composition (clearing the existing segment data first).
* Return true for success.
*/
- bool load(const QString& fileName, Composition &);
+ bool load(const TQString& fileName, Composition &);
protected:
@@ -115,14 +115,14 @@ protected:
void setGroupProperties(Event *);
long convertRG21Pitch(long rg21pitch, int noteModifier);
- timeT convertRG21Duration(QStringList::Iterator&);
+ timeT convertRG21Duration(TQStringList::Iterator&);
std::vector<std::string> convertRG21ChordMods(int chordMod);
bool readNextLine();
//--------------- Data members ---------------------------------
- QTextStream *m_stream;
+ TQTextStream *m_stream;
Studio *m_studio;
Composition* m_composition;
@@ -147,10 +147,10 @@ protected:
int m_tieStatus; // 0 -> none, 1 -> tie started, 2 -> seen one note
- QString m_currentLine;
- QString m_currentStaffName;
+ TQString m_currentLine;
+ TQString m_currentStaffName;
- QStringList m_tokens;
+ TQStringList m_tokens;
unsigned int m_nbStaves;
};