summaryrefslogtreecommitdiffstats
path: root/src/document
diff options
context:
space:
mode:
Diffstat (limited to 'src/document')
-rw-r--r--src/document/BasicCommand.cpp4
-rw-r--r--src/document/BasicCommand.h4
-rw-r--r--src/document/BasicSelectionCommand.cpp6
-rw-r--r--src/document/BasicSelectionCommand.h6
-rw-r--r--src/document/MultiViewCommandHistory.cpp54
-rw-r--r--src/document/MultiViewCommandHistory.h8
-rw-r--r--src/document/RoseXmlHandler.cpp354
-rw-r--r--src/document/RoseXmlHandler.h42
-rw-r--r--src/document/RosegardenGUIDoc.cpp304
-rw-r--r--src/document/RosegardenGUIDoc.h56
-rw-r--r--src/document/XmlStorableEvent.cpp16
-rw-r--r--src/document/XmlStorableEvent.h8
-rw-r--r--src/document/XmlSubHandler.h20
-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
27 files changed, 560 insertions, 560 deletions
diff --git a/src/document/BasicCommand.cpp b/src/document/BasicCommand.cpp
index db56564..b17d79d 100644
--- a/src/document/BasicCommand.cpp
+++ b/src/document/BasicCommand.cpp
@@ -26,12 +26,12 @@
#include "BasicCommand.h"
#include "base/Segment.h"
-#include <qstring.h>
+#include <tqstring.h>
namespace Rosegarden
{
-BasicCommand::BasicCommand(const QString &name, Segment &segment,
+BasicCommand::BasicCommand(const TQString &name, Segment &segment,
timeT start, timeT end, bool bruteForceRedo) :
KNamedCommand(name),
m_startTime(calculateStartTime(start, segment)),
diff --git a/src/document/BasicCommand.h b/src/document/BasicCommand.h
index eab9ea0..1189547 100644
--- a/src/document/BasicCommand.h
+++ b/src/document/BasicCommand.h
@@ -31,7 +31,7 @@
#include "base/Event.h"
#include "misc/Debug.h"
-class QString;
+class TQString;
namespace Rosegarden
@@ -75,7 +75,7 @@ protected:
* It is always safe to pass bruteForceRedoRequired true,
* it's just normally a waste of memory.
*/
- BasicCommand(const QString &name,
+ BasicCommand(const TQString &name,
Segment &segment,
timeT start, timeT end,
bool bruteForceRedoRequired = false);
diff --git a/src/document/BasicSelectionCommand.cpp b/src/document/BasicSelectionCommand.cpp
index 2216223..2297b4c 100644
--- a/src/document/BasicSelectionCommand.cpp
+++ b/src/document/BasicSelectionCommand.cpp
@@ -28,13 +28,13 @@
#include "base/Segment.h"
#include "base/Selection.h"
#include "BasicCommand.h"
-#include <qstring.h>
+#include <tqstring.h>
namespace Rosegarden
{
-BasicSelectionCommand::BasicSelectionCommand(const QString &name,
+BasicSelectionCommand::BasicSelectionCommand(const TQString &name,
EventSelection &selection,
bool bruteForceRedo) :
BasicCommand(name,
@@ -46,7 +46,7 @@ BasicSelectionCommand::BasicSelectionCommand(const QString &name,
// nothing
}
-BasicSelectionCommand::BasicSelectionCommand(const QString &name,
+BasicSelectionCommand::BasicSelectionCommand(const TQString &name,
Segment &segment,
bool bruteForceRedo) :
BasicCommand(name,
diff --git a/src/document/BasicSelectionCommand.h b/src/document/BasicSelectionCommand.h
index 825955d..9e1270e 100644
--- a/src/document/BasicSelectionCommand.h
+++ b/src/document/BasicSelectionCommand.h
@@ -29,7 +29,7 @@
#include "BasicCommand.h"
-class QString;
+class TQString;
namespace Rosegarden
@@ -51,12 +51,12 @@ public:
protected:
/// selection from segment
- BasicSelectionCommand(const QString &name,
+ BasicSelectionCommand(const TQString &name,
EventSelection &selection,
bool bruteForceRedoRequired = false);
/// entire segment
- BasicSelectionCommand(const QString &name,
+ BasicSelectionCommand(const TQString &name,
Segment &segment,
bool bruteForceRedoRequired = false);
};
diff --git a/src/document/MultiViewCommandHistory.cpp b/src/document/MultiViewCommandHistory.cpp
index f8cddeb..58f0b55 100644
--- a/src/document/MultiViewCommandHistory.cpp
+++ b/src/document/MultiViewCommandHistory.cpp
@@ -31,10 +31,10 @@
#include <kaction.h>
#include <kcommand.h>
#include <kstdaction.h>
-#include <qobject.h>
-#include <qpopupmenu.h>
-#include <qregexp.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqpopupmenu.h>
+#include <tqregexp.h>
+#include <tqstring.h>
#include <kpopupmenu.h>
@@ -75,40 +75,40 @@ MultiViewCommandHistory::attachView(KActionCollection *collection)
KToolBarPopupAction *undo = dynamic_cast<KToolBarPopupAction*>(collection->action(KStdAction::stdName(KStdAction::Undo)));
if (undo) {
- connect(undo, SIGNAL(activated()),
- this, SLOT(slotUndo()));
+ connect(undo, TQT_SIGNAL(activated()),
+ this, TQT_SLOT(slotUndo()));
connect
(undo->popupMenu(),
- SIGNAL(aboutToShow()),
+ TQT_SIGNAL(aboutToShow()),
this,
- SLOT(slotUndoAboutToShow()));
+ TQT_SLOT(slotUndoAboutToShow()));
connect
(undo->popupMenu(),
- SIGNAL(activated(int)),
+ TQT_SIGNAL(activated(int)),
this,
- SLOT(slotUndoActivated(int)));
+ TQT_SLOT(slotUndoActivated(int)));
}
KToolBarPopupAction *redo = dynamic_cast<KToolBarPopupAction*>(collection->action(KStdAction::stdName(KStdAction::Redo)));
if (redo) {
- connect(redo, SIGNAL(activated()),
- this, SLOT(slotRedo()));
+ connect(redo, TQT_SIGNAL(activated()),
+ this, TQT_SLOT(slotRedo()));
connect
(redo->popupMenu(),
- SIGNAL(aboutToShow()),
+ TQT_SIGNAL(aboutToShow()),
this,
- SLOT(slotRedoAboutToShow()));
+ TQT_SLOT(slotRedoAboutToShow()));
connect
(redo->popupMenu(),
- SIGNAL(activated(int)),
+ TQT_SIGNAL(activated(int)),
this,
- SLOT(slotRedoActivated(int)));
+ TQT_SLOT(slotRedoActivated(int)));
}
m_views.insert(collection);
@@ -302,7 +302,7 @@ MultiViewCommandHistory::updateButtons()
void
MultiViewCommandHistory::updateButton(bool undo,
- const QString &name,
+ const TQString &name,
CommandStack &stack)
{
for (ViewSet::iterator i = m_views.begin(); i != m_views.end(); ++i) {
@@ -310,7 +310,7 @@ MultiViewCommandHistory::updateButton(bool undo,
KAction *action = (*i)->action(name);
if (!action)
continue;
- QString text;
+ TQString text;
if (stack.empty()) {
action->setEnabled(false);
@@ -321,9 +321,9 @@ MultiViewCommandHistory::updateButton(bool undo,
action->setText(text);
} else {
action->setEnabled(true);
- QString commandName = stack.top()->name();
- commandName.replace(QRegExp("&"), "");
- commandName.replace(QRegExp("\\.\\.\\.$"), "");
+ TQString commandName = stack.top()->name();
+ commandName.replace(TQRegExp("&"), "");
+ commandName.replace(TQRegExp("\\.\\.\\.$"), "");
if (undo)
text = i18n("Und&o %1").arg(commandName);
else
@@ -335,7 +335,7 @@ MultiViewCommandHistory::updateButton(bool undo,
void
MultiViewCommandHistory::updateMenu(bool undo,
- const QString &name,
+ const TQString &name,
CommandStack &stack)
{
for (ViewSet::iterator i = m_views.begin(); i != m_views.end(); ++i) {
@@ -349,7 +349,7 @@ MultiViewCommandHistory::updateMenu(bool undo,
if (!popupAction)
continue;
- QPopupMenu *menu = popupAction->popupMenu();
+ TQPopupMenu *menu = popupAction->popupMenu();
if (!menu)
continue;
menu->clear();
@@ -363,11 +363,11 @@ MultiViewCommandHistory::updateMenu(bool undo,
tempStack.push(command);
stack.pop();
- QString commandName = command->name();
- commandName.replace(QRegExp("&"), "");
- commandName.replace(QRegExp("\\.\\.\\.$"), "");
+ TQString commandName = command->name();
+ commandName.replace(TQRegExp("&"), "");
+ commandName.replace(TQRegExp("\\.\\.\\.$"), "");
- QString text;
+ TQString text;
if (undo)
text = i18n("Und&o %1").arg(commandName);
else
diff --git a/src/document/MultiViewCommandHistory.h b/src/document/MultiViewCommandHistory.h
index d122d08..469c2c9 100644
--- a/src/document/MultiViewCommandHistory.h
+++ b/src/document/MultiViewCommandHistory.h
@@ -28,10 +28,10 @@
#include <set>
#include <stack>
-#include <qobject.h>
+#include <tqobject.h>
-class QString;
+class TQString;
class KCommand;
class KActionCollection;
@@ -137,8 +137,8 @@ private:
int m_savedAt;
void updateButtons();
- void updateButton(bool undo, const QString &name, CommandStack &stack);
- void updateMenu(bool undo, const QString &name, CommandStack &stack);
+ void updateButton(bool undo, const TQString &name, CommandStack &stack);
+ void updateMenu(bool undo, const TQString &name, CommandStack &stack);
void clipCommands();
void clipStack(CommandStack &stack, int limit);
diff --git a/src/document/RoseXmlHandler.cpp b/src/document/RoseXmlHandler.cpp
index 028c89a..bd1ad0e 100644
--- a/src/document/RoseXmlHandler.cpp
+++ b/src/document/RoseXmlHandler.cpp
@@ -61,12 +61,12 @@
#include "sound/AudioFileManager.h"
#include <kfiledialog.h>
#include <kmessagebox.h>
-#include <qcstring.h>
-#include <qdatastream.h>
-#include <qdialog.h>
-#include <qfileinfo.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
+#include <tqdialog.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "XmlStorableEvent.h"
#include "XmlSubHandler.h"
@@ -78,40 +78,40 @@ using namespace BaseProperties;
class ConfigurationXmlSubHandler : public XmlSubHandler
{
public:
- ConfigurationXmlSubHandler(const QString &elementName,
+ ConfigurationXmlSubHandler(const TQString &elementName,
Rosegarden::Configuration *configuration);
- virtual bool startElement(const QString& namespaceURI,
- const QString& localName,
- const QString& qName,
- const QXmlAttributes& atts);
-
- virtual bool endElement(const QString& namespaceURI,
- const QString& localName,
- const QString& qName,
+ virtual bool startElement(const TQString& namespaceURI,
+ const TQString& localName,
+ const TQString& qName,
+ const TQXmlAttributes& atts);
+
+ virtual bool endElement(const TQString& namespaceURI,
+ const TQString& localName,
+ const TQString& qName,
bool& finished);
- virtual bool characters(const QString& ch);
+ virtual bool characters(const TQString& ch);
//--------------- Data members ---------------------------------
Rosegarden::Configuration *m_configuration;
- QString m_elementName;
- QString m_propertyName;
- QString m_propertyType;
+ TQString m_elementName;
+ TQString m_propertyName;
+ TQString m_propertyType;
};
-ConfigurationXmlSubHandler::ConfigurationXmlSubHandler(const QString &elementName,
+ConfigurationXmlSubHandler::ConfigurationXmlSubHandler(const TQString &elementName,
Rosegarden::Configuration *configuration)
: m_configuration(configuration),
m_elementName(elementName)
{
}
-bool ConfigurationXmlSubHandler::startElement(const QString&, const QString&,
- const QString& lcName,
- const QXmlAttributes& atts)
+bool ConfigurationXmlSubHandler::startElement(const TQString&, const TQString&,
+ const TQString& lcName,
+ const TQXmlAttributes& atts)
{
m_propertyName = lcName;
m_propertyType = atts.value("type");
@@ -119,7 +119,7 @@ bool ConfigurationXmlSubHandler::startElement(const QString&, const QString&,
if (m_propertyName == "property") {
// handle alternative encoding for properties with arbitrary names
m_propertyName = atts.value("name");
- QString value = atts.value("value");
+ TQString value = atts.value("value");
if (value) {
m_propertyType = "String";
m_configuration->set<String>(qstrtostr(m_propertyName),
@@ -130,9 +130,9 @@ bool ConfigurationXmlSubHandler::startElement(const QString&, const QString&,
return true;
}
-bool ConfigurationXmlSubHandler::characters(const QString& chars)
+bool ConfigurationXmlSubHandler::characters(const TQString& chars)
{
- QString ch = chars.stripWhiteSpace();
+ TQString ch = chars.stripWhiteSpace();
// this method is also called on newlines - skip these cases
if (ch.isEmpty()) return true;
@@ -162,7 +162,7 @@ bool ConfigurationXmlSubHandler::characters(const QString& chars)
}
if (m_propertyType == "Bool") {
- QString chLc = ch.lower();
+ TQString chLc = ch.lower();
bool b = (chLc == "true" ||
chLc == "1" ||
@@ -187,9 +187,9 @@ bool ConfigurationXmlSubHandler::characters(const QString& chars)
}
bool
-ConfigurationXmlSubHandler::endElement(const QString&,
- const QString&,
- const QString& lcName,
+ConfigurationXmlSubHandler::endElement(const TQString&,
+ const TQString&,
+ const TQString& lcName,
bool& finished)
{
m_propertyName = "";
@@ -290,9 +290,9 @@ RoseXmlHandler::startDocument()
}
bool
-RoseXmlHandler::startElement(const QString& namespaceURI,
- const QString& localName,
- const QString& qName, const QXmlAttributes& atts)
+RoseXmlHandler::startElement(const TQString& namespaceURI,
+ const TQString& localName,
+ const TQString& qName, const TQXmlAttributes& atts)
{
// First check if user pressed cancel button on the progress
// dialog
@@ -305,7 +305,7 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
return false;
}
- QString lcName = qName.lower();
+ TQString lcName = qName.lower();
if (getSubHandler()) {
return getSubHandler()->startElement(namespaceURI, localName, lcName, atts);
@@ -427,9 +427,9 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
// rosegardenguidoc.cpp. We only care about major and minor
// here, not point.
- QString version = atts.value("version");
- QString smajor = atts.value("format-version-major");
- QString sminor = atts.value("format-version-minor");
+ TQString version = atts.value("version");
+ TQString smajor = atts.value("format-version-major");
+ TQString sminor = atts.value("format-version-minor");
// std::cerr << "\n\n\nRosegarden file version = \"" << version << "\"\n\n\n" << std::endl;
@@ -475,17 +475,17 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
// Get and set MIDI filters
//
- QString thruStr = atts.value("thrufilter");
+ TQString thruStr = atts.value("thrufilter");
if (thruStr)
getStudio().setMIDIThruFilter(thruStr.toInt());
- QString recordStr = atts.value("recordfilter");
+ TQString recordStr = atts.value("recordfilter");
if (recordStr)
getStudio().setMIDIRecordFilter(recordStr.toInt());
- QString inputStr = atts.value("audioinputpairs");
+ TQString inputStr = atts.value("audioinputpairs");
if (inputStr) {
int inputs = inputStr.toInt();
@@ -496,14 +496,14 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
}
}
- QString mixerStr = atts.value("mixerdisplayoptions");
+ TQString mixerStr = atts.value("mixerdisplayoptions");
if (mixerStr) {
unsigned int mixer = mixerStr.toUInt();
getStudio().setMixerDisplayOptions(mixer);
}
- QString metronomeStr = atts.value("metronomedevice");
+ TQString metronomeStr = atts.value("metronomedevice");
if (metronomeStr) {
DeviceId metronome = metronomeStr.toUInt();
@@ -518,32 +518,32 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
}
timeT t = 0;
- QString timeStr = atts.value("time");
+ TQString timeStr = atts.value("time");
if (timeStr)
t = timeStr.toInt();
int num = 4;
- QString numStr = atts.value("numerator");
+ TQString numStr = atts.value("numerator");
if (numStr)
num = numStr.toInt();
int denom = 4;
- QString denomStr = atts.value("denominator");
+ TQString denomStr = atts.value("denominator");
if (denomStr)
denom = denomStr.toInt();
bool common = false;
- QString commonStr = atts.value("common");
+ TQString commonStr = atts.value("common");
if (commonStr)
common = (commonStr == "true");
bool hidden = false;
- QString hiddenStr = atts.value("hidden");
+ TQString hiddenStr = atts.value("hidden");
if (hiddenStr)
hidden = (hiddenStr == "true");
bool hiddenBars = false;
- QString hiddenBarsStr = atts.value("hiddenbars");
+ TQString hiddenBarsStr = atts.value("hiddenbars");
if (hiddenBarsStr)
hiddenBars = (hiddenBarsStr == "true");
@@ -553,14 +553,14 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
} else if (lcName == "tempo") {
timeT t = 0;
- QString timeStr = atts.value("time");
+ TQString timeStr = atts.value("time");
if (timeStr)
t = timeStr.toInt();
tempoT tempo = Composition::getTempoForQpm(120.0);
- QString tempoStr = atts.value("tempo");
- QString targetStr = atts.value("target");
- QString bphStr = atts.value("bph");
+ TQString tempoStr = atts.value("tempo");
+ TQString targetStr = atts.value("target");
+ TQString bphStr = atts.value("bph");
if (tempoStr) {
tempo = tempoStr.toInt();
} else if (bphStr) {
@@ -586,16 +586,16 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
// Get and set the record track
//
- QString recordStr = atts.value("recordtrack");
+ TQString recordStr = atts.value("recordtrack");
if (recordStr) {
getComposition().setTrackRecording(recordStr.toInt(), true);
}
- QString recordPlStr = atts.value("recordtracks");
+ TQString recordPlStr = atts.value("recordtracks");
if (recordPlStr) {
RG_DEBUG << "Record tracks: " << recordPlStr << endl;
- QStringList recordList = QStringList::split(',', recordPlStr);
- for (QStringList::iterator i = recordList.begin();
+ TQStringList recordList = TQStringList::split(',', recordPlStr);
+ for (TQStringList::iterator i = recordList.begin();
i != recordList.end(); ++i) {
RG_DEBUG << "Record track: " << (*i).toInt() << endl;
getComposition().setTrackRecording((*i).toInt(), true);
@@ -605,7 +605,7 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
// Get and set the position pointer
//
int position = 0;
- QString positionStr = atts.value("pointer");
+ TQString positionStr = atts.value("pointer");
if (positionStr) {
position = positionStr.toInt();
}
@@ -617,7 +617,7 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
// We prefer the new compositionDefaultTempo over the
// older defaultTempo.
//
- QString tempoStr = atts.value("compositionDefaultTempo");
+ TQString tempoStr = atts.value("compositionDefaultTempo");
if (tempoStr) {
tempoT tempo = tempoT(tempoStr.toInt());
getComposition().setCompositionDefaultTempo(tempo);
@@ -636,8 +636,8 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
// Set the loop
//
- QString loopStartStr = atts.value("loopstart");
- QString loopEndStr = atts.value("loopend");
+ TQString loopStartStr = atts.value("loopstart");
+ TQString loopEndStr = atts.value("loopend");
if (loopStartStr && loopEndStr) {
int loopStart = loopStartStr.toInt();
@@ -647,7 +647,7 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
getComposition().setLoopEnd(loopEnd);
}
- QString selectedTrackStr = atts.value("selected");
+ TQString selectedTrackStr = atts.value("selected");
if (selectedTrackStr) {
TrackId selectedTrack =
@@ -656,7 +656,7 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
getComposition().setSelectedTrack(selectedTrack);
}
- QString soloTrackStr = atts.value("solo");
+ TQString soloTrackStr = atts.value("solo");
if (soloTrackStr) {
if (soloTrackStr.toInt() == 1)
getComposition().setSolo(true);
@@ -665,7 +665,7 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
}
- QString playMetStr = atts.value("playmetronome");
+ TQString playMetStr = atts.value("playmetronome");
if (playMetStr) {
if (playMetStr.toInt())
getComposition().setPlayMetronome(true);
@@ -673,7 +673,7 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
getComposition().setPlayMetronome(false);
}
- QString recMetStr = atts.value("recordmetronome");
+ TQString recMetStr = atts.value("recordmetronome");
if (recMetStr) {
if (recMetStr.toInt())
getComposition().setRecordMetronome(true);
@@ -681,18 +681,18 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
getComposition().setRecordMetronome(false);
}
- QString nextTriggerIdStr = atts.value("nexttriggerid");
+ TQString nextTriggerIdStr = atts.value("nexttriggerid");
if (nextTriggerIdStr) {
getComposition().setNextTriggerSegmentId(nextTriggerIdStr.toInt());
}
- QString copyrightStr = atts.value("copyright");
+ TQString copyrightStr = atts.value("copyright");
if (copyrightStr) {
getComposition().setCopyrightNote(qstrtostr(copyrightStr));
}
- QString startMarkerStr = atts.value("startMarker");
- QString endMarkerStr = atts.value("endMarker");
+ TQString startMarkerStr = atts.value("startMarker");
+ TQString endMarkerStr = atts.value("endMarker");
if (startMarkerStr) {
getComposition().setStartMarker(startMarkerStr.toInt());
@@ -715,17 +715,17 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
std::string label;
bool muted = false;
- QString trackNbStr = atts.value("id");
+ TQString trackNbStr = atts.value("id");
if (trackNbStr) {
id = trackNbStr.toInt();
}
- QString labelStr = atts.value("label");
+ TQString labelStr = atts.value("label");
if (labelStr) {
label = qstrtostr(labelStr);
}
- QString mutedStr = atts.value("muted");
+ TQString mutedStr = atts.value("muted");
if (mutedStr) {
if (mutedStr == "true")
muted = true;
@@ -733,12 +733,12 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
muted = false;
}
- QString positionStr = atts.value("position");
+ TQString positionStr = atts.value("position");
if (positionStr) {
position = positionStr.toInt();
}
- QString instrumentStr = atts.value("instrument");
+ TQString instrumentStr = atts.value("instrument");
if (instrumentStr) {
instrument = instrumentStr.toInt();
}
@@ -753,42 +753,42 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
// to default values in the ctor, so they don't need to be initialized
// here
- QString presetLabelStr = atts.value("defaultLabel");
+ TQString presetLabelStr = atts.value("defaultLabel");
if (labelStr) {
track->setPresetLabel(presetLabelStr);
}
- QString clefStr = atts.value("defaultClef");
+ TQString clefStr = atts.value("defaultClef");
if (clefStr) {
track->setClef(clefStr.toInt());
}
- QString transposeStr = atts.value("defaultTranspose");
+ TQString transposeStr = atts.value("defaultTranspose");
if (transposeStr) {
track->setTranspose(transposeStr.toInt());
}
- QString colorStr = atts.value("defaultColour");
+ TQString colorStr = atts.value("defaultColour");
if (colorStr) {
track->setColor(colorStr.toInt());
}
- QString highplayStr = atts.value("defaultHighestPlayable");
+ TQString highplayStr = atts.value("defaultHighestPlayable");
if (highplayStr) {
track->setHighestPlayable(highplayStr.toInt());
}
- QString lowplayStr = atts.value("defaultLowestPlayable");
+ TQString lowplayStr = atts.value("defaultLowestPlayable");
if (lowplayStr) {
track->setLowestPlayable(lowplayStr.toInt());
}
- QString staffSizeStr = atts.value("staffSize");
+ TQString staffSizeStr = atts.value("staffSize");
if (staffSizeStr) {
track->setStaffSize(staffSizeStr.toInt());
}
- QString staffBracketStr = atts.value("staffBracket");
+ TQString staffBracketStr = atts.value("staffBracket");
if (staffBracketStr) {
track->setStaffBracket(staffBracketStr.toInt());
}
@@ -808,17 +808,17 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
int track = -1, startTime = 0;
unsigned int colourindex = 0;
- QString trackNbStr = atts.value("track");
+ TQString trackNbStr = atts.value("track");
if (trackNbStr) {
track = trackNbStr.toInt();
}
- QString startIdxStr = atts.value("start");
+ TQString startIdxStr = atts.value("start");
if (startIdxStr) {
startTime = startIdxStr.toInt();
}
- QString segmentType = (atts.value("type")).lower();
+ TQString segmentType = (atts.value("type")).lower();
if (segmentType) {
if (segmentType == "audio") {
int audioFileId = atts.value("file").toInt();
@@ -848,12 +848,12 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
m_currentSegment = new Segment(Segment::Internal);
}
- QString repeatStr = atts.value("repeat");
+ TQString repeatStr = atts.value("repeat");
if (repeatStr.lower() == "true") {
m_currentSegment->setRepeating(true);
}
- QString delayStr = atts.value("delay");
+ TQString delayStr = atts.value("delay");
if (delayStr) {
RG_DEBUG << "Delay string is \"" << delayStr << "\"" << endl;
long delay = delayStr.toLong();
@@ -861,9 +861,9 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
m_currentSegment->setDelay(delay);
}
- QString rtDelaynSec = atts.value("rtdelaynsec");
- QString rtDelayuSec = atts.value("rtdelayusec");
- QString rtDelaySec = atts.value("rtdelaysec");
+ TQString rtDelaynSec = atts.value("rtdelaynsec");
+ TQString rtDelayuSec = atts.value("rtdelayusec");
+ TQString rtDelaySec = atts.value("rtdelaysec");
if (rtDelaySec && (rtDelaynSec || rtDelayuSec)) {
if (rtDelaynSec) {
m_currentSegment->setRealTimeDelay
@@ -876,42 +876,42 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
}
}
- QString transposeStr = atts.value("transpose");
+ TQString transposeStr = atts.value("transpose");
if (transposeStr)
m_currentSegment->setTranspose(transposeStr.toInt());
// fill in the label
- QString labelStr = atts.value("label");
+ TQString labelStr = atts.value("label");
if (labelStr)
m_currentSegment->setLabel(qstrtostr(labelStr));
m_currentSegment->setTrack(track);
//m_currentSegment->setStartTime(startTime);
- QString colourIndStr = atts.value("colourindex");
+ TQString colourIndStr = atts.value("colourindex");
if (colourIndStr) {
colourindex = colourIndStr.toInt();
}
m_currentSegment->setColourIndex(colourindex);
- QString snapGridSizeStr = atts.value("snapgridsize");
+ TQString snapGridSizeStr = atts.value("snapgridsize");
if (snapGridSizeStr) {
m_currentSegment->setSnapGridSize(snapGridSizeStr.toInt());
}
- QString viewFeaturesStr = atts.value("viewfeatures");
+ TQString viewFeaturesStr = atts.value("viewfeatures");
if (viewFeaturesStr) {
m_currentSegment->setViewFeatures(viewFeaturesStr.toInt());
}
m_currentTime = startTime;
- QString triggerIdStr = atts.value("triggerid");
- QString triggerPitchStr = atts.value("triggerbasepitch");
- QString triggerVelocityStr = atts.value("triggerbasevelocity");
- QString triggerRetuneStr = atts.value("triggerretune");
- QString triggerAdjustTimeStr = atts.value("triggeradjusttimes");
+ TQString triggerIdStr = atts.value("triggerid");
+ TQString triggerPitchStr = atts.value("triggerbasepitch");
+ TQString triggerVelocityStr = atts.value("triggerbasevelocity");
+ TQString triggerRetuneStr = atts.value("triggerretune");
+ TQString triggerAdjustTimeStr = atts.value("triggeradjusttimes");
if (triggerIdStr) {
int pitch = -1;
@@ -936,7 +936,7 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
getComposition().setSegmentStartTime(m_currentSegment, startTime);
}
- QString endMarkerStr = atts.value("endmarker");
+ TQString endMarkerStr = atts.value("endmarker");
if (endMarkerStr) {
delete m_segmentEndMarkerTime;
m_segmentEndMarkerTime = new timeT(endMarkerStr.toInt());
@@ -958,13 +958,13 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
return false;
}
- QString type = atts.value("type");
+ TQString type = atts.value("type");
//RG_DEBUG << "RoseXmlHandler::startElement - controller type = " << type << endl;
if (type == strtoqstr(PitchBend::EventType))
m_currentSegment->addEventRuler(PitchBend::EventType);
else if (type == strtoqstr(Controller::EventType)) {
- QString value = atts.value("value");
+ TQString value = atts.value("value");
if (value != "")
m_currentSegment->addEventRuler(Controller::EventType, value.toInt());
@@ -976,7 +976,7 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
std::cerr << "WARNING: This Rosegarden file uses the deprecated element \"resync\". We recommend re-saving the file from this version of Rosegarden to assure your ability to re-load it in future versions" << std::endl;
m_deprecation = true;
- QString time(atts.value("time"));
+ TQString time(atts.value("time"));
bool isNumeric;
int numTime = time.toInt(&isNumeric);
if (isNumeric)
@@ -994,9 +994,9 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
return true;
}
- QString id(atts.value("id"));
- QString file(atts.value("file"));
- QString label(atts.value("label"));
+ TQString id(atts.value("id"));
+ TQString file(atts.value("file"));
+ TQString label(atts.value("label"));
if (id.isEmpty() || file.isEmpty() || label.isEmpty()) {
m_errorString = "Audio object has empty parameters";
@@ -1015,8 +1015,8 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
// Ok, now attempt to use the KFileDialog saved default
// value for the AudioPath.
//
- QString thing;
- KURL url = KFileDialog::getStartURL(QString(":WAVS"), thing);
+ TQString thing;
+ KURL url = KFileDialog::getStartURL(TQString(":WAVS"), thing);
getAudioFileManager().setAudioPath(url.path().latin1());
/*
@@ -1041,20 +1041,20 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
// helps us locate the rest of the files.
//
- QString newFilename = "";
- QString newPath = "";
+ TQString newFilename = "";
+ TQString newPath = "";
do {
FileLocateDialog fL((RosegardenGUIApp *)m_doc->parent(),
file,
- QString(getAudioFileManager().getAudioPath().c_str()));
+ TQString(getAudioFileManager().getAudioPath().c_str()));
int result = fL.exec();
- if (result == QDialog::Accepted) {
+ if (result == TQDialog::Accepted) {
newFilename = fL.getFilename();
newPath = fL.getDirectory();
- } else if (result == QDialog::Rejected) {
+ } else if (result == TQDialog::Rejected) {
// just skip the file
break;
} else {
@@ -1094,7 +1094,7 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
return false;
}
- QString search(atts.value("value"));
+ TQString search(atts.value("value"));
if (search.isEmpty()) {
m_errorString = "Audiopath has no value";
@@ -1102,9 +1102,9 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
}
if (!search.startsWith("/") && !search.startsWith("~")) {
- QString docPath = m_doc->getAbsFilePath();
- QString dirPath = QFileInfo(docPath).dirPath();
- if (QFileInfo(dirPath).exists()) {
+ TQString docPath = m_doc->getAbsFilePath();
+ TQString dirPath = TQFileInfo(docPath).dirPath();
+ if (TQFileInfo(dirPath).exists()) {
search = dirPath + "/" + search;
}
}
@@ -1224,9 +1224,9 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
m_haveControls = false;
- QString type = (atts.value("type")).lower();
- QString idString = atts.value("id");
- QString nameStr = atts.value("name");
+ TQString type = (atts.value("type")).lower();
+ TQString idString = atts.value("id");
+ TQString nameStr = atts.value("name");
if (idString.isNull()) {
m_errorString = "No ID on Device tag";
@@ -1235,7 +1235,7 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
int id = idString.toInt();
if (type == "midi") {
- QString direction = atts.value("direction").lower();
+ TQString direction = atts.value("direction").lower();
if (direction.isNull() ||
direction == "" ||
@@ -1254,7 +1254,7 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
}
}
- QString connection = atts.value("connection");
+ TQString connection = atts.value("connection");
if (m_createDevices && m_device &&
!connection.isNull() && connection != "") {
setMIDIDeviceConnection(connection);
@@ -1262,7 +1262,7 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
setMIDIDeviceName(nameStr);
- QString vstr = atts.value("variation").lower();
+ TQString vstr = atts.value("variation").lower();
MidiDevice::VariationType variation =
MidiDevice::NoVariations;
if (!vstr.isNull()) {
@@ -1300,8 +1300,8 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
// information.
//
if (m_device && m_device->getType() == Device::Midi) {
- QString name = atts.value("name");
- QString email = atts.value("email");
+ TQString name = atts.value("name");
+ TQString email = atts.value("email");
dynamic_cast<MidiDevice*>(m_device)->
setLibrarian(qstrtostr(name), qstrtostr(email));
@@ -1317,7 +1317,7 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
return false;
}
- QString nameStr = atts.value("name");
+ TQString nameStr = atts.value("name");
m_percussion = (atts.value("percussion").lower() == "true");
m_msb = (atts.value("msb")).toInt();
m_lsb = (atts.value("lsb")).toInt();
@@ -1355,9 +1355,9 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
{
if (m_section == InStudio)
{
- QString nameStr = (atts.value("name"));
+ TQString nameStr = (atts.value("name"));
MidiByte pc = atts.value("id").toInt();
- QString keyMappingStr = (atts.value("keymapping"));
+ TQString keyMappingStr = (atts.value("keymapping"));
// Create a new program
MidiProgram program
@@ -1401,7 +1401,7 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
}
if (m_device && (m_device->getType() == Device::Midi)) {
- QString name = atts.value("name");
+ TQString name = atts.value("name");
m_keyMapping = new MidiKeyMapping(qstrtostr(name));
m_keyNameMap.clear();
}
@@ -1410,8 +1410,8 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
} else if (lcName == "key") {
if (m_keyMapping) {
- QString numStr = atts.value("number");
- QString namStr = atts.value("name");
+ TQString numStr = atts.value("number");
+ TQString namStr = atts.value("name");
if (numStr && namStr) {
m_keyNameMap[numStr.toInt()] = qstrtostr(namStr);
}
@@ -1448,15 +1448,15 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
return false;
}
- QString name = atts.value("name");
- QString type = atts.value("type");
- QString descr = atts.value("description");
- QString min = atts.value("min");
- QString max = atts.value("max");
- QString def = atts.value("default");
- QString conVal = atts.value("controllervalue");
- QString colour = atts.value("colourindex");
- QString ipbPosition = atts.value("ipbposition");
+ TQString name = atts.value("name");
+ TQString type = atts.value("type");
+ TQString descr = atts.value("description");
+ TQString min = atts.value("min");
+ TQString max = atts.value("max");
+ TQString def = atts.value("default");
+ TQString conVal = atts.value("controllervalue");
+ TQString colour = atts.value("colourindex");
+ TQString ipbPosition = atts.value("ipbposition");
ControlParameter con(qstrtostr(name),
qstrtostr(type),
@@ -1696,12 +1696,12 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
}
bool bypassed = false;
- QString bpStr = atts.value("bypassed");
+ TQString bpStr = atts.value("bypassed");
if (bpStr.lower() == "true")
bypassed = true;
std::string program = "";
- QString progStr = atts.value("program");
+ TQString progStr = atts.value("program");
if (progStr) {
program = qstrtostr(progStr);
}
@@ -1710,7 +1710,7 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
// string, but we will accept a LADSPA UniqueId if there's
// no identifier, for backward compatibility
- QString identifier = atts.value("identifier");
+ TQString identifier = atts.value("identifier");
AudioPlugin *plugin = 0;
AudioPluginManager *apm = getAudioPluginManager();
@@ -1763,7 +1763,7 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
} else { // no instrument
if (lcName == "synth") {
- QString identifier = atts.value("identifier");
+ TQString identifier = atts.value("identifier");
if (identifier) {
RG_DEBUG << "WARNING: RoseXmlHandler: no instrument for plugin " << identifier << endl;
m_pluginsNotFound.insert(identifier);
@@ -1782,7 +1782,7 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
unsigned long portId = atts.value("id").toULong();
double value = qstrtodouble(atts.value("value"));
- QString changed = atts.value("changed");
+ TQString changed = atts.value("changed");
bool changedSinceProgram = (changed == "true");
if (m_plugin) {
@@ -1801,8 +1801,8 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
return false;
}
- QString key = atts.value("key");
- QString value = atts.value("value");
+ TQString key = atts.value("key");
+ TQString value = atts.value("value");
if (m_plugin) {
m_plugin->setConfigurationValue(qstrtostr(key), qstrtostr(value));
@@ -1963,7 +1963,7 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
int value = atts.value("value").toInt();
int channel = atts.value("channel").toInt();
- QString type = atts.value("type");
+ TQString type = atts.value("type");
if (type) {
if (type.lower() == "buss") {
if (m_instrument)
@@ -1992,7 +1992,7 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
} else if (lcName == "colourmap") {
if (m_section == InAppearance) {
- QString mapName = atts.value("name");
+ TQString mapName = atts.value("name");
m_inColourMap = true;
if (mapName == "segmentmap") {
m_colourMap = &m_doc->getComposition().getSegmentColourMap();
@@ -2011,7 +2011,7 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
if (m_inColourMap && m_colourMap) {
unsigned int id = atts.value("id").toInt();
- QString name = atts.value("name");
+ TQString name = atts.value("name");
unsigned int red = atts.value("red").toInt();
unsigned int blue = atts.value("blue").toInt();
unsigned int green = atts.value("green").toInt();
@@ -2038,8 +2038,8 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
return false;
}
int time = atts.value("time").toInt();
- QString name = atts.value("name");
- QString descr = atts.value("description");
+ TQString name = atts.value("name");
+ TQString descr = atts.value("description");
Marker *marker =
new Marker(time,
@@ -2055,9 +2055,9 @@ RoseXmlHandler::startElement(const QString& namespaceURI,
}
bool
-RoseXmlHandler::endElement(const QString& namespaceURI,
- const QString& localName,
- const QString& qName)
+RoseXmlHandler::endElement(const TQString& namespaceURI,
+ const TQString& localName,
+ const TQString& qName)
{
if (getSubHandler()) {
bool finished;
@@ -2076,7 +2076,7 @@ RoseXmlHandler::endElement(const QString& namespaceURI,
ProgressDialog::processEvents();
}
- QString lcName = qName.lower();
+ TQString lcName = qName.lower();
if (lcName == "rosegarden-data") {
@@ -2182,7 +2182,7 @@ RoseXmlHandler::endElement(const QString& namespaceURI,
}
bool
-RoseXmlHandler::characters(const QString& s)
+RoseXmlHandler::characters(const TQString& s)
{
if (m_subHandler)
return m_subHandler->characters(s);
@@ -2197,23 +2197,23 @@ RoseXmlHandler::errorString()
}
bool
-RoseXmlHandler::error(const QXmlParseException& exception)
+RoseXmlHandler::error(const TQXmlParseException& exception)
{
- m_errorString = QString("%1 at line %2, column %3")
+ m_errorString = TQString("%1 at line %2, column %3")
.arg(exception.message())
.arg(exception.lineNumber())
.arg(exception.columnNumber());
- return QXmlDefaultHandler::error( exception );
+ return TQXmlDefaultHandler::error( exception );
}
bool
-RoseXmlHandler::fatalError(const QXmlParseException& exception)
+RoseXmlHandler::fatalError(const TQXmlParseException& exception)
{
- m_errorString = QString("%1 at line %2, column %3")
+ m_errorString = TQString("%1 at line %2, column %3")
.arg(exception.message())
.arg(exception.lineNumber())
.arg(exception.columnNumber());
- return QXmlDefaultHandler::fatalError( exception );
+ return TQXmlDefaultHandler::fatalError( exception );
}
bool
@@ -2235,16 +2235,16 @@ RoseXmlHandler::setSubHandler(XmlSubHandler* sh)
}
void
-RoseXmlHandler::addMIDIDevice(QString name, bool createAtSequencer)
+RoseXmlHandler::addMIDIDevice(TQString name, bool createAtSequencer)
{
unsigned int deviceId = 0;
if (createAtSequencer) {
- QByteArray data;
- QByteArray replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQByteArray replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
arg << (int)Device::Midi;
arg << (unsigned int)MidiDevice::Play;
@@ -2256,7 +2256,7 @@ RoseXmlHandler::addMIDIDevice(QString name, bool createAtSequencer)
}
if (replyType == "unsigned int") {
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
reply >> deviceId;
} else {
SEQMAN_DEBUG << "RoseXmlHandler::addMIDIDevice - "
@@ -2325,7 +2325,7 @@ RoseXmlHandler::skipToNextPlayDevice()
}
void
-RoseXmlHandler::setMIDIDeviceConnection(QString connection)
+RoseXmlHandler::setMIDIDeviceConnection(TQString connection)
{
SEQMAN_DEBUG << "RoseXmlHandler::setMIDIDeviceConnection(" << connection << ")" << endl;
@@ -2333,19 +2333,19 @@ RoseXmlHandler::setMIDIDeviceConnection(QString connection)
if (!md)
return ;
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << (unsigned int)md->getId();
arg << connection;
- rgapp->sequencerSend("setPlausibleConnection(unsigned int, QString)",
+ rgapp->sequencerSend("setPlausibleConnection(unsigned int, TQString)",
data);
// connection should be sync'd later in the natural course of things
}
void
-RoseXmlHandler::setMIDIDeviceName(QString name)
+RoseXmlHandler::setMIDIDeviceName(TQString name)
{
SEQMAN_DEBUG << "RoseXmlHandler::setMIDIDeviceName(" << name << ")" << endl;
@@ -2353,15 +2353,15 @@ RoseXmlHandler::setMIDIDeviceName(QString name)
if (!md)
return ;
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << (unsigned int)md->getId();
arg << name;
std::cerr << "Renaming device " << md->getId() << " to " << name << std::endl;
- rgapp->sequencerSend("renameDevice(unsigned int, QString)",
+ rgapp->sequencerSend("renameDevice(unsigned int, TQString)",
data);
}
diff --git a/src/document/RoseXmlHandler.h b/src/document/RoseXmlHandler.h
index ab06e3a..e93408f 100644
--- a/src/document/RoseXmlHandler.h
+++ b/src/document/RoseXmlHandler.h
@@ -32,13 +32,13 @@
#include <map>
#include <set>
#include <string>
-#include <qstring.h>
+#include <tqstring.h>
#include "base/Event.h"
-#include <qxml.h>
+#include <tqxml.h>
-class QXmlParseException;
-class QXmlAttributes;
+class TQXmlParseException;
+class TQXmlAttributes;
namespace Rosegarden
@@ -91,16 +91,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 (); // [rwb] - for tempo element catch
@@ -109,13 +109,13 @@ public:
bool isCancelled() { return m_cancelled; }
/// Return the error string set during the parsing (if any)
- QString errorString();
+ TQString errorString();
bool hasActiveAudio() const { return m_hasActiveAudio; }
- std::set<QString> &pluginsNotFound() { return m_pluginsNotFound; }
+ std::set<TQString> &pluginsNotFound() { return m_pluginsNotFound; }
- bool error(const QXmlParseException& exception);
- bool fatalError(const QXmlParseException& exception);
+ bool error(const TQXmlParseException& exception);
+ bool fatalError(const TQXmlParseException& exception);
protected:
@@ -129,9 +129,9 @@ protected:
void setSubHandler(XmlSubHandler* sh);
XmlSubHandler* getSubHandler() { return m_subHandler; }
- void addMIDIDevice(QString name, bool createAtSequencer);
- void setMIDIDeviceConnection(QString connection);
- void setMIDIDeviceName(QString name);
+ void addMIDIDevice(TQString name, bool createAtSequencer);
+ void setMIDIDeviceConnection(TQString connection);
+ void setMIDIDeviceName(TQString name);
void skipToNextPlayDevice();
//--------------- Data members ---------------------------------
@@ -157,8 +157,8 @@ protected:
bool m_foundTempo;
- QString m_errorString;
- std::set<QString> m_pluginsNotFound;
+ TQString m_errorString;
+ std::set<TQString> m_pluginsNotFound;
RosegardenFileSection m_section;
Device *m_device;
diff --git a/src/document/RosegardenGUIDoc.cpp b/src/document/RosegardenGUIDoc.cpp
index f89a83f..99cead1 100644
--- a/src/document/RosegardenGUIDoc.cpp
+++ b/src/document/RosegardenGUIDoc.cpp
@@ -26,7 +26,7 @@
#include "RosegardenGUIDoc.h"
#include <kapplication.h>
-#include <qxml.h>
+#include <tqxml.h>
#include "sound/Midi.h"
#include "gui/editors/segment/TrackEditor.h"
#include "gui/editors/segment/TrackButtons.h"
@@ -98,17 +98,17 @@
#include <kprocess.h>
#include <kprogress.h>
#include <ktempfile.h>
-#include <qcstring.h>
-#include <qdatastream.h>
-#include <qdialog.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
-#include <qwidget.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
+#include <tqdialog.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
+#include <tqwidget.h>
#include "gui/widgets/ProgressBar.h"
@@ -117,11 +117,11 @@ namespace Rosegarden
using namespace BaseProperties;
-RosegardenGUIDoc::RosegardenGUIDoc(QWidget *parent,
+RosegardenGUIDoc::RosegardenGUIDoc(TQWidget *parent,
AudioPluginManager *pluginManager,
bool skipAutoload,
const char *name)
- : QObject(parent, name),
+ : TQObject(parent, name),
m_modified(false),
m_autoSaved(false),
m_audioPreviewThread(&m_audioFileManager),
@@ -137,11 +137,11 @@ RosegardenGUIDoc::RosegardenGUIDoc(QWidget *parent,
m_viewList.setAutoDelete(false);
m_editViewList.setAutoDelete(false);
- connect(m_commandHistory, SIGNAL(commandExecuted(KCommand *)),
- this, SLOT(slotDocumentModified()));
+ connect(m_commandHistory, TQT_SIGNAL(commandExecuted(KCommand *)),
+ this, TQT_SLOT(slotDocumentModified()));
- connect(m_commandHistory, SIGNAL(documentRestored()),
- this, SLOT(slotDocumentRestored()));
+ connect(m_commandHistory, TQT_SIGNAL(documentRestored()),
+ this, TQT_SLOT(slotDocumentRestored()));
// autoload a new document
if (!skipAutoload)
@@ -203,22 +203,22 @@ void RosegardenGUIDoc::deleteEditViews()
m_editViewList.clear();
}
-void RosegardenGUIDoc::setAbsFilePath(const QString &filename)
+void RosegardenGUIDoc::setAbsFilePath(const TQString &filename)
{
m_absFilePath = filename;
}
-void RosegardenGUIDoc::setTitle(const QString &_t)
+void RosegardenGUIDoc::setTitle(const TQString &_t)
{
m_title = _t;
}
-const QString &RosegardenGUIDoc::getAbsFilePath() const
+const TQString &RosegardenGUIDoc::getAbsFilePath() const
{
return m_absFilePath;
}
-const QString& RosegardenGUIDoc::getTitle() const
+const TQString& RosegardenGUIDoc::getTitle() const
{
return m_title;
}
@@ -277,13 +277,13 @@ RosegardenGUIDoc::jumpToQuickMarker()
slotSetPointerPosition(m_quickMarkerTime);
}
-QString RosegardenGUIDoc::getAutoSaveFileName()
+TQString RosegardenGUIDoc::getAutoSaveFileName()
{
- QString filename = getAbsFilePath();
+ TQString filename = getAbsFilePath();
if (filename.isEmpty())
- filename = QDir::currentDirPath() + "/" + getTitle();
+ filename = TQDir::currentDirPath() + "/" + getTitle();
- QString autoSaveFileName = kapp->tempSaveName(filename);
+ TQString autoSaveFileName = kapp->tempSaveName(filename);
return autoSaveFileName;
}
@@ -295,13 +295,13 @@ void RosegardenGUIDoc::slotAutoSave()
if (isAutoSaved() || !isModified())
return ;
- QString autoSaveFileName = getAutoSaveFileName();
+ TQString autoSaveFileName = getAutoSaveFileName();
RG_DEBUG << "RosegardenGUIDoc::slotAutoSave() - doc modified - saving '"
<< getAbsFilePath() << "' as "
<< autoSaveFileName << endl;
- QString errMsg;
+ TQString errMsg;
saveDocument(autoSaveFileName, errMsg, true);
@@ -343,15 +343,15 @@ bool RosegardenGUIDoc::saveIfModified()
} else {
RG_DEBUG << "RosegardenGUIDoc::saveIfModified() : regular file\n";
- QString errMsg;
+ TQString errMsg;
completed = saveDocument(getAbsFilePath(), errMsg);
if (!completed) {
if (errMsg) {
- KMessageBox::error(0, i18n(QString("Could not save document at %1\n(%2)")
+ KMessageBox::error(0, i18n(TQString("Could not save document at %1\n(%2)")
.arg(getAbsFilePath()).arg(errMsg)));
} else {
- KMessageBox::error(0, i18n(QString("Could not save document at %1")
+ KMessageBox::error(0, i18n(TQString("Could not save document at %1")
.arg(getAbsFilePath())));
}
}
@@ -362,7 +362,7 @@ bool RosegardenGUIDoc::saveIfModified()
case KMessageBox::No:
// delete the autosave file so it won't annoy
// the user when reloading the file.
- QFile::remove
+ TQFile::remove
(getAutoSaveFileName());
completed = true;
break;
@@ -391,8 +391,8 @@ bool RosegardenGUIDoc::saveIfModified()
bool
RosegardenGUIDoc::deleteOrphanedAudioFiles(bool documentWillNotBeSaved)
{
- std::vector<QString> recordedOrphans;
- std::vector<QString> derivedOrphans;
+ std::vector<TQString> recordedOrphans;
+ std::vector<TQString> derivedOrphans;
if (documentWillNotBeSaved) {
@@ -419,7 +419,7 @@ RosegardenGUIDoc::deleteOrphanedAudioFiles(bool documentWillNotBeSaved)
// (i.e. they haven't been loaded more than once, or reloaded
// after orphaning).
- for (std::vector<QString>::iterator i = m_orphanedRecordedAudioFiles.begin();
+ for (std::vector<TQString>::iterator i = m_orphanedRecordedAudioFiles.begin();
i != m_orphanedRecordedAudioFiles.end(); ++i) {
bool stillHave = false;
@@ -441,7 +441,7 @@ RosegardenGUIDoc::deleteOrphanedAudioFiles(bool documentWillNotBeSaved)
//is not currently used in a segment? Probably: we have no way to
//reuse them
- for (std::vector<QString>::iterator i = m_orphanedDerivedAudioFiles.begin();
+ for (std::vector<TQString>::iterator i = m_orphanedDerivedAudioFiles.begin();
i != m_orphanedDerivedAudioFiles.end(); ++i) {
bool stillHave = false;
@@ -459,11 +459,11 @@ RosegardenGUIDoc::deleteOrphanedAudioFiles(bool documentWillNotBeSaved)
}
for (size_t i = 0; i < derivedOrphans.size(); ++i) {
- QFile file(derivedOrphans[i]);
+ TQFile file(derivedOrphans[i]);
if (!file.remove()) {
std::cerr << "WARNING: Failed to remove orphaned derived audio file \"" << derivedOrphans[i] << std::endl;
}
- QFile peakFile(QString("%1.pk").arg(derivedOrphans[i]));
+ TQFile peakFile(TQString("%1.pk").arg(derivedOrphans[i]));
peakFile.remove();
}
@@ -501,7 +501,7 @@ RosegardenGUIDoc::deleteOrphanedAudioFiles(bool documentWillNotBeSaved)
i18n("The following audio files were recorded during this session but have been unloaded\nfrom the audio file manager, and so are no longer in use in the document you are saving.\n\nYou may want to clean up these files to save disk space.\n\nPlease select any you wish to delete permanently from the hard disk.\n"),
recordedOrphans);
- if (dialog->exec() != QDialog::Accepted) {
+ if (dialog->exec() != TQDialog::Accepted) {
delete dialog;
return true;
}
@@ -513,20 +513,20 @@ RosegardenGUIDoc::deleteOrphanedAudioFiles(bool documentWillNotBeSaved)
if (recordedOrphans.empty())
return true;
- QString question =
+ TQString question =
i18n("<qt>About to delete 1 audio file permanently from the hard disk.<br>There will be no way to recover this file.<br>Are you sure?</qt>\n", "<qt>About to delete %n audio files permanently from the hard disk.<br>There will be no way to recover these files.<br>Are you sure?</qt>", recordedOrphans.size());
int reply = KMessageBox::warningContinueCancel(0, question);
if (reply == KMessageBox::Continue) {
for (size_t i = 0; i < recordedOrphans.size(); ++i) {
- QFile file(recordedOrphans[i]);
+ TQFile file(recordedOrphans[i]);
if (!file.remove()) {
KMessageBox::error(0, i18n("File %1 could not be deleted.")
.arg(recordedOrphans[i]));
}
- QFile peakFile(QString("%1.pk").arg(recordedOrphans[i]));
+ TQFile peakFile(TQString("%1.pk").arg(recordedOrphans[i]));
peakFile.remove();
}
}
@@ -537,17 +537,17 @@ RosegardenGUIDoc::deleteOrphanedAudioFiles(bool documentWillNotBeSaved)
void RosegardenGUIDoc::newDocument()
{
setModified(false);
- setAbsFilePath(QString::null);
+ setAbsFilePath(TQString::null);
setTitle(i18n("Untitled"));
m_commandHistory->clear();
}
void RosegardenGUIDoc::performAutoload()
{
- QString autoloadFile =
+ TQString autoloadFile =
KGlobal::dirs()->findResource("appdata", "autoload.rg");
- QFileInfo autoloadFileInfo(autoloadFile);
+ TQFileInfo autoloadFileInfo(autoloadFile);
if (!autoloadFileInfo.isReadable()) {
RG_DEBUG << "RosegardenGUIDoc::performAutoload - "
@@ -559,7 +559,7 @@ void RosegardenGUIDoc::performAutoload()
}
-bool RosegardenGUIDoc::openDocument(const QString& filename,
+bool RosegardenGUIDoc::openDocument(const TQString& filename,
bool permanent,
const char* /*format*/ /*=0*/)
{
@@ -571,30 +571,30 @@ bool RosegardenGUIDoc::openDocument(const QString& filename,
newDocument();
- QFileInfo fileInfo(filename);
+ TQFileInfo fileInfo(filename);
setTitle(fileInfo.fileName());
// Check if file readable with fileInfo ?
if (!fileInfo.isReadable() || fileInfo.isDir()) {
KStartupLogo::hideIfStillThere();
- QString msg(i18n("Can't open file '%1'").arg(filename));
+ TQString msg(i18n("Can't open file '%1'").arg(filename));
KMessageBox::sorry(0, msg);
return false;
}
ProgressDialog progressDlg(i18n("Reading file..."),
100,
- (QWidget*)parent());
+ (TQWidget*)parent());
- connect(&progressDlg, SIGNAL(cancelClicked()),
- &m_audioFileManager, SLOT(slotStopPreview()));
+ connect(&progressDlg, TQT_SIGNAL(cancelClicked()),
+ &m_audioFileManager, TQT_SLOT(slotStopPreview()));
progressDlg.setMinimumDuration(500);
progressDlg.setAutoReset(true); // we're re-using it for the preview generation
setAbsFilePath(fileInfo.absFilePath());
- QString errMsg;
- QString fileContents;
+ TQString errMsg;
+ TQString fileContents;
bool cancelled = false, okay = true;
KFilterDev* fileCompressedDevice = static_cast<KFilterDev*>(KFilterDev::deviceForFile(filename, "application/x-gzip"));
@@ -624,7 +624,7 @@ bool RosegardenGUIDoc::openDocument(const QString& filename,
fileCompressedDevice->close();
- QString fileContents = QString::fromUtf8(&baseBuffer[0],
+ TQString fileContents = TQString::fromUtf8(&baseBuffer[0],
baseBuffer.size());
// parse xml file
@@ -638,7 +638,7 @@ bool RosegardenGUIDoc::openDocument(const QString& filename,
if (!okay) {
KStartupLogo::hideIfStillThere();
- QString msg(i18n("Error when parsing file '%1': \"%2\"")
+ TQString msg(i18n("Error when parsing file '%1': \"%2\"")
.arg(filename)
.arg(errMsg));
@@ -688,8 +688,8 @@ bool RosegardenGUIDoc::openDocument(const QString& filename,
// reuse the previous one
progressDlg.setLabel(i18n("Generating audio previews..."));
- connect(&m_audioFileManager, SIGNAL(setProgress(int)),
- progressDlg.progressBar(), SLOT(setValue(int)));
+ connect(&m_audioFileManager, TQT_SIGNAL(setProgress(int)),
+ progressDlg.progressBar(), TQT_SLOT(setValue(int)));
try {
// generate any audio previews after loading the files
m_audioFileManager.generatePreviews();
@@ -826,8 +826,8 @@ RosegardenGUIDoc::mergeDocument(RosegardenGUIDoc *doc,
void RosegardenGUIDoc::clearStudio()
{
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
rgapp->sequencerCall("clearStudio()", replyType, replyData);
RG_DEBUG << "cleared studio\n";
}
@@ -1140,11 +1140,11 @@ int RosegardenGUIDoc::FILE_FORMAT_VERSION_POINT = 0;
-bool RosegardenGUIDoc::saveDocument(const QString& filename,
- QString& errMsg,
+bool RosegardenGUIDoc::saveDocument(const TQString& filename,
+ TQString& errMsg,
bool autosave)
{
- if (!QFileInfo(filename).exists()) { // safe to write directly
+ if (!TQFileInfo(filename).exists()) { // safe to write directly
return saveDocumentActual(filename, errMsg, autosave);
}
@@ -1152,18 +1152,18 @@ bool RosegardenGUIDoc::saveDocument(const QString& filename,
int status = temp.status();
if (status != 0) {
- errMsg = i18n(QString("Could not create temporary file in directory of '%1': %2").arg(filename).arg(strerror(status)));
+ errMsg = i18n(TQString("Could not create temporary file in directory of '%1': %2").arg(filename).arg(strerror(status)));
return false;
}
- QString tempFileName = temp.name();
+ TQString tempFileName = temp.name();
RG_DEBUG << "Temporary file name is: \"" << tempFileName << "\"" << endl;
// KTempFile creates a temporary file that is already open: close it
if (!temp.close()) {
status = temp.status();
- errMsg = i18n(QString("Failure in temporary file handling for file '%1': %2")
+ errMsg = i18n(TQString("Failure in temporary file handling for file '%1': %2")
.arg(tempFileName).arg(strerror(status)));
return false;
}
@@ -1175,9 +1175,9 @@ bool RosegardenGUIDoc::saveDocument(const QString& filename,
return false;
}
- QDir dir(QFileInfo(tempFileName).dir());
+ TQDir dir(TQFileInfo(tempFileName).dir());
if (!dir.rename(tempFileName, filename)) {
- errMsg = i18n(QString("Failed to rename temporary output file '%1' to desired output file '%2'").arg(tempFileName).arg(filename));
+ errMsg = i18n(TQString("Failed to rename temporary output file '%1' to desired output file '%2'").arg(tempFileName).arg(filename));
return false;
}
@@ -1185,8 +1185,8 @@ bool RosegardenGUIDoc::saveDocument(const QString& filename,
}
-bool RosegardenGUIDoc::saveDocumentActual(const QString& filename,
- QString& errMsg,
+bool RosegardenGUIDoc::saveDocumentActual(const TQString& filename,
+ TQString& errMsg,
bool autosave)
{
Profiler profiler("RosegardenGUIDoc::saveDocumentActual");
@@ -1198,14 +1198,14 @@ bool RosegardenGUIDoc::saveDocumentActual(const QString& filename,
if (!rc) {
// do some error report
- errMsg = i18n(QString("Could not open file '%1' for writing").arg(filename));
+ errMsg = i18n(TQString("Could not open file '%1' for writing").arg(filename));
delete fileCompressedDevice;
return false; // couldn't open file
}
- QTextStream outStream(fileCompressedDevice);
- outStream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream outStream(fileCompressedDevice);
+ outStream.setEncoding(TQTextStream::UnicodeUTF8);
// output XML header
//
@@ -1224,7 +1224,7 @@ bool RosegardenGUIDoc::saveDocumentActual(const QString& filename,
progressDlg = new ProgressDialog(i18n("Saving file..."),
100,
- (QWidget*)parent());
+ (TQWidget*)parent());
progress = progressDlg->progressBar();
progressDlg->setMinimumDuration(500);
@@ -1281,7 +1281,7 @@ bool RosegardenGUIDoc::saveDocumentActual(const QString& filename,
m_composition.getTriggerSegments().begin();
ci != m_composition.getTriggerSegments().end(); ++ci) {
- QString triggerAtts = QString
+ TQString triggerAtts = QString
("triggerid=\"%1\" triggerbasepitch=\"%2\" triggerbasevelocity=\"%3\" triggerretune=\"%4\" triggeradjusttimes=\"%5\" ")
.arg((*ci)->getId())
.arg((*ci)->getBasePitch())
@@ -1315,7 +1315,7 @@ bool RosegardenGUIDoc::saveDocumentActual(const QString& filename,
// check that all went ok
//
if (fileCompressedDevice->status() != IO_Ok) {
- errMsg = i18n(QString("Error while writing on '%1'").arg(filename));
+ errMsg = i18n(TQString("Error while writing on '%1'").arg(filename));
delete fileCompressedDevice;
return false;
}
@@ -1340,7 +1340,7 @@ bool RosegardenGUIDoc::saveDocumentActual(const QString& filename,
return true;
}
-bool RosegardenGUIDoc::exportStudio(const QString& filename,
+bool RosegardenGUIDoc::exportStudio(const TQString& filename,
std::vector<DeviceId> devices)
{
Profiler profiler("RosegardenGUIDoc::exportStudio");
@@ -1350,8 +1350,8 @@ bool RosegardenGUIDoc::exportStudio(const QString& filename,
KFilterDev* fileCompressedDevice = static_cast<KFilterDev*>(KFilterDev::deviceForFile(filename, "application/x-gzip"));
fileCompressedDevice->setOrigFileName("audio/x-rosegarden-device");
fileCompressedDevice->open(IO_WriteOnly);
- QTextStream outStream(fileCompressedDevice);
- outStream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream outStream(fileCompressedDevice);
+ outStream.setEncoding(TQTextStream::UnicodeUTF8);
// output XML header
//
@@ -1373,13 +1373,13 @@ bool RosegardenGUIDoc::exportStudio(const QString& filename,
return true;
}
-void RosegardenGUIDoc::saveSegment(QTextStream& outStream, Segment *segment,
+void RosegardenGUIDoc::saveSegment(TQTextStream& outStream, Segment *segment,
KProgress* progress, long totalEvents, long &count,
- QString extraAttributes)
+ TQString extraAttributes)
{
- QString time;
+ TQString time;
- outStream << QString("<segment track=\"%1\" start=\"%2\" ")
+ outStream << TQString("<segment track=\"%1\" start=\"%2\" ")
.arg(segment->getTrack())
.arg(segment->getStartTime());
@@ -1566,7 +1566,7 @@ bool RosegardenGUIDoc::isSequencerRunning()
}
bool
-RosegardenGUIDoc::xmlParse(QString fileContents, QString &errMsg,
+RosegardenGUIDoc::xmlParse(TQString fileContents, TQString &errMsg,
ProgressDialog *progress,
unsigned int elementCount,
bool permanent,
@@ -1577,19 +1577,19 @@ RosegardenGUIDoc::xmlParse(QString fileContents, QString &errMsg,
RoseXmlHandler handler(this, elementCount, permanent);
if (progress) {
- connect(&handler, SIGNAL(setProgress(int)),
- progress->progressBar(), SLOT(setValue(int)));
- connect(&handler, SIGNAL(setOperationName(QString)),
- progress, SLOT(slotSetOperationName(QString)));
- connect(&handler, SIGNAL(incrementProgress(int)),
- progress->progressBar(), SLOT(advance(int)));
- connect(progress, SIGNAL(cancelClicked()),
- &handler, SLOT(slotCancel()));
+ connect(&handler, TQT_SIGNAL(setProgress(int)),
+ progress->progressBar(), TQT_SLOT(setValue(int)));
+ connect(&handler, TQT_SIGNAL(setOperationName(TQString)),
+ progress, TQT_SLOT(slotSetOperationName(TQString)));
+ connect(&handler, TQT_SIGNAL(incrementProgress(int)),
+ progress->progressBar(), TQT_SLOT(advance(int)));
+ connect(progress, TQT_SIGNAL(cancelClicked()),
+ &handler, TQT_SLOT(slotCancel()));
}
- QXmlInputSource source;
+ TQXmlInputSource source;
source.setData(fileContents);
- QXmlSimpleReader reader;
+ TQXmlSimpleReader reader;
reader.setContentHandler(&handler);
reader.setErrorHandler(&handler);
@@ -1687,14 +1687,14 @@ RosegardenGUIDoc::xmlParse(QString fileContents, QString &errMsg,
// another file (which is the normal case in which we
// have no plugin manager).
- QString msg(i18n("<h3>Plugins not found</h3><p>The following audio plugins could not be loaded:</p><ul>"));
+ TQString msg(i18n("<h3>Plugins not found</h3><p>The following audio plugins could not be loaded:</p><ul>"));
- for (std::set<QString>::iterator i = handler.pluginsNotFound().begin();
+ for (std::set<TQString>::iterator i = handler.pluginsNotFound().begin();
i != handler.pluginsNotFound().end(); ++i) {
- QString ident = *i;
- QString type, soName, label;
+ TQString ident = *i;
+ TQString type, soName, label;
PluginIdentifier::parseIdentifier(ident, type, soName, label);
- QString pluginFileName = QFileInfo(soName).fileName();
+ TQString pluginFileName = TQFileInfo(soName).fileName();
msg += i18n("<li>%1 (from %2)</li>").arg(label).arg(pluginFileName);
}
msg += "</ul>";
@@ -1709,7 +1709,7 @@ RosegardenGUIDoc::xmlParse(QString fileContents, QString &errMsg,
if (handler.isDeprecated() && !shownWarning) {
- QString msg(i18n("This file contains one or more old element types that are now deprecated.\nSupport for these elements may disappear in future versions of Rosegarden.\nWe recommend you re-save this file from this version of Rosegarden to ensure that it can still be re-loaded in future versions."));
+ TQString msg(i18n("This file contains one or more old element types that are now deprecated.\nSupport for these elements may disappear in future versions of Rosegarden.\nWe recommend you re-save this file from this version of Rosegarden to ensure that it can still be re-loaded in future versions."));
slotDocumentModified(); // so file can be re-saved immediately
KStartupLogo::hideIfStillThere();
@@ -2234,8 +2234,8 @@ RosegardenGUIDoc::prepareAudio()
if (!isSequencerRunning())
return ;
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
// Clear down the sequencer AudioFilePlayer object
//
@@ -2244,16 +2244,16 @@ RosegardenGUIDoc::prepareAudio()
for (AudioFileManagerIterator it = m_audioFileManager.begin();
it != m_audioFileManager.end(); it++) {
- QByteArray data;
- QDataStream streamOut(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream streamOut(data, IO_WriteOnly);
// We have to pass the filename as a QString
//
- streamOut << QString(strtoqstr((*it)->getFilename()));
+ streamOut << TQString(strtoqstr((*it)->getFilename()));
streamOut << (int)(*it)->getId();
- rgapp->sequencerCall("addAudioFile(QString, int)", replyType, replyData, data);
- QDataStream streamIn(replyData, IO_ReadOnly);
+ rgapp->sequencerCall("addAudioFile(TQString, int)", replyType, replyData, data);
+ TQDataStream streamIn(replyData, IO_ReadOnly);
int result;
streamIn >> result;
if (!result) {
@@ -2330,14 +2330,14 @@ RosegardenGUIDoc::syncDevices()
static bool setTimer = false;
if (!setTimer) {
kapp->config()->setGroup(SequencerOptionsConfigGroup);
- QString currentTimer = getCurrentTimer();
+ TQString currentTimer = getCurrentTimer();
currentTimer = kapp->config()->readEntry("timer", currentTimer);
setCurrentTimer(currentTimer);
setTimer = true;
}
- QByteArray replyData;
- QCString replyType;
+ TQByteArray replyData;
+ TQCString replyType;
// Get number of devices the sequencer has found
//
@@ -2346,7 +2346,7 @@ RosegardenGUIDoc::syncDevices()
unsigned int devices = 0;
if (replyType == "unsigned int") {
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
reply >> devices;
} else {
RG_DEBUG << "RosegardenGUIDoc::syncDevices - "
@@ -2389,10 +2389,10 @@ RosegardenGUIDoc::syncDevices()
void
RosegardenGUIDoc::getMappedDevice(DeviceId id)
{
- QByteArray data;
- QByteArray replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQByteArray replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
arg << (unsigned int)id;
@@ -2400,7 +2400,7 @@ RosegardenGUIDoc::getMappedDevice(DeviceId id)
replyType, replyData, data);
MappedDevice *mD = new MappedDevice();
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
if (replyType == "MappedDevice")
// unfurl
@@ -2786,16 +2786,16 @@ RosegardenGUIDoc::finalizeAudioFile(InstrumentId iid)
// Create a progress dialog
//
ProgressDialog *progressDlg = new ProgressDialog
- (i18n("Generating audio preview..."), 100, (QWidget*)parent());
+ (i18n("Generating audio preview..."), 100, (TQWidget*)parent());
progressDlg->setAutoClose(false);
progressDlg->setAutoReset(false);
progressDlg->show();
- connect(progressDlg, SIGNAL(cancelClicked()),
- &m_audioFileManager, SLOT(slotStopPreview()));
+ connect(progressDlg, TQT_SIGNAL(cancelClicked()),
+ &m_audioFileManager, TQT_SLOT(slotStopPreview()));
- connect(&m_audioFileManager, SIGNAL(setProgress(int)),
- progressDlg->progressBar(), SLOT(setValue(int)));
+ connect(&m_audioFileManager, TQT_SIGNAL(setProgress(int)),
+ progressDlg->progressBar(), TQT_SLOT(setValue(int)));
try {
m_audioFileManager.generatePreview(newAudioFile->getId());
@@ -2828,11 +2828,11 @@ RosegardenGUIDoc::finalizeAudioFile(InstrumentId iid)
// don't get a return type. Ugly and hacky but it appears to
// work for me - so hey.
//
- QByteArray data;
- QDataStream streamOut(data, IO_WriteOnly);
- streamOut << QString(strtoqstr(newAudioFile->getFilename()));
+ TQByteArray data;
+ TQDataStream streamOut(data, IO_WriteOnly);
+ streamOut << TQString(strtoqstr(newAudioFile->getFilename()));
streamOut << (int)newAudioFile->getId();
- rgapp->sequencerSend("addAudioFile(QString, int)", data);
+ rgapp->sequencerSend("addAudioFile(TQString, int)", data);
// clear down
m_recordAudioSegments.erase(iid);
@@ -2842,8 +2842,8 @@ RosegardenGUIDoc::finalizeAudioFile(InstrumentId iid)
RealTime
RosegardenGUIDoc::getAudioPlayLatency()
{
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
if (!rgapp->sequencerCall("getAudioPlayLatency()", replyType, replyData)) {
RG_DEBUG << "RosegardenGUIDoc::getAudioPlayLatency - "
@@ -2853,7 +2853,7 @@ RosegardenGUIDoc::getAudioPlayLatency()
}
// ensure the return type is ok
- QDataStream streamIn(replyData, IO_ReadOnly);
+ TQDataStream streamIn(replyData, IO_ReadOnly);
MappedRealTime result;
streamIn >> result;
@@ -2863,8 +2863,8 @@ RosegardenGUIDoc::getAudioPlayLatency()
RealTime
RosegardenGUIDoc::getAudioRecordLatency()
{
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
if (!rgapp->sequencerCall("getAudioRecordLatency()", replyType, replyData)) {
RG_DEBUG << "RosegardenGUIDoc::getAudioRecordLatency - "
@@ -2874,7 +2874,7 @@ RosegardenGUIDoc::getAudioRecordLatency()
}
// ensure the return type is ok
- QDataStream streamIn(replyData, IO_ReadOnly);
+ TQDataStream streamIn(replyData, IO_ReadOnly);
MappedRealTime result;
streamIn >> result;
@@ -2890,10 +2890,10 @@ RosegardenGUIDoc::updateAudioRecordLatency()
QStringList
RosegardenGUIDoc::getTimers()
{
- QStringList list;
+ TQStringList list;
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
if (!rgapp->sequencerCall("getTimers()", replyType, replyData)) {
RG_DEBUG << "RosegardenGUIDoc::getTimers - "
@@ -2907,14 +2907,14 @@ RosegardenGUIDoc::getTimers()
return list;
}
- QDataStream streamIn(replyData, IO_ReadOnly);
+ TQDataStream streamIn(replyData, IO_ReadOnly);
unsigned int count = 0;
streamIn >> count;
for (unsigned int i = 0; i < count; ++i) {
- QByteArray data;
- QDataStream streamOut(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream streamOut(data, IO_WriteOnly);
streamOut << i;
@@ -2925,14 +2925,14 @@ RosegardenGUIDoc::getTimers()
return list;
}
- if (replyType != "QString") {
+ if (replyType != "TQString") {
RG_DEBUG << "RosegardenGUIDoc::getTimers - "
<< "wrong reply type (" << replyType << ") from sequencer" << endl;
return list;
}
- QDataStream streamIn(replyData, IO_ReadOnly);
- QString name;
+ TQDataStream streamIn(replyData, IO_ReadOnly);
+ TQString name;
streamIn >> name;
list.push_back(name);
@@ -2944,8 +2944,8 @@ RosegardenGUIDoc::getTimers()
QString
RosegardenGUIDoc::getCurrentTimer()
{
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
if (!rgapp->sequencerCall("getCurrentTimer()", replyType, replyData)) {
RG_DEBUG << "RosegardenGUIDoc::getCurrentTimer - "
@@ -2953,30 +2953,30 @@ RosegardenGUIDoc::getCurrentTimer()
return "";
}
- if (replyType != "QString") {
+ if (replyType != "TQString") {
RG_DEBUG << "RosegardenGUIDoc::getCurrentTimer - "
<< "wrong reply type (" << replyType << ") from sequencer" << endl;
return "";
}
- QDataStream streamIn(replyData, IO_ReadOnly);
- QString name;
+ TQDataStream streamIn(replyData, IO_ReadOnly);
+ TQString name;
streamIn >> name;
return name;
}
void
-RosegardenGUIDoc::setCurrentTimer(QString name)
+RosegardenGUIDoc::setCurrentTimer(TQString name)
{
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
- QByteArray data;
- QDataStream streamOut(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream streamOut(data, IO_WriteOnly);
streamOut << name;
- if (!rgapp->sequencerCall("setCurrentTimer(QString)",
+ if (!rgapp->sequencerCall("setCurrentTimer(TQString)",
replyType, replyData, data)) {
RG_DEBUG << "RosegardenGUIDoc::setCurrentTimer - "
<< "failed to contact Rosegarden sequencer" << endl;
@@ -3082,14 +3082,14 @@ void RosegardenGUIDoc::slotDocColoursChanged()
}
void
-RosegardenGUIDoc::addOrphanedRecordedAudioFile(QString fileName)
+RosegardenGUIDoc::addOrphanedRecordedAudioFile(TQString fileName)
{
m_orphanedRecordedAudioFiles.push_back(fileName);
slotDocumentModified();
}
void
-RosegardenGUIDoc::addOrphanedDerivedAudioFile(QString fileName)
+RosegardenGUIDoc::addOrphanedDerivedAudioFile(TQString fileName)
{
m_orphanedDerivedAudioFiles.push_back(fileName);
slotDocumentModified();
diff --git a/src/document/RosegardenGUIDoc.h b/src/document/RosegardenGUIDoc.h
index 1cdc88e..46eb805 100644
--- a/src/document/RosegardenGUIDoc.h
+++ b/src/document/RosegardenGUIDoc.h
@@ -37,16 +37,16 @@
#include "gui/editors/segment/segmentcanvas/AudioPreviewThread.h"
#include <map>
#include "sound/AudioFileManager.h"
-// #include <qlist.h> (fixes problem for Adam Dingle)
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
+// #include <tqlist.h> (fixes problem for Adam Dingle)
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <vector>
#include "base/Event.h"
-class QWidget;
-class QTextStream;
+class TQWidget;
+class TQTextStream;
class NoteOnRecSet;
class KProgress;
@@ -95,7 +95,7 @@ public:
/**
* Constructor for the fileclass of the application
*/
- RosegardenGUIDoc(QWidget *parent,
+ RosegardenGUIDoc(TQWidget *parent,
AudioPluginManager *audioPluginManager = 0,
bool skipAutoload = false,
const char *name=0);
@@ -184,7 +184,7 @@ public:
* with the sequencer will be carried out. If permanent is false,
* the sequencer's device list will be left alone.
*/
- bool openDocument(const QString &filename, bool permanent = true,
+ bool openDocument(const TQString &filename, bool permanent = true,
const char *format=0);
/**
@@ -197,36 +197,36 @@ public:
*
* errMsg will be set to a user-readable error message if save fails
*/
- bool saveDocument(const QString &filename, QString& errMsg,
+ bool saveDocument(const TQString &filename, TQString& errMsg,
bool autosave = false);
/**
* exports all or part of the studio to a file. If devices is
* empty, exports all devices.
*/
- bool exportStudio(const QString &filename,
+ bool exportStudio(const TQString &filename,
std::vector<DeviceId> devices =
std::vector<DeviceId>());
/**
* sets the path to the file connected with the document
*/
- void setAbsFilePath(const QString &filename);
+ void setAbsFilePath(const TQString &filename);
/**
* returns the pathname of the current document file
*/
- const QString &getAbsFilePath() const;
+ const TQString &getAbsFilePath() const;
/**
* sets the filename of the document
*/
- void setTitle(const QString &_t);
+ void setTitle(const TQString &_t);
/**
* returns the title of the document
*/
- const QString &getTitle() const;
+ const TQString &getTitle() const;
/**
* Returns true if the file is a regular Rosegarden ".rg" file,
@@ -386,8 +386,8 @@ public:
// doesn't want to keep it. We can offer to delete these files
// permanently when the document is saved.
//
- void addOrphanedRecordedAudioFile(QString fileName);
- void addOrphanedDerivedAudioFile(QString fileName);
+ void addOrphanedRecordedAudioFile(TQString fileName);
+ void addOrphanedDerivedAudioFile(TQString fileName);
// Consider whether to orphan the given audio file which is about
// to be removed from the audio file manager.
@@ -431,9 +431,9 @@ public:
//Obsolete: multitrack MIDI recording. plcl 06/2006.
//Segment *getRecordMIDISegment() { return m_recordMIDISegment; }
- QStringList getTimers();
- QString getCurrentTimer();
- void setCurrentTimer(QString);
+ TQStringList getTimers();
+ TQString getCurrentTimer();
+ void setCurrentTimer(TQString);
/**
* return the list of the views currently connected to the document
@@ -536,7 +536,7 @@ protected:
* @return false if parsing failed
* @see RoseXmlHandler
*/
- bool xmlParse(QString fileContents, QString &errMsg,
+ bool xmlParse(TQString fileContents, TQString &errMsg,
ProgressDialog *progress,
unsigned int elementCount,
bool permanent,
@@ -557,7 +557,7 @@ protected:
/**
* Returns the name of the autosave file
*/
- QString getAutoSaveFileName();
+ TQString getAutoSaveFileName();
/**
* Save document to the given file. This function does the actual
@@ -566,15 +566,15 @@ protected:
* required file, so as not to lose the original if a failure
* occurs during overwriting.
*/
- bool saveDocumentActual(const QString &filename, QString& errMsg,
+ bool saveDocumentActual(const TQString &filename, TQString& errMsg,
bool autosave = false);
/**
* Save one segment to the given text stream
*/
- void saveSegment(QTextStream&, Segment*, KProgress*,
+ void saveSegment(TQTextStream&, Segment*, KProgress*,
long totalNbOfEvents, long &count,
- QString extraAttributes = QString::null);
+ TQString extraAttributes = TQString::null);
bool deleteOrphanedAudioFiles(bool documentWillNotBeSaved);
@@ -636,12 +636,12 @@ protected:
/**
* the title of the current document
*/
- QString m_title;
+ TQString m_title;
/**
* absolute file path of the current document
*/
- QString m_absFilePath;
+ TQString m_absFilePath;
/**
* the composition this document is wrapping
@@ -716,8 +716,8 @@ protected:
timeT m_quickMarkerTime;
- std::vector<QString> m_orphanedRecordedAudioFiles;
- std::vector<QString> m_orphanedDerivedAudioFiles;
+ std::vector<TQString> m_orphanedRecordedAudioFiles;
+ std::vector<TQString> m_orphanedDerivedAudioFiles;
// Autosave period for this document in seconds
//
diff --git a/src/document/XmlStorableEvent.cpp b/src/document/XmlStorableEvent.cpp
index 7688b2a..7d4a2dd 100644
--- a/src/document/XmlStorableEvent.cpp
+++ b/src/document/XmlStorableEvent.cpp
@@ -30,20 +30,20 @@
#include "base/Event.h"
#include "base/NotationTypes.h"
#include "gui/editors/notation/NotationStrings.h"
-#include <qstring.h>
+#include <tqstring.h>
namespace Rosegarden
{
-XmlStorableEvent::XmlStorableEvent(const QXmlAttributes &attributes,
+XmlStorableEvent::XmlStorableEvent(const TQXmlAttributes &attributes,
timeT &absoluteTime)
{
setDuration(0);
for (int i = 0; i < attributes.length(); ++i) {
- QString attrName(attributes.qName(i)),
+ TQString attrName(attributes.qName(i)),
attrVal(attributes.value(i));
if (attrName == "package") {
@@ -108,10 +108,10 @@ XmlStorableEvent::XmlStorableEvent(const QXmlAttributes &attributes,
// set generic property
//
- QString val(attrVal);
+ TQString val(attrVal);
// Check if boolean val
- QString valLowerCase(val.lower());
+ TQString valLowerCase(val.lower());
bool isNumeric;
int numVal;
@@ -144,18 +144,18 @@ XmlStorableEvent::XmlStorableEvent(Event &e) :
{}
void
-XmlStorableEvent::setPropertyFromAttributes(const QXmlAttributes &attributes,
+XmlStorableEvent::setPropertyFromAttributes(const TQXmlAttributes &attributes,
bool persistent)
{
bool have = false;
- QString name = attributes.value("name");
+ TQString name = attributes.value("name");
if (name == "") {
RG_DEBUG << "XmlStorableEvent::setProperty: no property name found, ignoring" << endl;
return ;
}
for (int i = 0; i < attributes.length(); ++i) {
- QString attrName(attributes.qName(i)),
+ TQString attrName(attributes.qName(i)),
attrVal(attributes.value(i));
if (attrName == "name") {
diff --git a/src/document/XmlStorableEvent.h b/src/document/XmlStorableEvent.h
index 197c9cb..f9ab57f 100644
--- a/src/document/XmlStorableEvent.h
+++ b/src/document/XmlStorableEvent.h
@@ -27,10 +27,10 @@
#define _RG_XMLSTORABLEEVENT_H_
#include "base/Event.h"
-#include <qxml.h>
+#include <tqxml.h>
-class QXmlAttributes;
+class TQXmlAttributes;
namespace Rosegarden
@@ -54,7 +54,7 @@ public:
* attributes include absoluteTime or timeOffset, update the given
* absoluteTime reference accordingly.
*/
- XmlStorableEvent(const QXmlAttributes& atts,
+ XmlStorableEvent(const TQXmlAttributes& atts,
timeT &absoluteTime);
/**
@@ -65,7 +65,7 @@ public:
/**
* Set a property from the XML attributes \a atts
*/
- void setPropertyFromAttributes(const QXmlAttributes& atts,
+ void setPropertyFromAttributes(const TQXmlAttributes& atts,
bool persistent);
};
diff --git a/src/document/XmlSubHandler.h b/src/document/XmlSubHandler.h
index 30ba784..e219cb8 100644
--- a/src/document/XmlSubHandler.h
+++ b/src/document/XmlSubHandler.h
@@ -25,8 +25,8 @@
#ifndef _RG_XMLSUBHANDLER_H_
#define _RG_XMLSUBHANDLER_H_
-#include <qstring.h>
-#include <qxml.h>
+#include <tqstring.h>
+#include <tqxml.h>
namespace Rosegarden {
@@ -36,21 +36,21 @@ public:
XmlSubHandler();
virtual ~XmlSubHandler();
- virtual bool startElement(const QString& namespaceURI,
- const QString& localName,
- const QString& qName,
- const QXmlAttributes& atts) = 0;
+ virtual bool startElement(const TQString& namespaceURI,
+ const TQString& localName,
+ const TQString& qName,
+ const TQXmlAttributes& atts) = 0;
/**
* @param finished : if set to true on return, means that
* the handler should be deleted
*/
- virtual bool endElement(const QString& namespaceURI,
- const QString& localName,
- const QString& qName,
+ virtual bool endElement(const TQString& namespaceURI,
+ const TQString& localName,
+ const TQString& qName,
bool& finished) = 0;
- virtual bool characters(const QString& ch) = 0;
+ virtual bool characters(const TQString& ch) = 0;
};
}
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;
};