diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-06 20:59:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-06 20:59:29 +0000 |
commit | 11f31c37e5fa4889d9989f10272f44845449cb7b (patch) | |
tree | 4383da04a76c497950d957fc6120b0fd0d9082c2 /src/sound | |
parent | 832eb69d571e8e518db45d0c0e6fbc0f00690209 (diff) | |
download | rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.tar.gz rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.zip |
Initial TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1172292 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/sound')
44 files changed, 519 insertions, 519 deletions
diff --git a/src/sound/AlsaDriver.cpp b/src/sound/AlsaDriver.cpp index 9d512d9..16a152b 100644 --- a/src/sound/AlsaDriver.cpp +++ b/src/sound/AlsaDriver.cpp @@ -46,7 +46,7 @@ #include "AudioPlayQueue.h" #include "ExternalTransport.h" -#include <qregexp.h> +#include <tqregexp.h> #include <pthread.h> @@ -969,13 +969,13 @@ AlsaDriver::createMidiDevice(AlsaPortDescription *port, if (reqDirection == MidiDevice::Play) { - QString portName; + TQString portName; - if (QString(deviceName).startsWith("Anonymous MIDI device ")) { - portName = QString("out %1") + if (TQString(deviceName).startsWith("Anonymous MIDI device ")) { + portName = TQString("out %1") .arg(m_outputPorts.size() + 1); } else { - portName = QString("out %1 - %2") + portName = TQString("out %1 - %2") .arg(m_outputPorts.size() + 1) .arg(deviceName); } @@ -1140,7 +1140,7 @@ AlsaDriver::removeDevice(DeviceId id) } void -AlsaDriver::renameDevice(DeviceId id, QString name) +AlsaDriver::renameDevice(DeviceId id, TQString name) { DeviceIntMap::iterator i = m_outputPorts.find(id); if (i == m_outputPorts.end()) { @@ -1153,10 +1153,10 @@ AlsaDriver::renameDevice(DeviceId id, QString name) snd_seq_port_info_alloca(&pinfo); snd_seq_get_port_info(m_midiHandle, i->second, pinfo); - QString oldName = snd_seq_port_info_get_name(pinfo); + TQString oldName = snd_seq_port_info_get_name(pinfo); int sep = oldName.find(" - "); - QString newName; + TQString newName; if (name.startsWith("Anonymous MIDI device ")) { if (sep < 0) @@ -1249,7 +1249,7 @@ AlsaDriver::getConnection(Device::DeviceType type, } void -AlsaDriver::setConnectionToDevice(MappedDevice &device, QString connection) +AlsaDriver::setConnectionToDevice(MappedDevice &device, TQString connection) { ClientPortPair pair( -1, -1); if (connection && connection != "") { @@ -1259,10 +1259,10 @@ AlsaDriver::setConnectionToDevice(MappedDevice &device, QString connection) } void -AlsaDriver::setConnectionToDevice(MappedDevice &device, QString connection, +AlsaDriver::setConnectionToDevice(MappedDevice &device, TQString connection, const ClientPortPair &pair) { - QString prevConnection = device.getConnection().c_str(); + TQString prevConnection = device.getConnection().c_str(); device.setConnection(connection.data()); if (device.getDirection() == MidiDevice::Play) { @@ -1320,7 +1320,7 @@ AlsaDriver::setConnectionToDevice(MappedDevice &device, QString connection, } void -AlsaDriver::setConnection(DeviceId id, QString connection) +AlsaDriver::setConnection(DeviceId id, TQString connection) { Audit audit; ClientPortPair port(getPortByName(connection.data())); @@ -1346,7 +1346,7 @@ AlsaDriver::setConnection(DeviceId id, QString connection) } void -AlsaDriver::setPlausibleConnection(DeviceId id, QString idealConnection) +AlsaDriver::setPlausibleConnection(DeviceId id, TQString idealConnection) { Audit audit; ClientPortPair port(getPortByName(idealConnection.data())); @@ -1389,16 +1389,16 @@ AlsaDriver::setPlausibleConnection(DeviceId id, QString idealConnection) int portNo = -1; if (client > 0) { - QString remainder = idealConnection.mid(colon + 1); + TQString remainder = idealConnection.mid(colon + 1); int space = remainder.find(" "); if (space >= 0) portNo = remainder.left(space).toInt(); } int firstSpace = idealConnection.find(" "); - int endOfText = idealConnection.find(QRegExp("[^\\w ]"), firstSpace); + int endOfText = idealConnection.find(TQRegExp("[^\\w ]"), firstSpace); - QString text; + TQString text; if (endOfText < 2) { text = idealConnection.mid(firstSpace + 1); } else { @@ -1448,7 +1448,7 @@ AlsaDriver::setPlausibleConnection(DeviceId id, QString idealConnection) } if (testName && text != "" && - !QString(port->m_name.c_str()).contains(text)) + !TQString(port->m_name.c_str()).contains(text)) continue; if (testUsed) { @@ -1603,7 +1603,7 @@ AlsaDriver::getCurrentTimer() } void -AlsaDriver::setCurrentTimer(QString timer) +AlsaDriver::setCurrentTimer(TQString timer) { Audit audit; @@ -4479,7 +4479,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC, bool AlsaDriver::record(RecordStatus recordStatus, const std::vector<InstrumentId> *armedInstruments, - const std::vector<QString> *audioFileNames) + const std::vector<TQString> *audioFileNames) { m_recordingInstruments.clear(); @@ -4501,7 +4501,7 @@ AlsaDriver::record(RecordStatus recordStatus, continue; } - QString fileName = (*audioFileNames)[audioCount]; + TQString fileName = (*audioFileNames)[audioCount]; if (id >= AudioInstrumentBase && id < MidiInstrumentBase) { @@ -4781,7 +4781,7 @@ AlsaDriver::checkForNewClients() audit << (*i)->m_name << std::endl; - QString portName = (*i)->m_name.c_str(); + TQString portName = (*i)->m_name.c_str(); ClientPortPair portPair = ClientPortPair((*i)->m_client, (*i)->m_port); @@ -5257,7 +5257,7 @@ AlsaDriver::scavengePlugins() QString AlsaDriver::getStatusLog() { - return QString::fromUtf8(Audit::getAudit().c_str()); + return TQString::fromUtf8(Audit::getAudit().c_str()); } diff --git a/src/sound/AlsaDriver.h b/src/sound/AlsaDriver.h index e80e30f..973fc72 100644 --- a/src/sound/AlsaDriver.h +++ b/src/sound/AlsaDriver.h @@ -70,7 +70,7 @@ public: virtual bool record(RecordStatus recordStatus, const std::vector<InstrumentId> *armedInstruments = 0, - const std::vector<QString> *audioFileNames = 0); + const std::vector<TQString> *audioFileNames = 0); virtual void startClocks(); virtual void startClocksApproved(); // called by JACK driver in sync mode @@ -149,7 +149,7 @@ public: // Plugin instance management // virtual void setPluginInstance(InstrumentId id, - QString identifier, + TQString identifier, int position) { #ifdef HAVE_LIBJACK if (m_jackDriver) m_jackDriver->setPluginInstance(id, identifier, position); @@ -196,35 +196,35 @@ public: #endif } - virtual QStringList getPluginInstancePrograms(InstrumentId id, + virtual TQStringList getPluginInstancePrograms(InstrumentId id, int position) { #ifdef HAVE_LIBJACK if (m_jackDriver) return m_jackDriver->getPluginInstancePrograms(id, position); #endif - return QStringList(); + return TQStringList(); } - virtual QString getPluginInstanceProgram(InstrumentId id, + virtual TQString getPluginInstanceProgram(InstrumentId id, int position) { #ifdef HAVE_LIBJACK if (m_jackDriver) return m_jackDriver->getPluginInstanceProgram(id, position); #endif - return QString(); + return TQString(); } - virtual QString getPluginInstanceProgram(InstrumentId id, + virtual TQString getPluginInstanceProgram(InstrumentId id, int position, int bank, int program) { #ifdef HAVE_LIBJACK if (m_jackDriver) return m_jackDriver->getPluginInstanceProgram(id, position, bank, program); #endif - return QString(); + return TQString(); } virtual unsigned long getPluginInstanceProgram(InstrumentId id, int position, - QString name) { + TQString name) { #ifdef HAVE_LIBJACK if (m_jackDriver) return m_jackDriver->getPluginInstanceProgram(id, position, name); #endif @@ -233,20 +233,20 @@ public: virtual void setPluginInstanceProgram(InstrumentId id, int position, - QString program) { + TQString program) { #ifdef HAVE_LIBJACK if (m_jackDriver) m_jackDriver->setPluginInstanceProgram(id, position, program); #endif } - virtual QString configurePlugin(InstrumentId id, + virtual TQString configurePlugin(InstrumentId id, int position, - QString key, - QString value) { + TQString key, + TQString value) { #ifdef HAVE_LIBJACK if (m_jackDriver) return m_jackDriver->configurePlugin(id, position, key, value); #endif - return QString(); + return TQString(); } virtual void setAudioBussLevels(int bussId, @@ -333,22 +333,22 @@ public: virtual DeviceId addDevice(Device::DeviceType type, MidiDevice::DeviceDirection direction); virtual void removeDevice(DeviceId id); - virtual void renameDevice(DeviceId id, QString name); + virtual void renameDevice(DeviceId id, TQString name); // Get available connections per device // virtual unsigned int getConnections(Device::DeviceType type, MidiDevice::DeviceDirection direction); - virtual QString getConnection(Device::DeviceType type, + virtual TQString getConnection(Device::DeviceType type, MidiDevice::DeviceDirection direction, unsigned int connectionNo); - virtual void setConnection(DeviceId deviceId, QString connection); - virtual void setPlausibleConnection(DeviceId deviceId, QString connection); + virtual void setConnection(DeviceId deviceId, TQString connection); + virtual void setPlausibleConnection(DeviceId deviceId, TQString connection); virtual unsigned int getTimers(); - virtual QString getTimer(unsigned int); - virtual QString getCurrentTimer(); - virtual void setCurrentTimer(QString); + virtual TQString getTimer(unsigned int); + virtual TQString getCurrentTimer(); + virtual void setCurrentTimer(TQString); virtual void getAudioInstrumentNumbers(InstrumentId &audioInstrumentBase, int &audioInstrumentCount) { @@ -370,7 +370,7 @@ public: #endif } - virtual QString getStatusLog(); + virtual TQString getStatusLog(); // To be called regularly from JACK driver when idle void checkTimerSync(size_t frames); @@ -415,8 +415,8 @@ protected: virtual void processAudioQueue(bool /* now */) { } - virtual void setConnectionToDevice(MappedDevice &device, QString connection); - virtual void setConnectionToDevice(MappedDevice &device, QString connection, + virtual void setConnectionToDevice(MappedDevice &device, TQString connection); + virtual void setConnectionToDevice(MappedDevice &device, TQString connection, const ClientPortPair &pair); private: diff --git a/src/sound/AudioFile.cpp b/src/sound/AudioFile.cpp index 6eba15a..9af3ce6 100644 --- a/src/sound/AudioFile.cpp +++ b/src/sound/AudioFile.cpp @@ -37,7 +37,7 @@ AudioFile::AudioFile(unsigned int id, m_channels(0), m_dataChunkIndex( -1) { - m_fileInfo = new QFileInfo(QString(fileName.c_str())); + m_fileInfo = new TQFileInfo(TQString(fileName.c_str())); } AudioFile::AudioFile(const std::string &fileName, @@ -53,7 +53,7 @@ AudioFile::AudioFile(const std::string &fileName, m_channels(channels), m_dataChunkIndex( -1) { - m_fileInfo = new QFileInfo(QString(fileName.c_str())); + m_fileInfo = new TQFileInfo(TQString(fileName.c_str())); } AudioFile::~AudioFile() @@ -67,7 +67,7 @@ AudioFile::getModificationDateTime() if (m_fileInfo) return m_fileInfo->lastModified(); else - return QDateTime(); + return TQDateTime(); } diff --git a/src/sound/AudioFile.h b/src/sound/AudioFile.h index 1acbe61..6870e76 100644 --- a/src/sound/AudioFile.h +++ b/src/sound/AudioFile.h @@ -27,7 +27,7 @@ #include <vector> #include <cmath> -#include <qfileinfo.h> +#include <tqfileinfo.h> #include "SoundFile.h" #include "RealTime.h" @@ -171,7 +171,7 @@ public: // Return the modification timestamp // - QDateTime getModificationDateTime(); + TQDateTime getModificationDateTime(); // Implement in actual file type // @@ -206,7 +206,7 @@ protected: // long long m_dataChunkIndex; - QFileInfo *m_fileInfo; + TQFileInfo *m_fileInfo; }; diff --git a/src/sound/AudioFileManager.cpp b/src/sound/AudioFileManager.cpp index 93be26c..46525c4 100644 --- a/src/sound/AudioFileManager.cpp +++ b/src/sound/AudioFileManager.cpp @@ -41,10 +41,10 @@ #include <kio/netaccess.h> #include <kmessagebox.h> -#include <qpixmap.h> -#include <qpainter.h> -#include <qdatetime.h> -#include <qfile.h> +#include <tqpixmap.h> +#include <tqpainter.h> +#include <tqdatetime.h> +#include <tqfile.h> #include "AudioFile.h" #include "AudioFileManager.h" @@ -101,8 +101,8 @@ AudioFileManager::AudioFileManager() : // Retransmit progress // - connect(&m_peakManager, SIGNAL(setProgress(int)), - this, SIGNAL(setProgress(int))); + connect(&m_peakManager, TQT_SIGNAL(setProgress(int)), + this, TQT_SIGNAL(setProgress(int))); } AudioFileManager::~AudioFileManager() @@ -118,10 +118,10 @@ AudioFileManager::addFile(const std::string &filePath) MutexLock lock (&_audioFileManagerLock) ; - QString ext; + TQString ext; if (filePath.length() > 3) { - ext = QString(filePath.substr(filePath.length() - 3, 3).c_str()).lower(); + ext = TQString(filePath.substr(filePath.length() - 3, 3).c_str()).lower(); } // Check for file existing already in manager by path @@ -252,7 +252,7 @@ AudioFileManager::insertFile(const std::string &name, // If we've expanded and we can't find the file // then try to find it in audio file directory. // - QFileInfo info(foundFileName.c_str()); + TQFileInfo info(foundFileName.c_str()); if (!info.exists()) foundFileName = getFileInPath(foundFileName); @@ -353,7 +353,7 @@ AudioFileManager::insertFile(const std::string &name, // If we've expanded and we can't find the file // then try to find it in audio file directory. // - QFileInfo info(foundFileName.c_str()); + TQFileInfo info(foundFileName.c_str()); if (!info.exists()) foundFileName = getFileInPath(foundFileName); @@ -422,7 +422,7 @@ AudioFileManager::setAudioPath(const std::string &path) void AudioFileManager::testAudioPath() throw (BadAudioPathException) { - QFileInfo info(m_audioPath.c_str()); + TQFileInfo info(m_audioPath.c_str()); if (!(info.exists() && info.isDir() && !info.isRelative() && info.isWritable() && info.isReadable())) throw BadAudioPathException(m_audioPath.data()); @@ -439,7 +439,7 @@ AudioFileManager::getFileInPath(const std::string &file) MutexLock lock (&_audioFileManagerLock) ; - QFileInfo info(file.c_str()); + TQFileInfo info(file.c_str()); if (info.exists()) return file; @@ -447,8 +447,8 @@ AudioFileManager::getFileInPath(const std::string &file) // Build the search filename from the audio path and // the file basename. // - QString searchFile = QString(m_audioPath.c_str()) + info.fileName(); - QFileInfo searchInfo(searchFile); + TQString searchFile = TQString(m_audioPath.c_str()) + info.fileName(); + TQFileInfo searchInfo(searchFile); if (searchInfo.exists()) return searchFile.latin1(); @@ -532,15 +532,15 @@ AudioFileManager::createRecordingAudioFile() ; AudioFileId newId = getFirstUnusedID(); - QString fileName = ""; + TQString fileName = ""; while (fileName == "") { - fileName = QString("rg-%1-%2.wav") - .arg(QDateTime::currentDateTime().toString("yyyyMMdd-hhmmss")) + fileName = TQString("rg-%1-%2.wav") + .arg(TQDateTime::currentDateTime().toString("yyyyMMdd-hhmmss")) .arg(newId + 1); - if (QFile(m_audioPath.c_str() + fileName).exists()) { + if (TQFile(m_audioPath.c_str() + fileName).exists()) { fileName = ""; ++newId; } @@ -611,7 +611,7 @@ AudioFileManager::createDerivedAudioFile(AudioFileId source, if (!sourceFile) return 0; AudioFileId newId = getFirstUnusedID(); - QString fileName = ""; + TQString fileName = ""; std::string sourceBase = sourceFile->getShortFilename(); if (sourceBase.length() > 4 && sourceBase.substr(0, 3) == "rg-") { @@ -621,13 +621,13 @@ AudioFileManager::createDerivedAudioFile(AudioFileId source, while (fileName == "") { - fileName = QString("%1-%2-%3-%4.wav") + fileName = TQString("%1-%2-%3-%4.wav") .arg(prefix) .arg(sourceBase) - .arg(QDateTime::currentDateTime().toString("yyyyMMdd-hhmmss")) + .arg(TQDateTime::currentDateTime().toString("yyyyMMdd-hhmmss")) .arg(newId + 1); - if (QFile(m_audioPath.c_str() + fileName).exists()) { + if (TQFile(m_audioPath.c_str() + fileName).exists()) { fileName = ""; ++newId; } @@ -659,7 +659,7 @@ AudioFileManager::importURL(const KURL &url, int sampleRate) emit setOperationName(i18n("Downloading file %1").arg(url.prettyURL())); - QString localPath = ""; + TQString localPath = ""; if (!KIO::NetAccess::download(url, localPath)) { KMessageBox::error(0, i18n("Cannot download file %1").arg(url.prettyURL())); throw SoundFile::BadSoundFileException(url.prettyURL()); @@ -688,7 +688,7 @@ AudioFileManager::fileNeedsConversion(const std::string &fileName, *proc << "rosegarden-audiofile-importer"; if (sampleRate > 0) { *proc << "-r"; - *proc << QString("%1").arg(sampleRate); + *proc << TQString("%1").arg(sampleRate); } *proc << "-w"; *proc << fileName.c_str(); @@ -715,7 +715,7 @@ AudioFileManager::importFile(const std::string &fileName, int sampleRate) *proc << "rosegarden-audiofile-importer"; if (sampleRate > 0) { *proc << "-r"; - *proc << QString("%1").arg(sampleRate); + *proc << TQString("%1").arg(sampleRate); } *proc << "-w"; *proc << fileName.c_str(); @@ -742,9 +742,9 @@ AudioFileManager::importFile(const std::string &fileName, int sampleRate) } AudioFileId newId = getFirstUnusedID(); - QString targetName = ""; + TQString targetName = ""; - QString sourceBase = QFileInfo(fileName.c_str()).baseName(); + TQString sourceBase = TQFileInfo(fileName.c_str()).baseName(); if (sourceBase.length() > 3 && sourceBase.startsWith("rg-")) { sourceBase = sourceBase.right(sourceBase.length() - 3); } @@ -752,12 +752,12 @@ AudioFileManager::importFile(const std::string &fileName, int sampleRate) while (targetName == "") { - targetName = QString("conv-%2-%3-%4.wav") + targetName = TQString("conv-%2-%3-%4.wav") .arg(sourceBase) - .arg(QDateTime::currentDateTime().toString("yyyyMMdd-hhmmss")) + .arg(TQDateTime::currentDateTime().toString("yyyyMMdd-hhmmss")) .arg(newId + 1); - if (QFile(m_audioPath.c_str() + targetName).exists()) { + if (TQFile(m_audioPath.c_str() + targetName).exists()) { targetName = ""; ++newId; } @@ -768,7 +768,7 @@ AudioFileManager::importFile(const std::string &fileName, int sampleRate) *m_importProcess << "rosegarden-audiofile-importer"; if (sampleRate > 0) { *m_importProcess << "-r"; - *m_importProcess << QString("%1").arg(sampleRate); + *m_importProcess << TQString("%1").arg(sampleRate); } *m_importProcess << "-c"; *m_importProcess << fileName.c_str(); @@ -1048,7 +1048,7 @@ void AudioFileManager::drawPreview(AudioFileId id, const RealTime &startTime, const RealTime &endTime, - QPixmap *pixmap) + TQPixmap *pixmap) { MutexLock lock (&_audioFileManagerLock) ; @@ -1070,11 +1070,11 @@ AudioFileManager::drawPreview(AudioFileId id, pixmap->width(), false); - QPainter painter(pixmap); - pixmap->fill(kapp->palette().color(QPalette::Active, - QColorGroup::Base)); - painter.setPen(kapp->palette().color(QPalette::Active, - QColorGroup::Dark)); + TQPainter painter(pixmap); + pixmap->fill(kapp->palette().color(TQPalette::Active, + TQColorGroup::Base)); + painter.setPen(kapp->palette().color(TQPalette::Active, + TQColorGroup::Dark)); if (values.size() == 0) { #ifdef DEBUG_AUDIOFILEMANAGER @@ -1124,7 +1124,7 @@ AudioFileManager::drawHighlightedPreview(AudioFileId id, const RealTime &endTime, const RealTime &highlightStart, const RealTime &highlightEnd, - QPixmap *pixmap) + TQPixmap *pixmap) { MutexLock lock (&_audioFileManagerLock) ; @@ -1151,9 +1151,9 @@ AudioFileManager::drawHighlightedPreview(AudioFileId id, int endWidth = (int)(double(pixmap->width()) * (highlightEnd / (endTime - startTime))); - QPainter painter(pixmap); - pixmap->fill(kapp->palette().color(QPalette::Active, - QColorGroup::Base)); + TQPainter painter(pixmap); + pixmap->fill(kapp->palette().color(TQPalette::Active, + TQColorGroup::Base)); float yStep = pixmap->height() / 2; int channels = audioFile->getChannels(); @@ -1177,11 +1177,11 @@ AudioFileManager::drawHighlightedPreview(AudioFileId id, } if (i < startWidth || i > endWidth) - painter.setPen(kapp->palette().color(QPalette::Active, - QColorGroup::Mid)); + painter.setPen(kapp->palette().color(TQPalette::Active, + TQColorGroup::Mid)); else - painter.setPen(kapp->palette().color(QPalette::Active, - QColorGroup::Dark)); + painter.setPen(kapp->palette().color(TQPalette::Active, + TQColorGroup::Dark)); painter.drawLine(i, static_cast<int>(yStep - ch1Value * yStep), i, static_cast<int>(yStep + ch2Value * yStep)); diff --git a/src/sound/AudioFileManager.h b/src/sound/AudioFileManager.h index 9721669..67ae6c6 100644 --- a/src/sound/AudioFileManager.h +++ b/src/sound/AudioFileManager.h @@ -26,8 +26,8 @@ #include <set> #include <map> -#include <qpixmap.h> -#include <qobject.h> +#include <tqpixmap.h> +#include <tqobject.h> #include "AudioFile.h" #include "XmlExportable.h" @@ -58,7 +58,7 @@ namespace Rosegarden typedef std::vector<AudioFile*>::const_iterator AudioFileManagerIterator; -class AudioFileManager : public QObject, public XmlExportable +class AudioFileManager : public TQObject, public XmlExportable { Q_OBJECT public: @@ -227,12 +227,12 @@ public: bool withMinima); // throw BadPeakFileException, BadAudioPathException - // Draw a fixed size (fixed by QPixmap) preview of an audio file + // Draw a fixed size (fixed by TQPixmap) preview of an audio file // void drawPreview(AudioFileId id, const RealTime &startTime, const RealTime &endTime, - QPixmap *pixmap); + TQPixmap *pixmap); // throw BadPeakFileException, BadAudioPathException // Usually used to show how an audio Segment makes up part of @@ -243,7 +243,7 @@ public: const RealTime &endTime, const RealTime &highlightStart, const RealTime &highlightEnd, - QPixmap *pixmap); + TQPixmap *pixmap); // throw BadPeakFileException, BadAudioPathException // Get a short file name from a long one (with '/'s) @@ -290,7 +290,7 @@ public: signals: void setProgress(int); - void setOperationName(QString); + void setOperationName(TQString); public slots: // Cancel a running preview diff --git a/src/sound/AudioFileTimeStretcher.h b/src/sound/AudioFileTimeStretcher.h index c02e286..f2de00c 100644 --- a/src/sound/AudioFileTimeStretcher.h +++ b/src/sound/AudioFileTimeStretcher.h @@ -25,7 +25,7 @@ #ifndef _AUDIO_FILE_TIME_STRETCHER_H_ #define _AUDIO_FILE_TIME_STRETCHER_H_ -#include <qobject.h> +#include <tqobject.h> #include "AudioFile.h" #include "base/Exception.h" diff --git a/src/sound/AudioProcess.cpp b/src/sound/AudioProcess.cpp index 9b44e13..1fb5a61 100644 --- a/src/sound/AudioProcess.cpp +++ b/src/sound/AudioProcess.cpp @@ -909,7 +909,7 @@ AudioInstrumentMixer::BufferRec::~BufferRec() void -AudioInstrumentMixer::setPlugin(InstrumentId id, int position, QString identifier) +AudioInstrumentMixer::setPlugin(InstrumentId id, int position, TQString identifier) { // Not RT safe @@ -1089,7 +1089,7 @@ AudioInstrumentMixer::getPluginPrograms(InstrumentId id, int position) { // Not RT safe - QStringList programs; + TQStringList programs; RunnablePluginInstance *instance = getPluginInstance(id, position); if (instance) programs = instance->getPrograms(); @@ -1101,7 +1101,7 @@ AudioInstrumentMixer::getPluginProgram(InstrumentId id, int position) { // Not RT safe - QString program; + TQString program; RunnablePluginInstance *instance = getPluginInstance(id, position); if (instance) program = instance->getCurrentProgram(); @@ -1114,7 +1114,7 @@ AudioInstrumentMixer::getPluginProgram(InstrumentId id, int position, int bank, { // Not RT safe - QString programName; + TQString programName; RunnablePluginInstance *instance = getPluginInstance(id, position); if (instance) programName = instance->getProgram(bank, program); @@ -1122,7 +1122,7 @@ AudioInstrumentMixer::getPluginProgram(InstrumentId id, int position, int bank, } unsigned long -AudioInstrumentMixer::getPluginProgram(InstrumentId id, int position, QString name) +AudioInstrumentMixer::getPluginProgram(InstrumentId id, int position, TQString name) { // Not RT safe @@ -1134,7 +1134,7 @@ AudioInstrumentMixer::getPluginProgram(InstrumentId id, int position, QString na } void -AudioInstrumentMixer::setPluginProgram(InstrumentId id, int position, QString program) +AudioInstrumentMixer::setPluginProgram(InstrumentId id, int position, TQString program) { // Not RT safe @@ -1144,14 +1144,14 @@ AudioInstrumentMixer::setPluginProgram(InstrumentId id, int position, QString pr } QString -AudioInstrumentMixer::configurePlugin(InstrumentId id, int position, QString key, QString value) +AudioInstrumentMixer::configurePlugin(InstrumentId id, int position, TQString key, TQString value) { // Not RT safe RunnablePluginInstance *instance = getPluginInstance(id, position); if (instance) return instance->configure(key, value); - return QString(); + return TQString(); } void diff --git a/src/sound/AudioProcess.h b/src/sound/AudioProcess.h index b517bc9..c21ab01 100644 --- a/src/sound/AudioProcess.h +++ b/src/sound/AudioProcess.h @@ -188,7 +188,7 @@ public: void setBussMixer(AudioBussMixer *mixer) { m_bussMixer = mixer; } - void setPlugin(InstrumentId id, int position, QString identifier); + void setPlugin(InstrumentId id, int position, TQString identifier); void removePlugin(InstrumentId id, int position); void removeAllPlugins(); @@ -199,13 +199,13 @@ public: void setPluginBypass(InstrumentId, int position, bool bypass); - QStringList getPluginPrograms(InstrumentId, int); - QString getPluginProgram(InstrumentId, int); - QString getPluginProgram(InstrumentId, int, int, int); - unsigned long getPluginProgram(InstrumentId, int, QString); - void setPluginProgram(InstrumentId, int, QString); + TQStringList getPluginPrograms(InstrumentId, int); + TQString getPluginProgram(InstrumentId, int); + TQString getPluginProgram(InstrumentId, int, int, int); + unsigned long getPluginProgram(InstrumentId, int, TQString); + void setPluginProgram(InstrumentId, int, TQString); - QString configurePlugin(InstrumentId, int, QString, QString); + TQString configurePlugin(InstrumentId, int, TQString, TQString); void resetAllPlugins(bool discardEvents = false); void discardPluginEvents(); diff --git a/src/sound/DSSIPluginFactory.cpp b/src/sound/DSSIPluginFactory.cpp index 8447450..42df247 100644 --- a/src/sound/DSSIPluginFactory.cpp +++ b/src/sound/DSSIPluginFactory.cpp @@ -52,7 +52,7 @@ DSSIPluginFactory::~DSSIPluginFactory() void DSSIPluginFactory::enumeratePlugins(MappedObjectPropertyList &list) { - for (std::vector<QString>::iterator i = m_identifiers.begin(); + for (std::vector<TQString>::iterator i = m_identifiers.begin(); i != m_identifiers.end(); ++i) { const DSSI_Descriptor *ddesc = getDSSIDescriptor(*i); @@ -67,14 +67,14 @@ DSSIPluginFactory::enumeratePlugins(MappedObjectPropertyList &list) list.push_back(*i); list.push_back(descriptor->Name); - list.push_back(QString("%1").arg(descriptor->UniqueID)); + list.push_back(TQString("%1").arg(descriptor->UniqueID)); list.push_back(descriptor->Label); list.push_back(descriptor->Maker); list.push_back(descriptor->Copyright); list.push_back((ddesc->run_synth || ddesc->run_multiple_synths) ? "true" : "false"); list.push_back(ddesc->run_multiple_synths ? "true" : "false"); list.push_back(m_taxonomy[descriptor->UniqueID]); - list.push_back(QString("%1").arg(descriptor->PortCount)); + list.push_back(TQString("%1").arg(descriptor->PortCount)); for (unsigned long p = 0; p < descriptor->PortCount; ++p) { @@ -90,13 +90,13 @@ DSSIPluginFactory::enumeratePlugins(MappedObjectPropertyList &list) type |= PluginPort::Output; } - list.push_back(QString("%1").arg(p)); + list.push_back(TQString("%1").arg(p)); list.push_back(descriptor->PortNames[p]); - list.push_back(QString("%1").arg(type)); - list.push_back(QString("%1").arg(getPortDisplayHint(descriptor, p))); - list.push_back(QString("%1").arg(getPortMinimum(descriptor, p))); - list.push_back(QString("%1").arg(getPortMaximum(descriptor, p))); - list.push_back(QString("%1").arg(getPortDefault(descriptor, p))); + list.push_back(TQString("%1").arg(type)); + list.push_back(TQString("%1").arg(getPortDisplayHint(descriptor, p))); + list.push_back(TQString("%1").arg(getPortMinimum(descriptor, p))); + list.push_back(TQString("%1").arg(getPortMaximum(descriptor, p))); + list.push_back(TQString("%1").arg(getPortDefault(descriptor, p))); } } @@ -105,7 +105,7 @@ DSSIPluginFactory::enumeratePlugins(MappedObjectPropertyList &list) void -DSSIPluginFactory::populatePluginSlot(QString identifier, MappedPluginSlot &slot) +DSSIPluginFactory::populatePluginSlot(TQString identifier, MappedPluginSlot &slot) { const LADSPA_Descriptor *descriptor = getLADSPADescriptor(identifier); if (!descriptor) @@ -159,7 +159,7 @@ DSSIPluginFactory::populatePluginSlot(QString identifier, MappedPluginSlot &slot } RunnablePluginInstance * -DSSIPluginFactory::instantiatePlugin(QString identifier, +DSSIPluginFactory::instantiatePlugin(TQString identifier, int instrument, int position, unsigned int sampleRate, @@ -185,9 +185,9 @@ DSSIPluginFactory::instantiatePlugin(QString identifier, const DSSI_Descriptor * -DSSIPluginFactory::getDSSIDescriptor(QString identifier) +DSSIPluginFactory::getDSSIDescriptor(TQString identifier) { - QString type, soname, label; + TQString type, soname, label; PluginIdentifier::parseIdentifier(identifier, type, soname, label); if (m_libraryHandles.find(soname) == m_libraryHandles.end()) { @@ -223,7 +223,7 @@ DSSIPluginFactory::getDSSIDescriptor(QString identifier) } const LADSPA_Descriptor * -DSSIPluginFactory::getLADSPADescriptor(QString identifier) +DSSIPluginFactory::getLADSPADescriptor(TQString identifier) { const DSSI_Descriptor *dssiDescriptor = getDSSIDescriptor(identifier); if (dssiDescriptor) @@ -233,10 +233,10 @@ DSSIPluginFactory::getLADSPADescriptor(QString identifier) } -std::vector<QString> +std::vector<TQString> DSSIPluginFactory::getPluginPath() { - std::vector<QString> pathList; + std::vector<TQString> pathList; std::string path; char *cpath = getenv("DSSI_PATH"); @@ -264,11 +264,11 @@ DSSIPluginFactory::getPluginPath() #ifdef HAVE_LIBLRDF -std::vector<QString> -DSSIPluginFactory::getLRDFPath(QString &baseUri) +std::vector<TQString> +DSSIPluginFactory::getLRDFPath(TQString &baseUri) { - std::vector<QString> pathList = getPluginPath(); - std::vector<QString> lrdfPaths; + std::vector<TQString> pathList = getPluginPath(); + std::vector<TQString> lrdfPaths; lrdfPaths.push_back("/usr/local/share/dssi/rdf"); lrdfPaths.push_back("/usr/share/dssi/rdf"); @@ -276,7 +276,7 @@ DSSIPluginFactory::getLRDFPath(QString &baseUri) lrdfPaths.push_back("/usr/local/share/ladspa/rdf"); lrdfPaths.push_back("/usr/share/ladspa/rdf"); - for (std::vector<QString>::iterator i = pathList.begin(); + for (std::vector<TQString>::iterator i = pathList.begin(); i != pathList.end(); ++i) { lrdfPaths.push_back(*i + "/rdf"); } @@ -294,7 +294,7 @@ DSSIPluginFactory::getLRDFPath(QString &baseUri) void -DSSIPluginFactory::discoverPlugins(QString soName) +DSSIPluginFactory::discoverPlugins(TQString soName) { void *libraryHandle = dlopen(soName.data(), RTLD_LAZY); @@ -328,7 +328,7 @@ DSSIPluginFactory::discoverPlugins(QString soName) char *def_uri = 0; lrdf_defaults *defs = 0; - QString category = m_taxonomy[ladspaDescriptor->UniqueID]; + TQString category = m_taxonomy[ladspaDescriptor->UniqueID]; if (category == "" && ladspaDescriptor->Name != 0) { std::string name = ladspaDescriptor->Name; @@ -344,7 +344,7 @@ DSSIPluginFactory::discoverPlugins(QString soName) } // std::cerr << "Plugin id is " << ladspaDescriptor->UniqueID - // << ", category is \"" << (category ? category : QString("(none)")) + // << ", category is \"" << (category ? category : TQString("(none)")) // << "\", name is " << ladspaDescriptor->Name // << ", label is " << ladspaDescriptor->Label // << std::endl; @@ -376,7 +376,7 @@ DSSIPluginFactory::discoverPlugins(QString soName) } #endif // HAVE_LIBLRDF - QString identifier = PluginIdentifier::createIdentifier + TQString identifier = PluginIdentifier::createIdentifier ("dssi", soName, ladspaDescriptor->Label); m_identifiers.push_back(identifier); diff --git a/src/sound/DSSIPluginFactory.h b/src/sound/DSSIPluginFactory.h index 8c1bd7c..9e64b75 100644 --- a/src/sound/DSSIPluginFactory.h +++ b/src/sound/DSSIPluginFactory.h @@ -39,9 +39,9 @@ public: virtual void enumeratePlugins(MappedObjectPropertyList &list); - virtual void populatePluginSlot(QString identifier, MappedPluginSlot &slot); + virtual void populatePluginSlot(TQString identifier, MappedPluginSlot &slot); - virtual RunnablePluginInstance *instantiatePlugin(QString identifier, + virtual RunnablePluginInstance *instantiatePlugin(TQString identifier, int instrumentId, int position, unsigned int sampleRate, @@ -52,16 +52,16 @@ protected: DSSIPluginFactory(); friend class PluginFactory; - virtual std::vector<QString> getPluginPath(); + virtual std::vector<TQString> getPluginPath(); #ifdef HAVE_LIBLRDF - virtual std::vector<QString> getLRDFPath(QString &baseUri); + virtual std::vector<TQString> getLRDFPath(TQString &baseUri); #endif - virtual void discoverPlugins(QString soName); + virtual void discoverPlugins(TQString soName); - virtual const LADSPA_Descriptor *getLADSPADescriptor(QString identifier); - virtual const DSSI_Descriptor *getDSSIDescriptor(QString identifier); + virtual const LADSPA_Descriptor *getLADSPADescriptor(TQString identifier); + virtual const DSSI_Descriptor *getDSSIDescriptor(TQString identifier); }; } diff --git a/src/sound/DSSIPluginInstance.cpp b/src/sound/DSSIPluginInstance.cpp index 2ceb0df..30b9256 100644 --- a/src/sound/DSSIPluginInstance.cpp +++ b/src/sound/DSSIPluginInstance.cpp @@ -45,7 +45,7 @@ Scavenger<ScavengerArrayWrapper<snd_seq_event_t *> > DSSIPluginInstance::m_buffe DSSIPluginInstance::DSSIPluginInstance(PluginFactory *factory, InstrumentId instrument, - QString identifier, + TQString identifier, int position, unsigned long sampleRate, size_t blockSize, @@ -101,7 +101,7 @@ DSSIPluginInstance::DSSIPluginInstance(PluginFactory *factory, DSSIPluginInstance::DSSIPluginInstance(PluginFactory *factory, InstrumentId instrument, - QString identifier, + TQString identifier, int position, unsigned long sampleRate, size_t blockSize, @@ -451,7 +451,7 @@ DSSIPluginInstance::checkProgramCache() ProgramDescriptor d; d.bank = programDescriptor->Bank; d.program = programDescriptor->Program; - d.name = QString("%1. %2").arg(index).arg(programDescriptor->Name); + d.name = TQString("%1. %2").arg(index).arg(programDescriptor->Name); m_cachedPrograms.push_back(d); } @@ -470,11 +470,11 @@ DSSIPluginInstance::getPrograms() #endif if (!m_descriptor) - return QStringList(); + return TQStringList(); checkProgramCache(); - QStringList programs; + TQStringList programs; for (std::vector<ProgramDescriptor>::iterator i = m_cachedPrograms.begin(); i != m_cachedPrograms.end(); ++i) { @@ -492,7 +492,7 @@ DSSIPluginInstance::getProgram(int bank, int program) #endif if (!m_descriptor) - return QString(); + return TQString(); checkProgramCache(); @@ -502,11 +502,11 @@ DSSIPluginInstance::getProgram(int bank, int program) return i->name; } - return QString(); + return TQString(); } unsigned long -DSSIPluginInstance::getProgram(QString name) +DSSIPluginInstance::getProgram(TQString name) { #ifdef DEBUG_DSSI std::cerr << "DSSIPluginInstance::getProgram(" << name << ")" << std::endl; @@ -538,13 +538,13 @@ DSSIPluginInstance::getCurrentProgram() } void -DSSIPluginInstance::selectProgram(QString program) +DSSIPluginInstance::selectProgram(TQString program) { selectProgramAux(program, true); } void -DSSIPluginInstance::selectProgramAux(QString program, bool backupPortValues) +DSSIPluginInstance::selectProgramAux(TQString program, bool backupPortValues) { #ifdef DEBUG_DSSI std::cerr << "DSSIPluginInstance[" << this << "]::selectProgram(" << program << ", " << backupPortValues << ")" << std::endl; @@ -766,18 +766,18 @@ DSSIPluginInstance::getPortValue(unsigned int portNumber) } QString -DSSIPluginInstance::configure(QString key, - QString value) +DSSIPluginInstance::configure(TQString key, + TQString value) { if (!m_descriptor || !m_descriptor->configure) - return QString(); + return TQString(); if (key == PluginIdentifier::RESERVED_PROJECT_DIRECTORY_KEY) { #ifdef DSSI_PROJECT_DIRECTORY_KEY key = DSSI_PROJECT_DIRECTORY_KEY; #else - return QString(); + return TQString(); #endif } @@ -791,7 +791,7 @@ DSSIPluginInstance::configure(QString key, m_programCacheValid = false; - QString qm; + TQString qm; // Ignore return values from reserved key configuration calls such // as project directory @@ -804,7 +804,7 @@ DSSIPluginInstance::configure(QString key, if (message) { if (m_descriptor->LADSPA_Plugin && m_descriptor->LADSPA_Plugin->Label) { - qm = QString(m_descriptor->LADSPA_Plugin->Label) + ": "; + qm = TQString(m_descriptor->LADSPA_Plugin->Label) + ": "; } qm = qm + message; free(message); diff --git a/src/sound/DSSIPluginInstance.h b/src/sound/DSSIPluginInstance.h index eca6327..bf1a197 100644 --- a/src/sound/DSSIPluginInstance.h +++ b/src/sound/DSSIPluginInstance.h @@ -25,7 +25,7 @@ #include <vector> #include <set> #include <map> -#include <qstring.h> +#include <tqstring.h> #include "Instrument.h" #ifdef HAVE_DSSI @@ -47,14 +47,14 @@ public: virtual bool isOK() const { return m_instanceHandle != 0; } InstrumentId getInstrument() const { return m_instrument; } - virtual QString getIdentifier() const { return m_identifier; } + virtual TQString getIdentifier() const { return m_identifier; } int getPosition() const { return m_position; } virtual void run(const RealTime &); virtual void setPortValue(unsigned int portNumber, float value); virtual float getPortValue(unsigned int portNumber); - virtual QString configure(QString key, QString value); + virtual TQString configure(TQString key, TQString value); virtual void sendEvent(const RealTime &eventTime, const void *event); @@ -64,11 +64,11 @@ public: virtual sample_t **getAudioInputBuffers() { return m_inputBuffers; } virtual sample_t **getAudioOutputBuffers() { return m_outputBuffers; } - virtual QStringList getPrograms(); - virtual QString getCurrentProgram(); - virtual QString getProgram(int bank, int program); - virtual unsigned long getProgram(QString name); - virtual void selectProgram(QString program); + virtual TQStringList getPrograms(); + virtual TQString getCurrentProgram(); + virtual TQString getProgram(int bank, int program); + virtual unsigned long getProgram(TQString name); + virtual void selectProgram(TQString program); virtual bool isBypassed() const { return m_bypassed; } virtual void setBypassed(bool bypassed) { m_bypassed = bypassed; } @@ -90,7 +90,7 @@ protected: // DSSIPluginInstance(PluginFactory *factory, InstrumentId instrument, - QString identifier, + TQString identifier, int position, unsigned long sampleRate, size_t blockSize, @@ -101,7 +101,7 @@ protected: // DSSIPluginInstance(PluginFactory *factory, InstrumentId instrument, - QString identifier, + TQString identifier, int position, unsigned long sampleRate, size_t blockSize, @@ -118,7 +118,7 @@ protected: bool handleController(snd_seq_event_t *ev); void setPortValueFromController(unsigned int portNumber, int controlValue); - void selectProgramAux(QString program, bool backupPortValues); + void selectProgramAux(TQString program, bool backupPortValues); void checkProgramCache(); void initialiseGroupMembership(); @@ -150,7 +150,7 @@ protected: struct ProgramDescriptor { int bank; int program; - QString name; + TQString name; }; std::vector<ProgramDescriptor> m_cachedPrograms; bool m_programCacheValid; @@ -170,14 +170,14 @@ protected: bool m_runSinceReset; bool m_bypassed; - QString m_program; + TQString m_program; bool m_grouped; RealTime m_lastRunTime; pthread_mutex_t m_processLock; typedef std::set<DSSIPluginInstance *> PluginSet; - typedef std::map<QString, PluginSet> GroupMap; + typedef std::map<TQString, PluginSet> GroupMap; static GroupMap m_groupMap; static snd_seq_event_t **m_groupLocalEventBuffers; static size_t m_groupLocalEventBufferCount; diff --git a/src/sound/DummyDriver.h b/src/sound/DummyDriver.h index 838e7bd..d60c7c0 100644 --- a/src/sound/DummyDriver.h +++ b/src/sound/DummyDriver.h @@ -62,7 +62,7 @@ public: // virtual bool record(RecordStatus /*recordStatus*/, const std::vector<InstrumentId> */*armedInstruments = 0*/, - const std::vector<QString> */*audioFileNames = 0*/) + const std::vector<TQString> */*audioFileNames = 0*/) { return false; } // Process anything that's pending @@ -80,7 +80,7 @@ public: // Plugin instance management // virtual void setPluginInstance(InstrumentId /*id*/, - QString /*pluginIdent*/, + TQString /*pluginIdent*/, int /*position*/) { } virtual void removePluginInstance(InstrumentId /*id*/, @@ -101,29 +101,29 @@ public: int /*position*/, bool /*value*/) { } - virtual QStringList getPluginInstancePrograms(InstrumentId , - int ) { return QStringList(); } + virtual TQStringList getPluginInstancePrograms(InstrumentId , + int ) { return TQStringList(); } - virtual QString getPluginInstanceProgram(InstrumentId, - int ) { return QString(); } + virtual TQString getPluginInstanceProgram(InstrumentId, + int ) { return TQString(); } - virtual QString getPluginInstanceProgram(InstrumentId, + virtual TQString getPluginInstanceProgram(InstrumentId, int, int, - int) { return QString(); } + int) { return TQString(); } virtual unsigned long getPluginInstanceProgram(InstrumentId, int , - QString) { return 0; } + TQString) { return 0; } virtual void setPluginInstanceProgram(InstrumentId, int , - QString ) { } + TQString ) { } - virtual QString configurePlugin(InstrumentId, + virtual TQString configurePlugin(InstrumentId, int, - QString , - QString ) { return QString(); } + TQString , + TQString ) { return TQString(); } virtual void setAudioBussLevels(int , float , diff --git a/src/sound/JackDriver.cpp b/src/sound/JackDriver.cpp index 24eb6fe..b9a7205 100644 --- a/src/sound/JackDriver.cpp +++ b/src/sound/JackDriver.cpp @@ -2318,7 +2318,7 @@ JackDriver::releaseAudioQueueLocks() void -JackDriver::setPluginInstance(InstrumentId id, QString identifier, +JackDriver::setPluginInstance(InstrumentId id, TQString identifier, int position) { if (m_instrumentMixer) { @@ -2373,7 +2373,7 @@ JackDriver::getPluginInstancePrograms(InstrumentId id, int position) { if (m_instrumentMixer) return m_instrumentMixer->getPluginPrograms(id, position); - return QStringList(); + return TQStringList(); } QString @@ -2381,7 +2381,7 @@ JackDriver::getPluginInstanceProgram(InstrumentId id, int position) { if (m_instrumentMixer) return m_instrumentMixer->getPluginProgram(id, position); - return QString(); + return TQString(); } QString @@ -2390,11 +2390,11 @@ JackDriver::getPluginInstanceProgram(InstrumentId id, int position, { if (m_instrumentMixer) return m_instrumentMixer->getPluginProgram(id, position, bank, program); - return QString(); + return TQString(); } unsigned long -JackDriver::getPluginInstanceProgram(InstrumentId id, int position, QString name) +JackDriver::getPluginInstanceProgram(InstrumentId id, int position, TQString name) { if (m_instrumentMixer) return m_instrumentMixer->getPluginProgram(id, position, name); @@ -2402,18 +2402,18 @@ JackDriver::getPluginInstanceProgram(InstrumentId id, int position, QString name } void -JackDriver::setPluginInstanceProgram(InstrumentId id, int position, QString program) +JackDriver::setPluginInstanceProgram(InstrumentId id, int position, TQString program) { if (m_instrumentMixer) m_instrumentMixer->setPluginProgram(id, position, program); } QString -JackDriver::configurePlugin(InstrumentId id, int position, QString key, QString value) +JackDriver::configurePlugin(InstrumentId id, int position, TQString key, TQString value) { if (m_instrumentMixer) return m_instrumentMixer->configurePlugin(id, position, key, value); - return QString(); + return TQString(); } RunnablePluginInstance * diff --git a/src/sound/JackDriver.h b/src/sound/JackDriver.h index b46080d..4d2c42e 100644 --- a/src/sound/JackDriver.h +++ b/src/sound/JackDriver.h @@ -31,7 +31,7 @@ #include "Instrument.h" #include "RealTime.h" #include "ExternalTransport.h" -#include <qstringlist.h> +#include <tqstringlist.h> namespace Rosegarden { @@ -77,7 +77,7 @@ public: // Plugin instance management // virtual void setPluginInstance(InstrumentId id, - QString identifier, + TQString identifier, int position); virtual void removePluginInstance(InstrumentId id, int position); @@ -99,28 +99,28 @@ public: int position, bool value); - virtual QStringList getPluginInstancePrograms(InstrumentId id, + virtual TQStringList getPluginInstancePrograms(InstrumentId id, int position); - virtual QString getPluginInstanceProgram(InstrumentId id, + virtual TQString getPluginInstanceProgram(InstrumentId id, int position); - virtual QString getPluginInstanceProgram(InstrumentId id, + virtual TQString getPluginInstanceProgram(InstrumentId id, int position, int bank, int program); virtual unsigned long getPluginInstanceProgram(InstrumentId id, int position, - QString name); + TQString name); virtual void setPluginInstanceProgram(InstrumentId id, int position, - QString program); + TQString program); - virtual QString configurePlugin(InstrumentId id, + virtual TQString configurePlugin(InstrumentId id, int position, - QString key, QString value); + TQString key, TQString value); virtual RunnablePluginInstance *getSynthPlugin(InstrumentId id); diff --git a/src/sound/LADSPAPluginFactory.cpp b/src/sound/LADSPAPluginFactory.cpp index 2a4a4ea..5ec25ef 100644 --- a/src/sound/LADSPAPluginFactory.cpp +++ b/src/sound/LADSPAPluginFactory.cpp @@ -26,7 +26,7 @@ #ifdef HAVE_LADSPA #include <dlfcn.h> -#include <qdir.h> +#include <tqdir.h> #include <cmath> #include "AudioPluginInstance.h" @@ -58,7 +58,7 @@ LADSPAPluginFactory::~LADSPAPluginFactory() unloadUnusedLibraries(); } -const std::vector<QString> & +const std::vector<TQString> & LADSPAPluginFactory::getPluginIdentifiers() const { return m_identifiers; @@ -67,7 +67,7 @@ LADSPAPluginFactory::getPluginIdentifiers() const void LADSPAPluginFactory::enumeratePlugins(MappedObjectPropertyList &list) { - for (std::vector<QString>::iterator i = m_identifiers.begin(); + for (std::vector<TQString>::iterator i = m_identifiers.begin(); i != m_identifiers.end(); ++i) { const LADSPA_Descriptor *descriptor = getLADSPADescriptor(*i); @@ -81,7 +81,7 @@ LADSPAPluginFactory::enumeratePlugins(MappedObjectPropertyList &list) list.push_back(*i); list.push_back(descriptor->Name); - list.push_back(QString("%1").arg(descriptor->UniqueID)); + list.push_back(TQString("%1").arg(descriptor->UniqueID)); list.push_back(descriptor->Label); list.push_back(descriptor->Maker); list.push_back(descriptor->Copyright); @@ -104,7 +104,7 @@ LADSPAPluginFactory::enumeratePlugins(MappedObjectPropertyList &list) } - list.push_back(QString("%1").arg(descriptor->PortCount)); + list.push_back(TQString("%1").arg(descriptor->PortCount)); for (unsigned long p = 0; p < descriptor->PortCount; ++p) { @@ -120,13 +120,13 @@ LADSPAPluginFactory::enumeratePlugins(MappedObjectPropertyList &list) type |= PluginPort::Output; } - list.push_back(QString("%1").arg(p)); + list.push_back(TQString("%1").arg(p)); list.push_back(descriptor->PortNames[p]); - list.push_back(QString("%1").arg(type)); - list.push_back(QString("%1").arg(getPortDisplayHint(descriptor, p))); - list.push_back(QString("%1").arg(getPortMinimum(descriptor, p))); - list.push_back(QString("%1").arg(getPortMaximum(descriptor, p))); - list.push_back(QString("%1").arg(getPortDefault(descriptor, p))); + list.push_back(TQString("%1").arg(type)); + list.push_back(TQString("%1").arg(getPortDisplayHint(descriptor, p))); + list.push_back(TQString("%1").arg(getPortMinimum(descriptor, p))); + list.push_back(TQString("%1").arg(getPortMaximum(descriptor, p))); + list.push_back(TQString("%1").arg(getPortDefault(descriptor, p))); } } @@ -135,7 +135,7 @@ LADSPAPluginFactory::enumeratePlugins(MappedObjectPropertyList &list) void -LADSPAPluginFactory::populatePluginSlot(QString identifier, MappedPluginSlot &slot) +LADSPAPluginFactory::populatePluginSlot(TQString identifier, MappedPluginSlot &slot) { const LADSPA_Descriptor *descriptor = getLADSPADescriptor(identifier); @@ -407,7 +407,7 @@ LADSPAPluginFactory::getPortDisplayHint(const LADSPA_Descriptor *descriptor, int RunnablePluginInstance * -LADSPAPluginFactory::instantiatePlugin(QString identifier, +LADSPAPluginFactory::instantiatePlugin(TQString identifier, int instrument, int position, unsigned int sampleRate, @@ -433,7 +433,7 @@ LADSPAPluginFactory::instantiatePlugin(QString identifier, void LADSPAPluginFactory::releasePlugin(RunnablePluginInstance *instance, - QString identifier) + TQString identifier) { if (m_instances.find(instance) == m_instances.end()) { std::cerr << "WARNING: LADSPAPluginFactory::releasePlugin: Not one of mine!" @@ -441,7 +441,7 @@ LADSPAPluginFactory::releasePlugin(RunnablePluginInstance *instance, return ; } - QString type, soname, label; + TQString type, soname, label; PluginIdentifier::parseIdentifier(identifier, type, soname, label); m_instances.erase(m_instances.find(instance)); @@ -451,7 +451,7 @@ LADSPAPluginFactory::releasePlugin(RunnablePluginInstance *instance, for (std::set <RunnablePluginInstance *>::iterator ii = m_instances.begin(); ii != m_instances.end(); ++ii) { - QString itype, isoname, ilabel; + TQString itype, isoname, ilabel; PluginIdentifier::parseIdentifier((*ii)->getIdentifier(), itype, isoname, ilabel); if (isoname == soname) { // std::cerr << "LADSPAPluginFactory::releasePlugin: dll " << soname << " is still in use for plugin " << ilabel << std::endl; @@ -467,9 +467,9 @@ LADSPAPluginFactory::releasePlugin(RunnablePluginInstance *instance, } const LADSPA_Descriptor * -LADSPAPluginFactory::getLADSPADescriptor(QString identifier) +LADSPAPluginFactory::getLADSPADescriptor(TQString identifier) { - QString type, soname, label; + TQString type, soname, label; PluginIdentifier::parseIdentifier(identifier, type, soname, label); if (m_libraryHandles.find(soname) == m_libraryHandles.end()) { @@ -505,7 +505,7 @@ LADSPAPluginFactory::getLADSPADescriptor(QString identifier) } void -LADSPAPluginFactory::loadLibrary(QString soName) +LADSPAPluginFactory::loadLibrary(TQString soName) { void *libraryHandle = dlopen(soName.data(), RTLD_NOW); if (libraryHandle) @@ -513,7 +513,7 @@ LADSPAPluginFactory::loadLibrary(QString soName) } void -LADSPAPluginFactory::unloadLibrary(QString soName) +LADSPAPluginFactory::unloadLibrary(TQString soName) { LibraryHandleMap::iterator li = m_libraryHandles.find(soName); if (li != m_libraryHandles.end()) { @@ -526,7 +526,7 @@ LADSPAPluginFactory::unloadLibrary(QString soName) void LADSPAPluginFactory::unloadUnusedLibraries() { - std::vector<QString> toUnload; + std::vector<TQString> toUnload; for (LibraryHandleMap::iterator i = m_libraryHandles.begin(); i != m_libraryHandles.end(); ++i) { @@ -537,7 +537,7 @@ LADSPAPluginFactory::unloadUnusedLibraries() <RunnablePluginInstance *>::iterator ii = m_instances.begin(); ii != m_instances.end(); ++ii) { - QString itype, isoname, ilabel; + TQString itype, isoname, ilabel; PluginIdentifier::parseIdentifier((*ii)->getIdentifier(), itype, isoname, ilabel); if (isoname == i->first) { stillInUse = true; @@ -549,7 +549,7 @@ LADSPAPluginFactory::unloadUnusedLibraries() toUnload.push_back(i->first); } - for (std::vector<QString>::iterator i = toUnload.begin(); + for (std::vector<TQString>::iterator i = toUnload.begin(); i != toUnload.end(); ++i) { unloadLibrary(*i); } @@ -564,10 +564,10 @@ LADSPAPluginFactory::unloadUnusedLibraries() // I hope someday to forget all this. -std::vector<QString> +std::vector<TQString> LADSPAPluginFactory::getPluginPath() { - std::vector<QString> pathList; + std::vector<TQString> pathList; std::string path; char *cpath = getenv("LADSPA_PATH"); @@ -595,16 +595,16 @@ LADSPAPluginFactory::getPluginPath() #ifdef HAVE_LIBLRDF -std::vector<QString> -LADSPAPluginFactory::getLRDFPath(QString &baseUri) +std::vector<TQString> +LADSPAPluginFactory::getLRDFPath(TQString &baseUri) { - std::vector<QString> pathList = getPluginPath(); - std::vector<QString> lrdfPaths; + std::vector<TQString> pathList = getPluginPath(); + std::vector<TQString> lrdfPaths; lrdfPaths.push_back("/usr/local/share/ladspa/rdf"); lrdfPaths.push_back("/usr/share/ladspa/rdf"); - for (std::vector<QString>::iterator i = pathList.begin(); + for (std::vector<TQString>::iterator i = pathList.begin(); i != pathList.end(); ++i) { lrdfPaths.push_back(*i + "/rdf"); } @@ -617,11 +617,11 @@ LADSPAPluginFactory::getLRDFPath(QString &baseUri) void LADSPAPluginFactory::discoverPlugins() { - std::vector<QString> pathList = getPluginPath(); + std::vector<TQString> pathList = getPluginPath(); std::cerr << "LADSPAPluginFactory::discoverPlugins - " << "discovering plugins; path is "; - for (std::vector<QString>::iterator i = pathList.begin(); + for (std::vector<TQString>::iterator i = pathList.begin(); i != pathList.end(); ++i) { std::cerr << "[" << *i << "] "; } @@ -636,15 +636,15 @@ LADSPAPluginFactory::discoverPlugins() // lrdf_init(); - QString baseUri; - std::vector<QString> lrdfPaths = getLRDFPath(baseUri); + TQString baseUri; + std::vector<TQString> lrdfPaths = getLRDFPath(baseUri); bool haveSomething = false; for (size_t i = 0; i < lrdfPaths.size(); ++i) { - QDir dir(lrdfPaths[i], "*.rdf;*.rdfs"); + TQDir dir(lrdfPaths[i], "*.rdf;*.rdfs"); for (unsigned int j = 0; j < dir.count(); ++j) { - if (!lrdf_read_file(QString("file:" + lrdfPaths[i] + "/" + dir[j]).data())) { + if (!lrdf_read_file(TQString("file:" + lrdfPaths[i] + "/" + dir[j]).data())) { // std::cerr << "LADSPAPluginFactory: read RDF file " << (lrdfPaths[i] + "/" + dir[j]) << std::endl; haveSomething = true; } @@ -658,13 +658,13 @@ LADSPAPluginFactory::discoverPlugins() generateFallbackCategories(); - for (std::vector<QString>::iterator i = pathList.begin(); + for (std::vector<TQString>::iterator i = pathList.begin(); i != pathList.end(); ++i) { - QDir pluginDir(*i, "*.so"); + TQDir pluginDir(*i, "*.so"); for (unsigned int j = 0; j < pluginDir.count(); ++j) { - discoverPlugins(QString("%1/%2").arg(*i).arg(pluginDir[j])); + discoverPlugins(TQString("%1/%2").arg(*i).arg(pluginDir[j])); } } @@ -678,7 +678,7 @@ LADSPAPluginFactory::discoverPlugins() } void -LADSPAPluginFactory::discoverPlugins(QString soName) +LADSPAPluginFactory::discoverPlugins(TQString soName) { void *libraryHandle = dlopen(soName.data(), RTLD_LAZY); @@ -705,7 +705,7 @@ LADSPAPluginFactory::discoverPlugins(QString soName) char * def_uri = 0; lrdf_defaults *defs = 0; - QString category = m_taxonomy[descriptor->UniqueID]; + TQString category = m_taxonomy[descriptor->UniqueID]; if (category == "" && descriptor->Name != 0) { std::string name = descriptor->Name; @@ -717,7 +717,7 @@ LADSPAPluginFactory::discoverPlugins(QString soName) } // std::cerr << "Plugin id is " << descriptor->UniqueID -// << ", category is \"" << (category ? category : QString("(none)")) +// << ", category is \"" << (category ? category : TQString("(none)")) // << "\", name is " << descriptor->Name // << ", label is " << descriptor->Label // << std::endl; @@ -749,7 +749,7 @@ LADSPAPluginFactory::discoverPlugins(QString soName) } #endif // HAVE_LIBLRDF - QString identifier = PluginIdentifier::createIdentifier + TQString identifier = PluginIdentifier::createIdentifier ("ladspa", soName, descriptor->Label); // std::cerr << "Added plugin identifier " << identifier << std::endl; m_identifiers.push_back(identifier); @@ -766,12 +766,12 @@ LADSPAPluginFactory::discoverPlugins(QString soName) void LADSPAPluginFactory::generateFallbackCategories() { - std::vector<QString> pluginPath = getPluginPath(); - std::vector<QString> path; + std::vector<TQString> pluginPath = getPluginPath(); + std::vector<TQString> path; for (size_t i = 0; i < pluginPath.size(); ++i) { if (pluginPath[i].contains("/lib/")) { - QString p(pluginPath[i]); + TQString p(pluginPath[i]); p.replace("/lib/", "/share/"); path.push_back(p); // std::cerr << "LADSPAPluginFactory::generateFallbackCategories: path element " << p << std::endl; @@ -782,25 +782,25 @@ LADSPAPluginFactory::generateFallbackCategories() for (size_t i = 0; i < path.size(); ++i) { - QDir dir(path[i], "*.cat"); + TQDir dir(path[i], "*.cat"); // std::cerr << "LADSPAPluginFactory::generateFallbackCategories: directory " << path[i] << " has " << dir.count() << " .cat files" << std::endl; for (unsigned int j = 0; j < dir.count(); ++j) { - QFile file(path[i] + "/" + dir[j]); + TQFile file(path[i] + "/" + dir[j]); // std::cerr << "LADSPAPluginFactory::generateFallbackCategories: about to open " << (path[i] + "/" + dir[j]) << std::endl; if (file.open(IO_ReadOnly)) { // std::cerr << "...opened" << std::endl; - QTextStream stream(&file); - QString line; + TQTextStream stream(&file); + TQString line; while (!stream.eof()) { line = stream.readLine(); // std::cerr << "line is: \"" << line << "\"" << std::endl; - QString id = line.section("::", 0, 0); - QString cat = line.section("::", 1, 1); + TQString id = line.section("::", 0, 0); + TQString cat = line.section("::", 1, 1); m_fallbackCategories[id] = cat; // std::cerr << "set id \"" << id << "\" to cat \"" << cat << "\"" << std::endl; } @@ -810,7 +810,7 @@ LADSPAPluginFactory::generateFallbackCategories() } void -LADSPAPluginFactory::generateTaxonomy(QString uri, QString base) +LADSPAPluginFactory::generateTaxonomy(TQString uri, TQString base) { #ifdef HAVE_LIBLRDF lrdf_uris *uris = lrdf_get_instances(uri.data()); diff --git a/src/sound/LADSPAPluginFactory.h b/src/sound/LADSPAPluginFactory.h index a5ec368..8bcb80c 100644 --- a/src/sound/LADSPAPluginFactory.h +++ b/src/sound/LADSPAPluginFactory.h @@ -30,7 +30,7 @@ #include <vector> #include <map> #include <set> -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden { @@ -44,13 +44,13 @@ public: virtual void discoverPlugins(); - virtual const std::vector<QString> &getPluginIdentifiers() const; + virtual const std::vector<TQString> &getPluginIdentifiers() const; virtual void enumeratePlugins(MappedObjectPropertyList &list); - virtual void populatePluginSlot(QString identifier, MappedPluginSlot &slot); + virtual void populatePluginSlot(TQString identifier, MappedPluginSlot &slot); - virtual RunnablePluginInstance *instantiatePlugin(QString identifier, + virtual RunnablePluginInstance *instantiatePlugin(TQString identifier, int instrumentId, int position, unsigned int sampleRate, @@ -66,33 +66,33 @@ protected: LADSPAPluginFactory(); friend class PluginFactory; - virtual std::vector<QString> getPluginPath(); + virtual std::vector<TQString> getPluginPath(); #ifdef HAVE_LIBLRDF - virtual std::vector<QString> getLRDFPath(QString &baseUri); + virtual std::vector<TQString> getLRDFPath(TQString &baseUri); #endif - virtual void discoverPlugins(QString soName); - virtual void generateTaxonomy(QString uri, QString base); + virtual void discoverPlugins(TQString soName); + virtual void generateTaxonomy(TQString uri, TQString base); virtual void generateFallbackCategories(); - virtual void releasePlugin(RunnablePluginInstance *, QString); + virtual void releasePlugin(RunnablePluginInstance *, TQString); - virtual const LADSPA_Descriptor *getLADSPADescriptor(QString identifier); + virtual const LADSPA_Descriptor *getLADSPADescriptor(TQString identifier); - void loadLibrary(QString soName); - void unloadLibrary(QString soName); + void loadLibrary(TQString soName); + void unloadLibrary(TQString soName); void unloadUnusedLibraries(); - std::vector<QString> m_identifiers; + std::vector<TQString> m_identifiers; - std::map<unsigned long, QString> m_taxonomy; - std::map<QString, QString> m_fallbackCategories; + std::map<unsigned long, TQString> m_taxonomy; + std::map<TQString, TQString> m_fallbackCategories; std::map<unsigned long, std::map<int, float> > m_portDefaults; std::set<RunnablePluginInstance *> m_instances; - typedef std::map<QString, void *> LibraryHandleMap; + typedef std::map<TQString, void *> LibraryHandleMap; LibraryHandleMap m_libraryHandles; }; diff --git a/src/sound/LADSPAPluginInstance.cpp b/src/sound/LADSPAPluginInstance.cpp index e2b8890..fcf35a7 100644 --- a/src/sound/LADSPAPluginInstance.cpp +++ b/src/sound/LADSPAPluginInstance.cpp @@ -34,7 +34,7 @@ namespace Rosegarden LADSPAPluginInstance::LADSPAPluginInstance(PluginFactory *factory, InstrumentId instrument, - QString identifier, + TQString identifier, int position, unsigned long sampleRate, size_t blockSize, @@ -74,7 +74,7 @@ LADSPAPluginInstance::LADSPAPluginInstance(PluginFactory *factory, LADSPAPluginInstance::LADSPAPluginInstance(PluginFactory *factory, InstrumentId instrument, - QString identifier, + TQString identifier, int position, unsigned long sampleRate, size_t blockSize, diff --git a/src/sound/LADSPAPluginInstance.h b/src/sound/LADSPAPluginInstance.h index 9654cfb..54c8cf5 100644 --- a/src/sound/LADSPAPluginInstance.h +++ b/src/sound/LADSPAPluginInstance.h @@ -21,7 +21,7 @@ #include <vector> #include <set> -#include <qstring.h> +#include <tqstring.h> #include "Instrument.h" #ifndef _LADSPAPLUGININSTANCE_H_ @@ -47,7 +47,7 @@ public: virtual bool isOK() const { return m_instanceHandles.size() != 0; } InstrumentId getInstrument() const { return m_instrument; } - virtual QString getIdentifier() const { return m_identifier; } + virtual TQString getIdentifier() const { return m_identifier; } int getPosition() const { return m_position; } virtual void run(const RealTime &rt); @@ -77,7 +77,7 @@ protected: // LADSPAPluginInstance(PluginFactory *factory, InstrumentId instrument, - QString identifier, + TQString identifier, int position, unsigned long sampleRate, size_t blockSize, @@ -88,7 +88,7 @@ protected: // LADSPAPluginInstance(PluginFactory *factory, InstrumentId instrument, - QString identifier, + TQString identifier, int position, unsigned long sampleRate, size_t blockSize, diff --git a/src/sound/MappedCommon.h b/src/sound/MappedCommon.h index 5ef5487..0a793bc 100644 --- a/src/sound/MappedCommon.h +++ b/src/sound/MappedCommon.h @@ -28,17 +28,17 @@ // #include <vector> -#include <qstring.h> -#include <qdatastream.h> +#include <tqstring.h> +#include <tqdatastream.h> namespace Rosegarden { typedef int MappedObjectId; -typedef QString MappedObjectProperty; +typedef TQString MappedObjectProperty; typedef float MappedObjectValue; -// typedef QValueVector<MappedObjectProperty> MappedObjectPropertyList; +// typedef TQValueVector<MappedObjectProperty> MappedObjectPropertyList; // replaced with a std::vector<> for Qt2 compatibility typedef std::vector<MappedObjectId> MappedObjectIdList; @@ -54,14 +54,14 @@ typedef enum Duplex } PortDirection; -QDataStream& operator>>(QDataStream& s, MappedObjectIdList&); -QDataStream& operator<<(QDataStream&, const MappedObjectIdList&); +TQDataStream& operator>>(TQDataStream& s, MappedObjectIdList&); +TQDataStream& operator<<(TQDataStream&, const MappedObjectIdList&); -QDataStream& operator>>(QDataStream& s, MappedObjectPropertyList&); -QDataStream& operator<<(QDataStream&, const MappedObjectPropertyList&); +TQDataStream& operator>>(TQDataStream& s, MappedObjectPropertyList&); +TQDataStream& operator<<(TQDataStream&, const MappedObjectPropertyList&); -QDataStream& operator>>(QDataStream& s, MappedObjectValueList&); -QDataStream& operator<<(QDataStream&, const MappedObjectValueList&); +TQDataStream& operator>>(TQDataStream& s, MappedObjectValueList&); +TQDataStream& operator<<(TQDataStream&, const MappedObjectValueList&); } diff --git a/src/sound/MappedComposition.cpp b/src/sound/MappedComposition.cpp index 975fccf..a2537f0 100644 --- a/src/sound/MappedComposition.cpp +++ b/src/sound/MappedComposition.cpp @@ -19,7 +19,7 @@ COPYING included with this distribution for more information. */ -#include <qdatastream.h> +#include <tqdatastream.h> #include "MappedComposition.h" #include "MappedEvent.h" #include "SegmentPerformanceHelper.h" @@ -49,11 +49,11 @@ MappedComposition::MappedComposition(const MappedComposition &mC): } -// Turn a MappedComposition into a QDataStream - MappedEvents can +// Turn a MappedComposition into a TQDataStream - MappedEvents can // stream themselves. // -QDataStream& -operator<<(QDataStream &dS, MappedComposition *mC) +TQDataStream& +operator<<(TQDataStream &dS, MappedComposition *mC) { dS << int(mC->size()); @@ -64,8 +64,8 @@ operator<<(QDataStream &dS, MappedComposition *mC) } -QDataStream& -operator<<(QDataStream &dS, const MappedComposition &mC) +TQDataStream& +operator<<(TQDataStream &dS, const MappedComposition &mC) { dS << int(mC.size()); @@ -76,10 +76,10 @@ operator<<(QDataStream &dS, const MappedComposition &mC) } -// Turn a QDataStream into a MappedComposition +// Turn a TQDataStream into a MappedComposition // -QDataStream& -operator>>(QDataStream &dS, MappedComposition *mC) +TQDataStream& +operator>>(TQDataStream &dS, MappedComposition *mC) { int sliceSize; MappedEvent *mE; @@ -109,8 +109,8 @@ operator>>(QDataStream &dS, MappedComposition *mC) return dS; } -QDataStream& -operator>>(QDataStream &dS, MappedComposition &mC) +TQDataStream& +operator>>(TQDataStream &dS, MappedComposition &mC) { int sliceSize; MappedEvent *mE; diff --git a/src/sound/MappedComposition.h b/src/sound/MappedComposition.h index bfa7c05..a7e03fd 100644 --- a/src/sound/MappedComposition.h +++ b/src/sound/MappedComposition.h @@ -25,7 +25,7 @@ // MappedComposition is used with MappedEvent to create a sequence -// of MIDI ready events ready for playing. The QDataStream operators +// of MIDI ready events ready for playing. The TQDataStream operators // are a necessary part of the DCOP transmission process allowing // the whole class to be serialized. The core application is sent // a request specifying a time slice between given start and end @@ -36,7 +36,7 @@ #include <Composition.h> #include "MappedEvent.h" #include <set> -#include <qdatastream.h> +#include <tqdatastream.h> namespace Rosegarden { @@ -71,10 +71,10 @@ public: // This section is used for serialising this class over DCOP // // - friend QDataStream& operator>>(QDataStream &dS, MappedComposition *mC); - friend QDataStream& operator<<(QDataStream &dS, MappedComposition *mC); - friend QDataStream& operator>>(QDataStream &dS, MappedComposition &mC); - friend QDataStream& operator<<(QDataStream &dS, const MappedComposition &mC); + friend TQDataStream& operator>>(TQDataStream &dS, MappedComposition *mC); + friend TQDataStream& operator<<(TQDataStream &dS, MappedComposition *mC); + friend TQDataStream& operator>>(TQDataStream &dS, MappedComposition &mC); + friend TQDataStream& operator<<(TQDataStream &dS, const MappedComposition &mC); // Clear out void clear(); diff --git a/src/sound/MappedDevice.cpp b/src/sound/MappedDevice.cpp index 619be2a..e5a9dd8 100644 --- a/src/sound/MappedDevice.cpp +++ b/src/sound/MappedDevice.cpp @@ -110,8 +110,8 @@ MappedDevice::operator=(const MappedDevice &mD) } -QDataStream& -operator>>(QDataStream &dS, MappedDevice *mD) +TQDataStream& +operator>>(TQDataStream &dS, MappedDevice *mD) { int instruments = 0; dS >> instruments; @@ -123,9 +123,9 @@ operator>>(QDataStream &dS, MappedDevice *mD) instruments--; } - QString name; + TQString name; unsigned int id, dType; - QString connection; + TQString connection; unsigned int direction; unsigned int recording; @@ -154,8 +154,8 @@ operator>>(QDataStream &dS, MappedDevice *mD) } -QDataStream& -operator>>(QDataStream &dS, MappedDevice &mD) +TQDataStream& +operator>>(TQDataStream &dS, MappedDevice &mD) { int instruments; dS >> instruments; @@ -169,8 +169,8 @@ operator>>(QDataStream &dS, MappedDevice &mD) } unsigned int id, dType; - QString name; - QString connection; + TQString name; + TQString connection; unsigned int direction; unsigned int recording; @@ -198,8 +198,8 @@ operator>>(QDataStream &dS, MappedDevice &mD) return dS; } -QDataStream& -operator<<(QDataStream &dS, MappedDevice *mD) +TQDataStream& +operator<<(TQDataStream &dS, MappedDevice *mD) { dS << (int)mD->size(); @@ -208,8 +208,8 @@ operator<<(QDataStream &dS, MappedDevice *mD) dS << (unsigned int)(mD->getId()); dS << (int)(mD->getType()); - dS << QString(mD->getName().c_str()); - dS << QString(mD->getConnection().c_str()); + dS << TQString(mD->getName().c_str()); + dS << TQString(mD->getConnection().c_str()); dS << mD->getDirection(); dS << (unsigned int)(mD->isRecording()); @@ -222,8 +222,8 @@ operator<<(QDataStream &dS, MappedDevice *mD) return dS; } -QDataStream& -operator<<(QDataStream &dS, const MappedDevice &mD) +TQDataStream& +operator<<(TQDataStream &dS, const MappedDevice &mD) { dS << (int)mD.size(); @@ -232,8 +232,8 @@ operator<<(QDataStream &dS, const MappedDevice &mD) dS << (unsigned int)(mD.getId()); dS << (int)(mD.getType()); - dS << QString(mD.getName().c_str()); - dS << QString(mD.getConnection().c_str()); + dS << TQString(mD.getName().c_str()); + dS << TQString(mD.getConnection().c_str()); dS << mD.getDirection(); dS << (unsigned int)(mD.isRecording()); diff --git a/src/sound/MappedDevice.h b/src/sound/MappedDevice.h index f53bb37..654a7c5 100644 --- a/src/sound/MappedDevice.h +++ b/src/sound/MappedDevice.h @@ -22,7 +22,7 @@ #include <string> #include <vector> -#include <qdatastream.h> +#include <tqdatastream.h> #include "Device.h" #include "MidiDevice.h" @@ -58,10 +58,10 @@ public: MappedDevice& operator+(const MappedDevice &mD); MappedDevice& operator=(const MappedDevice &mD); - friend QDataStream& operator>>(QDataStream &dS, MappedDevice *mD); - friend QDataStream& operator<<(QDataStream &dS, MappedDevice *mD); - friend QDataStream& operator>>(QDataStream &dS, MappedDevice &mD); - friend QDataStream& operator<<(QDataStream &dS, const MappedDevice &mD); + friend TQDataStream& operator>>(TQDataStream &dS, MappedDevice *mD); + friend TQDataStream& operator<<(TQDataStream &dS, MappedDevice *mD); + friend TQDataStream& operator>>(TQDataStream &dS, MappedDevice &mD); + friend TQDataStream& operator<<(TQDataStream &dS, const MappedDevice &mD); std::string getName() const { return m_name; } void setName(const std::string &name) { m_name = name; } diff --git a/src/sound/MappedEvent.cpp b/src/sound/MappedEvent.cpp index 9b4ccab..4bae51e 100644 --- a/src/sound/MappedEvent.cpp +++ b/src/sound/MappedEvent.cpp @@ -19,9 +19,9 @@ COPYING included with this distribution for more information. */ -#include <qdir.h> -#include <qfile.h> -#include <qfileinfo.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqfileinfo.h> #include <kstddirs.h> @@ -181,8 +181,8 @@ MappedEvent::operator=(const MappedEvent &mE) // //const size_t MappedEvent::streamedSize = 12 * sizeof(unsigned int); -QDataStream& -operator<<(QDataStream &dS, MappedEvent *mE) +TQDataStream& +operator<<(TQDataStream &dS, MappedEvent *mE) { dS << (unsigned int)mE->getTrackId(); dS << (unsigned int)mE->getInstrument(); @@ -208,8 +208,8 @@ operator<<(QDataStream &dS, MappedEvent *mE) return dS; } -QDataStream& -operator<<(QDataStream &dS, const MappedEvent &mE) +TQDataStream& +operator<<(TQDataStream &dS, const MappedEvent &mE) { dS << (unsigned int)mE.getTrackId(); dS << (unsigned int)mE.getInstrument(); @@ -235,8 +235,8 @@ operator<<(QDataStream &dS, const MappedEvent &mE) return dS; } -QDataStream& -operator>>(QDataStream &dS, MappedEvent *mE) +TQDataStream& +operator>>(TQDataStream &dS, MappedEvent *mE) { unsigned int trackId = 0, instrument = 0, type = 0, data1 = 0, data2 = 0; long eventTimeSec = 0, eventTimeNsec = 0, durationSec = 0, durationNsec = 0, @@ -288,8 +288,8 @@ operator>>(QDataStream &dS, MappedEvent *mE) return dS; } -QDataStream& -operator>>(QDataStream &dS, MappedEvent &mE) +TQDataStream& +operator>>(TQDataStream &dS, MappedEvent &mE) { unsigned int trackId = 0, instrument = 0, type = 0, data1 = 0, data2 = 0; long eventTimeSec = 0, eventTimeNsec = 0, durationSec = 0, durationNsec = 0, @@ -363,7 +363,7 @@ public: DataBlockFile(DataBlockRepository::blockid id); ~DataBlockFile(); - QString getFileName() + TQString getFileName() { return m_fileName; } @@ -384,13 +384,13 @@ protected: void prepareToRead(); //--------------- Data members --------------------------------- - QString m_fileName; - QFile m_file; + TQString m_fileName; + TQFile m_file; bool m_cleared; }; DataBlockFile::DataBlockFile(DataBlockRepository::blockid id) - : m_fileName(KGlobal::dirs()->resourceDirs("tmp").first() + QString("/rosegarden_datablock_%1").arg(id)), + : m_fileName(KGlobal::dirs()->resourceDirs("tmp").first() + TQString("/rosegarden_datablock_%1").arg(id)), m_file(m_fileName), m_cleared(false) { @@ -401,7 +401,7 @@ DataBlockFile::~DataBlockFile() { if (m_cleared) { // std::cerr << "~DataBlockFile : removing " << m_fileName.latin1() << std::endl; - QFile::remove + TQFile::remove (m_fileName); } @@ -409,7 +409,7 @@ DataBlockFile::~DataBlockFile() bool DataBlockFile::exists() { - return QFile::exists(m_fileName); + return TQFile::exists(m_fileName); } void DataBlockFile::setData(const std::string& s) @@ -417,7 +417,7 @@ void DataBlockFile::setData(const std::string& s) // std::cerr << "DataBlockFile::setData() : setting data to " << m_fileName << std::endl; prepareToWrite(); - QDataStream stream(&m_file); + TQDataStream stream(&m_file); stream.writeRawBytes(s.data(), s.length()); } @@ -428,7 +428,7 @@ std::string DataBlockFile::getData() prepareToRead(); - QDataStream stream(&m_file); + TQDataStream stream(&m_file); // std::cerr << "DataBlockFile::getData() : file size = " << m_file.size() << std::endl; char* tmp = new char[m_file.size()]; stream.readRawBytes(tmp, m_file.size()); @@ -447,7 +447,7 @@ void DataBlockFile::addDataByte(MidiByte byte) void DataBlockFile::addDataString(const std::string& s) { prepareToWrite(); - QDataStream stream(&m_file); + TQDataStream stream(&m_file); stream.writeRawBytes(s.data(), s.length()); } @@ -564,12 +564,12 @@ void DataBlockRepository::clear() // Erase all 'datablock_*' files // - QString tmpPath = KGlobal::dirs()->resourceDirs("tmp").first(); + TQString tmpPath = KGlobal::dirs()->resourceDirs("tmp").first(); - QDir segmentsDir(tmpPath, "rosegarden_datablock_*"); + TQDir segmentsDir(tmpPath, "rosegarden_datablock_*"); for (unsigned int i = 0; i < segmentsDir.count(); ++i) { - QString segmentName = tmpPath + '/' + segmentsDir[i]; - QFile::remove + TQString segmentName = tmpPath + '/' + segmentsDir[i]; + TQFile::remove (segmentName); } } diff --git a/src/sound/MappedEvent.h b/src/sound/MappedEvent.h index cc4e3f3..f5151b2 100644 --- a/src/sound/MappedEvent.h +++ b/src/sound/MappedEvent.h @@ -19,7 +19,7 @@ COPYING included with this distribution for more information. */ -#include <qdatastream.h> +#include <tqdatastream.h> #include "Composition.h" // for RealTime #include "Event.h" @@ -459,10 +459,10 @@ public: MappedEvent& operator=(const MappedEvent &mE); - friend QDataStream& operator>>(QDataStream &dS, MappedEvent *mE); - friend QDataStream& operator<<(QDataStream &dS, MappedEvent *mE); - friend QDataStream& operator>>(QDataStream &dS, MappedEvent &mE); - friend QDataStream& operator<<(QDataStream &dS, const MappedEvent &mE); + friend TQDataStream& operator>>(TQDataStream &dS, MappedEvent *mE); + friend TQDataStream& operator<<(TQDataStream &dS, MappedEvent *mE); + friend TQDataStream& operator>>(TQDataStream &dS, MappedEvent &mE); + friend TQDataStream& operator<<(TQDataStream &dS, const MappedEvent &mE); /// Add a single byte to the event's datablock (for SysExs) void addDataByte(MidiByte byte); diff --git a/src/sound/MappedInstrument.cpp b/src/sound/MappedInstrument.cpp index b353f78..a3c366f 100644 --- a/src/sound/MappedInstrument.cpp +++ b/src/sound/MappedInstrument.cpp @@ -74,11 +74,11 @@ MappedInstrument::MappedInstrument(Instrument *instr): m_audioChannels(instr->getAudioChannels()) {} -QDataStream& -operator>>(QDataStream &dS, MappedInstrument *mI) +TQDataStream& +operator>>(TQDataStream &dS, MappedInstrument *mI) { unsigned int type, channel, id, device, audioChannels; - QString name; + TQString name; dS >> type; dS >> channel; @@ -97,11 +97,11 @@ operator>>(QDataStream &dS, MappedInstrument *mI) return dS; } -QDataStream& -operator>>(QDataStream &dS, MappedInstrument &mI) +TQDataStream& +operator>>(TQDataStream &dS, MappedInstrument &mI) { unsigned int type, channel, id, device, audioChannels; - QString name; + TQString name; dS >> type; dS >> channel; @@ -120,14 +120,14 @@ operator>>(QDataStream &dS, MappedInstrument &mI) return dS; } -QDataStream& -operator<<(QDataStream &dS, MappedInstrument *mI) +TQDataStream& +operator<<(TQDataStream &dS, MappedInstrument *mI) { dS << (unsigned int)mI->getType(); dS << (unsigned int)mI->getChannel(); dS << (unsigned int)mI->getId(); ; - dS << QString(mI->getName().c_str()); + dS << TQString(mI->getName().c_str()); dS << (unsigned int)mI->getDevice(); dS << (unsigned int)mI->getAudioChannels(); @@ -135,14 +135,14 @@ operator<<(QDataStream &dS, MappedInstrument *mI) } -QDataStream& -operator<<(QDataStream &dS, const MappedInstrument &mI) +TQDataStream& +operator<<(TQDataStream &dS, const MappedInstrument &mI) { dS << (unsigned int)mI.getType(); dS << (unsigned int)mI.getChannel(); dS << (unsigned int)mI.getId(); ; - dS << QString(mI.getName().c_str()); + dS << TQString(mI.getName().c_str()); dS << (unsigned int)mI.getDevice(); dS << (unsigned int)mI.getAudioChannels(); diff --git a/src/sound/MappedInstrument.h b/src/sound/MappedInstrument.h index 49f0167..fc6d5e1 100644 --- a/src/sound/MappedInstrument.h +++ b/src/sound/MappedInstrument.h @@ -82,10 +82,10 @@ public: unsigned int getAudioChannels() const { return m_audioChannels; } void setAudioChannels(unsigned int channels) { m_audioChannels = channels; } - friend QDataStream& operator>>(QDataStream &dS, MappedInstrument *mI); - friend QDataStream& operator<<(QDataStream &dS, MappedInstrument *mI); - friend QDataStream& operator>>(QDataStream &dS, MappedInstrument &mI); - friend QDataStream& operator<<(QDataStream &dS, const MappedInstrument &mI); + friend TQDataStream& operator>>(TQDataStream &dS, MappedInstrument *mI); + friend TQDataStream& operator<<(TQDataStream &dS, MappedInstrument *mI); + friend TQDataStream& operator>>(TQDataStream &dS, MappedInstrument &mI); + friend TQDataStream& operator<<(TQDataStream &dS, const MappedInstrument &mI); private: diff --git a/src/sound/MappedRealTime.cpp b/src/sound/MappedRealTime.cpp index ba596fd..ec328d9 100644 --- a/src/sound/MappedRealTime.cpp +++ b/src/sound/MappedRealTime.cpp @@ -24,24 +24,24 @@ namespace Rosegarden { -QDataStream& -operator>>(QDataStream &dS, MappedRealTime *mRT) +TQDataStream& +operator>>(TQDataStream &dS, MappedRealTime *mRT) { dS >> mRT->sec; dS >> mRT->nsec; return dS; } -QDataStream& -operator<<(QDataStream &dS, MappedRealTime *mRT) +TQDataStream& +operator<<(TQDataStream &dS, MappedRealTime *mRT) { dS << mRT->sec; dS << mRT->nsec; return dS; } -QDataStream& -operator>>(QDataStream &dS, MappedRealTime &mRT) +TQDataStream& +operator>>(TQDataStream &dS, MappedRealTime &mRT) { dS >> mRT.sec; dS >> mRT.nsec; @@ -49,8 +49,8 @@ operator>>(QDataStream &dS, MappedRealTime &mRT) } -QDataStream& -operator<<(QDataStream &dS, const MappedRealTime &mRT) +TQDataStream& +operator<<(TQDataStream &dS, const MappedRealTime &mRT) { dS << mRT.sec; dS << mRT.nsec; diff --git a/src/sound/MappedRealTime.h b/src/sound/MappedRealTime.h index ca2afd0..f88b1c4 100644 --- a/src/sound/MappedRealTime.h +++ b/src/sound/MappedRealTime.h @@ -19,7 +19,7 @@ COPYING included with this distribution for more information. */ -#include <qdatastream.h> +#include <tqdatastream.h> #include "RealTime.h" // Just a DCOP wrapper to RealTime @@ -42,10 +42,10 @@ public: // DCOP datastream // - friend QDataStream& operator>>(QDataStream &dS, MappedRealTime *mRT); - friend QDataStream& operator<<(QDataStream &dS, MappedRealTime *mRT); - friend QDataStream& operator>>(QDataStream &dS, MappedRealTime &mRT); - friend QDataStream& operator<<(QDataStream &dS, const MappedRealTime &mRT); + friend TQDataStream& operator>>(TQDataStream &dS, MappedRealTime *mRT); + friend TQDataStream& operator<<(TQDataStream &dS, MappedRealTime *mRT); + friend TQDataStream& operator>>(TQDataStream &dS, MappedRealTime &mRT); + friend TQDataStream& operator<<(TQDataStream &dS, const MappedRealTime &mRT); }; diff --git a/src/sound/MappedStudio.cpp b/src/sound/MappedStudio.cpp index 4b35122..b72550b 100644 --- a/src/sound/MappedStudio.cpp +++ b/src/sound/MappedStudio.cpp @@ -59,11 +59,11 @@ static inline void releaseLock(const char *file, int line) #define GET_LOCK getLock(__FILE__,__LINE__) #define RELEASE_LOCK releaseLock(__FILE__,__LINE__) -// These stream functions are stolen and adapted from Qt3 qvaluevector.h +// These stream functions are stolen and adapted from Qt3 tqvaluevector.h // // ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. // -QDataStream& operator>>(QDataStream& s, MappedObjectIdList& v) +TQDataStream& operator>>(TQDataStream& s, MappedObjectIdList& v) { v.clear(); Q_UINT32 c; @@ -77,7 +77,7 @@ QDataStream& operator>>(QDataStream& s, MappedObjectIdList& v) return s; } -QDataStream& operator<<(QDataStream& s, const MappedObjectIdList& v) +TQDataStream& operator<<(TQDataStream& s, const MappedObjectIdList& v) { s << (Q_UINT32)v.size(); MappedObjectIdList::const_iterator it = v.begin(); @@ -86,7 +86,7 @@ QDataStream& operator<<(QDataStream& s, const MappedObjectIdList& v) return s; } -QDataStream& operator>>(QDataStream& s, MappedObjectPropertyList& v) +TQDataStream& operator>>(TQDataStream& s, MappedObjectPropertyList& v) { v.clear(); Q_UINT32 c; @@ -100,7 +100,7 @@ QDataStream& operator>>(QDataStream& s, MappedObjectPropertyList& v) return s; } -QDataStream& operator<<(QDataStream& s, const MappedObjectPropertyList& v) +TQDataStream& operator<<(TQDataStream& s, const MappedObjectPropertyList& v) { s << (Q_UINT32)v.size(); MappedObjectPropertyList::const_iterator it = v.begin(); @@ -109,7 +109,7 @@ QDataStream& operator<<(QDataStream& s, const MappedObjectPropertyList& v) return s; } -QDataStream& operator>>(QDataStream& s, MappedObjectValueList& v) +TQDataStream& operator>>(TQDataStream& s, MappedObjectValueList& v) { v.clear(); Q_UINT32 c; @@ -123,7 +123,7 @@ QDataStream& operator>>(QDataStream& s, MappedObjectValueList& v) return s; } -QDataStream& operator<<(QDataStream& s, const MappedObjectValueList& v) +TQDataStream& operator<<(TQDataStream& s, const MappedObjectValueList& v) { s << (Q_UINT32)v.size(); MappedObjectValueList::const_iterator it = v.begin(); @@ -213,7 +213,7 @@ MappedObject::getChildren() MappedObjectPropertyList list; std::vector<MappedObject*>::iterator it = m_children.begin(); for (; it != m_children.end(); it++) - list.push_back(QString("%1").arg((*it)->getId())); + list.push_back(TQString("%1").arg((*it)->getId())); return list; } @@ -228,7 +228,7 @@ MappedObject::getChildren(MappedObjectType type) std::vector<MappedObject*>::iterator it = m_children.begin(); for (; it != m_children.end(); it++) { if ((*it)->getType() == type) - list.push_back(QString("%1").arg((*it)->getId())); + list.push_back(TQString("%1").arg((*it)->getId())); } return list; @@ -891,14 +891,14 @@ MappedAudioFader::getPropertyList(const MappedObjectProperty &property) it = m_connectionsIn.begin(); for ( ; it != m_connectionsIn.end(); ++it) { - list.push_back(QString("%1").arg(*it)); + list.push_back(TQString("%1").arg(*it)); } } else if (property == MappedConnectableObject::ConnectionsOut) { MappedObjectValueList::const_iterator it = m_connectionsOut.begin(); for ( ; it != m_connectionsOut.end(); ++it) { - list.push_back(QString("%1").arg(*it)); + list.push_back(TQString("%1").arg(*it)); } } @@ -1021,14 +1021,14 @@ MappedAudioBuss::getPropertyList(const MappedObjectProperty &property) it = m_connectionsIn.begin(); for ( ; it != m_connectionsIn.end(); ++it) { - list.push_back(QString("%1").arg(*it)); + list.push_back(TQString("%1").arg(*it)); } } else if (property == MappedConnectableObject::ConnectionsOut) { MappedObjectValueList::const_iterator it = m_connectionsOut.begin(); for ( ; it != m_connectionsOut.end(); ++it) { - list.push_back(QString("%1").arg(*it)); + list.push_back(TQString("%1").arg(*it)); } } @@ -1246,7 +1246,7 @@ MappedPluginSlot::getPropertyList(const MappedObjectProperty &property) dynamic_cast<MappedStudio*>(getParent()); if (studio) { - QStringList programs = + TQStringList programs = studio->getSoundDriver()->getPluginInstancePrograms(m_instrument, m_position); @@ -1288,7 +1288,7 @@ MappedPluginSlot::getProperty(const MappedObjectProperty &property, bool MappedPluginSlot::getProperty(const MappedObjectProperty &property, - QString &value) + TQString &value) { if (property == Identifier) { value = m_identifier; @@ -1336,11 +1336,11 @@ MappedPluginSlot::getProgram(int bank, int program) program); } - return QString(); + return TQString(); } unsigned long -MappedPluginSlot::getProgram(QString name) +MappedPluginSlot::getProgram(TQString name) { MappedStudio *studio = dynamic_cast<MappedStudio*>(getParent()); @@ -1381,7 +1381,7 @@ MappedPluginSlot::setProperty(const MappedObjectProperty &property, void MappedPluginSlot::setProperty(const MappedObjectProperty &property, - QString value) + TQString value) { if (property == Identifier) { @@ -1472,8 +1472,8 @@ MappedPluginSlot::setPropertyList(const MappedObjectProperty &property, for (MappedObjectPropertyList::const_iterator i = values.begin(); i != values.end(); ++i) { - QString key = *i; - QString value = *++i; + TQString key = *i; + TQString value = *++i; #ifdef DEBUG_MAPPEDSTUDIO @@ -1485,7 +1485,7 @@ MappedPluginSlot::setPropertyList(const MappedObjectProperty &property, continue; if (studio) { - QString rv = + TQString rv = studio->getSoundDriver()->configurePlugin(m_instrument, m_position, key, value); @@ -1500,8 +1500,8 @@ MappedPluginSlot::setPropertyList(const MappedObjectProperty &property, for (MappedObjectPropertyList::const_iterator i = values.begin(); i != values.end(); ++i) { - QString key = *i; - QString value = *++i; + TQString key = *i; + TQString value = *++i; m_configuration[key] = value; } @@ -1605,7 +1605,7 @@ MappedPluginPort::getProperty(const MappedObjectProperty &property, bool MappedPluginPort::getProperty(const MappedObjectProperty &property, - QString &value) + TQString &value) { if (property == Name) { value = m_name; @@ -1698,7 +1698,7 @@ MappedPluginPort::setProperty(const MappedObjectProperty &property, void MappedPluginPort::setProperty(const MappedObjectProperty &property, - QString value) + TQString value) { if (property == Name) { m_name = value; diff --git a/src/sound/MappedStudio.h b/src/sound/MappedStudio.h index 0896e6b..89acc9b 100644 --- a/src/sound/MappedStudio.h +++ b/src/sound/MappedStudio.h @@ -22,8 +22,8 @@ #include <map> #include <string> #include <vector> -#include <qdatastream.h> -#include <qstring.h> +#include <tqdatastream.h> +#include <tqstring.h> #include "MappedCommon.h" #include "Instrument.h" @@ -99,7 +99,7 @@ public: // Only relevant to objects that have string properties // virtual bool getProperty(const MappedObjectProperty &/* property */, - QString &/* value */) { return false; } + TQString &/* value */) { return false; } virtual void setProperty(const MappedObjectProperty &property, MappedObjectValue value) = 0; @@ -107,7 +107,7 @@ public: // Only relevant to objects that have string properties // virtual void setProperty(const MappedObjectProperty &/* property */, - QString /* value */) { } + TQString /* value */) { } // Only relevant to objects that have list properties // @@ -237,10 +237,10 @@ public: // DCOP streaming // /* dunno if we need this - friend QDataStream& operator>>(QDataStream &dS, MappedStudio *mS); - friend QDataStream& operator<<(QDataStream &dS, MappedStudio *mS); - friend QDataStream& operator>>(QDataStream &dS, MappedStudio &mS); - friend QDataStream& operator<<(QDataStream &dS, const MappedStudio &mS); + friend TQDataStream& operator>>(TQDataStream &dS, MappedStudio *mS); + friend TQDataStream& operator<<(TQDataStream &dS, MappedStudio *mS); + friend TQDataStream& operator>>(TQDataStream &dS, MappedStudio &mS); + friend TQDataStream& operator<<(TQDataStream &dS, const MappedStudio &mS); */ @@ -465,13 +465,13 @@ public: MappedObjectValue &value); virtual bool getProperty(const MappedObjectProperty &property, - QString &value); + TQString &value); virtual void setProperty(const MappedObjectProperty &property, MappedObjectValue value); virtual void setProperty(const MappedObjectProperty &property, - QString value); + TQString value); virtual void setPropertyList(const MappedObjectProperty &, const MappedObjectPropertyList &); @@ -482,24 +482,24 @@ public: InstrumentId getInstrument() const { return m_instrument; } int getPosition() const { return m_position; } - QString getProgram(int bank, int program); - unsigned long getProgram(QString name); // rv is bank << 16 + program + TQString getProgram(int bank, int program); + unsigned long getProgram(TQString name); // rv is bank << 16 + program protected: - QString m_identifier; + TQString m_identifier; - QString m_name; - QString m_label; - QString m_author; - QString m_copyright; - QString m_category; + TQString m_name; + TQString m_label; + TQString m_author; + TQString m_copyright; + TQString m_category; unsigned long m_portCount; InstrumentId m_instrument; int m_position; bool m_bypassed; - std::map<QString, QString> m_configuration; + std::map<TQString, TQString> m_configuration; }; class MappedPluginPort : public MappedObject @@ -523,13 +523,13 @@ public: MappedObjectValue &value); virtual bool getProperty(const MappedObjectProperty &property, - QString &value); + TQString &value); virtual void setProperty(const MappedObjectProperty &property, MappedObjectValue value); virtual void setProperty(const MappedObjectProperty &property, - QString value); + TQString value); void setValue(MappedObjectValue value); MappedObjectValue getValue() const; @@ -538,7 +538,7 @@ public: protected: int m_portNumber; - QString m_name; + TQString m_name; MappedObjectValue m_minimum; MappedObjectValue m_maximum; MappedObjectValue m_default; diff --git a/src/sound/MidiFile.h b/src/sound/MidiFile.h index da97374..7efeb28 100644 --- a/src/sound/MidiFile.h +++ b/src/sound/MidiFile.h @@ -27,7 +27,7 @@ #include <list> #include <map> -#include <qobject.h> +#include <tqobject.h> #include "Midi.h" #include "MidiEvent.h" @@ -63,7 +63,7 @@ typedef std::map<unsigned int, MidiTrack> MidiComposition; class Studio; -class MidiFile : public QObject, public SoundFile +class MidiFile : public TQObject, public SoundFile { Q_OBJECT public: diff --git a/src/sound/PeakFile.cpp b/src/sound/PeakFile.cpp index 8881114..3c306db 100644 --- a/src/sound/PeakFile.cpp +++ b/src/sound/PeakFile.cpp @@ -22,9 +22,9 @@ #include <cstdlib> #include <kapplication.h> -#include <qdatetime.h> -#include <qstringlist.h> -#include <qpalette.h> +#include <tqdatetime.h> +#include <tqstringlist.h> +#include <tqpalette.h> #include <kapp.h> #include "PeakFile.h" @@ -57,7 +57,7 @@ PeakFile::PeakFile(AudioFile *audioFile): m_numberOfPeaks(0), m_positionPeakOfPeaks(0), m_offsetToPeaks(0), - m_modificationTime(QDate(1970, 1, 1), QTime(0, 0, 0)), + m_modificationTime(TQDate(1970, 1, 1), TQTime(0, 0, 0)), m_chunkStartPosition(0), m_lastPreviewStartTime(0, 0), m_lastPreviewEndTime(0, 0), @@ -73,7 +73,7 @@ PeakFile::open() { // Set the file size // - QFileInfo info(QString(m_fileName.c_str())); + TQFileInfo info(TQString(m_fileName.c_str())); m_fileSize = info.size(); // If we're already open then don't open again @@ -148,15 +148,15 @@ PeakFile::parseHeader() // Read in date string and convert it up to QDateTime // - QString dateString = QString(header.substr(40, 28).c_str()); + TQString dateString = TQString(header.substr(40, 28).c_str()); - QStringList dateTime = QStringList::split(":", dateString); + TQStringList dateTime = TQStringList::split(":", dateString); - m_modificationTime.setDate(QDate(dateTime[0].toInt(), + m_modificationTime.setDate(TQDate(dateTime[0].toInt(), dateTime[1].toInt(), dateTime[2].toInt())); - m_modificationTime.setTime(QTime(dateTime[3].toInt(), + m_modificationTime.setTime(TQTime(dateTime[3].toInt(), dateTime[4].toInt(), dateTime[5].toInt(), dateTime[6].toInt())); @@ -288,7 +288,7 @@ PeakFile::close() // m_modificationTime = m_modificationTime.currentDateTime(); - QString fDate; + TQString fDate; fDate.sprintf("%04d:%02d:%02d:%02d:%02d:%02d:%03d", m_modificationTime.date().year(), m_modificationTime.date().month(), diff --git a/src/sound/PeakFile.h b/src/sound/PeakFile.h index 26ef71c..ce1aeac 100644 --- a/src/sound/PeakFile.h +++ b/src/sound/PeakFile.h @@ -20,8 +20,8 @@ #include <vector> -#include <qobject.h> -#include <qdatetime.h> +#include <tqobject.h> +#include <tqdatetime.h> #include "SoundFile.h" #include "RealTime.h" @@ -51,7 +51,7 @@ class AudioFile; typedef std::pair<RealTime, RealTime> SplitPointPair; -class PeakFile : public QObject, public SoundFile +class PeakFile : public TQObject, public SoundFile { Q_OBJECT @@ -121,7 +121,7 @@ public: int getPositionPeakOfPeaks() const { return m_positionPeakOfPeaks; } int getOffsetToPeaks() const { return m_offsetToPeaks; } int getBodyBytes() const { return m_bodyBytes; } - QDateTime getModificationTime() const { return m_modificationTime; } + TQDateTime getModificationTime() const { return m_modificationTime; } std::streampos getChunkStartPosition() const { return m_chunkStartPosition; } @@ -166,7 +166,7 @@ protected: // Peak timestamp // - QDateTime m_modificationTime; + TQDateTime m_modificationTime; std::streampos m_chunkStartPosition; diff --git a/src/sound/PeakFileManager.cpp b/src/sound/PeakFileManager.cpp index 10293e6..e860e00 100644 --- a/src/sound/PeakFileManager.cpp +++ b/src/sound/PeakFileManager.cpp @@ -32,7 +32,7 @@ #include <string> #include <vector> -#include <qobject.h> +#include <tqobject.h> #include "PeakFileManager.h" #include "AudioFile.h" @@ -178,8 +178,8 @@ PeakFileManager::generatePeaks(AudioFile *audioFile, if (audioFile->getType() == WAV) { m_currentPeakFile = getPeakFile(audioFile); - QObject::connect(m_currentPeakFile, SIGNAL(setProgress(int)), - this, SIGNAL(setProgress(int))); + TQObject::connect(m_currentPeakFile, TQT_SIGNAL(setProgress(int)), + this, TQT_SIGNAL(setProgress(int))); // Just write out a peak file // @@ -299,11 +299,11 @@ PeakFileManager::stopPreview() if (m_currentPeakFile) { // Stop processing // - QString fileName = QString(m_currentPeakFile->getFilename().data()); + TQString fileName = TQString(m_currentPeakFile->getFilename().data()); m_currentPeakFile->setProcessingPeaks(false); m_currentPeakFile->disconnect(); - QFile file(fileName); + TQFile file(fileName); bool removed = file.remove(); #ifdef DEBUG_PEAKFILEMANAGER diff --git a/src/sound/PeakFileManager.h b/src/sound/PeakFileManager.h index 07ff704..40e6d95 100644 --- a/src/sound/PeakFileManager.h +++ b/src/sound/PeakFileManager.h @@ -35,7 +35,7 @@ #include <fstream> #include <vector> -#include <qobject.h> +#include <tqobject.h> #include "PeakFile.h" diff --git a/src/sound/PluginFactory.cpp b/src/sound/PluginFactory.cpp index 49c1014..173fdee 100644 --- a/src/sound/PluginFactory.cpp +++ b/src/sound/PluginFactory.cpp @@ -46,7 +46,7 @@ static LADSPAPluginFactory *_dssiInstance = 0; #endif PluginFactory * -PluginFactory::instance(QString pluginType) +PluginFactory::instance(TQString pluginType) { if (pluginType == "ladspa") { #ifdef HAVE_LADSPA @@ -82,9 +82,9 @@ PluginFactory::instance(QString pluginType) } PluginFactory * -PluginFactory::instanceFor(QString identifier) +PluginFactory::instanceFor(TQString identifier) { - QString type, soName, label; + TQString type, soName, label; PluginIdentifier::parseIdentifier(identifier, type, soName, label); return instance(type); } diff --git a/src/sound/PluginFactory.h b/src/sound/PluginFactory.h index 820b233..6f93729 100644 --- a/src/sound/PluginFactory.h +++ b/src/sound/PluginFactory.h @@ -22,7 +22,7 @@ #ifndef _PLUGIN_FACTORY_H_ #define _PLUGIN_FACTORY_H_ -#include <qstring.h> +#include <tqstring.h> #include <vector> #include "MappedCommon.h" @@ -36,8 +36,8 @@ class MappedPluginSlot; class PluginFactory { public: - static PluginFactory *instance(QString pluginType); - static PluginFactory *instanceFor(QString identifier); + static PluginFactory *instance(TQString pluginType); + static PluginFactory *instanceFor(TQString identifier); static void enumerateAllPlugins(MappedObjectPropertyList &); static void setSampleRate(int sampleRate) { m_sampleRate = sampleRate; } @@ -52,7 +52,7 @@ public: * Return a reference to a list of all plugin identifiers that can * be created by this factory. */ - virtual const std::vector<QString> &getPluginIdentifiers() const = 0; + virtual const std::vector<TQString> &getPluginIdentifiers() const = 0; /** * Append to the given list descriptions of all the available @@ -68,13 +68,13 @@ public: * method should also destroy and recreate the plugin slot's * port child objects. */ - virtual void populatePluginSlot(QString identifier, + virtual void populatePluginSlot(TQString identifier, MappedPluginSlot &slot) = 0; /** * Instantiate a plugin. */ - virtual RunnablePluginInstance *instantiatePlugin(QString identifier, + virtual RunnablePluginInstance *instantiatePlugin(TQString identifier, int instrumentId, int position, unsigned int sampleRate, @@ -85,7 +85,7 @@ protected: PluginFactory() { } // for call by RunnablePluginInstance dtor - virtual void releasePlugin(RunnablePluginInstance *, QString identifier) = 0; + virtual void releasePlugin(RunnablePluginInstance *, TQString identifier) = 0; friend class RunnablePluginInstance; static int m_sampleRate; diff --git a/src/sound/PluginIdentifier.cpp b/src/sound/PluginIdentifier.cpp index 25b3317..bd2f96c 100644 --- a/src/sound/PluginIdentifier.cpp +++ b/src/sound/PluginIdentifier.cpp @@ -26,19 +26,19 @@ namespace Rosegarden { QString -PluginIdentifier::createIdentifier(QString type, - QString soName, - QString label) +PluginIdentifier::createIdentifier(TQString type, + TQString soName, + TQString label) { - QString identifier = type + ":" + soName + ":" + label; + TQString identifier = type + ":" + soName + ":" + label; return identifier; } void -PluginIdentifier::parseIdentifier(QString identifier, - QString &type, - QString &soName, - QString &label) +PluginIdentifier::parseIdentifier(TQString identifier, + TQString &type, + TQString &soName, + TQString &label) { type = identifier.section(':', 0, 0); soName = identifier.section(':', 1, 1); @@ -46,9 +46,9 @@ PluginIdentifier::parseIdentifier(QString identifier, } bool -PluginIdentifier::areIdentifiersSimilar(QString id1, QString id2) +PluginIdentifier::areIdentifiersSimilar(TQString id1, TQString id2) { - QString type1, type2, soName1, soName2, label1, label2; + TQString type1, type2, soName1, soName2, label1, label2; parseIdentifier(id1, type1, soName1, label1); parseIdentifier(id2, type2, soName2, label2); diff --git a/src/sound/PluginIdentifier.h b/src/sound/PluginIdentifier.h index e8519ad..efb280c 100644 --- a/src/sound/PluginIdentifier.h +++ b/src/sound/PluginIdentifier.h @@ -22,7 +22,7 @@ #ifndef _PLUGIN_IDENTIFIER_H_ #define _PLUGIN_IDENTIFIER_H_ -#include <qstring.h> +#include <tqstring.h> // A plugin identifier is simply a string; this class provides methods @@ -34,15 +34,15 @@ class PluginIdentifier { public: - static QString createIdentifier(QString type, QString soName, QString label); + static TQString createIdentifier(TQString type, TQString soName, TQString label); - static void parseIdentifier(QString identifier, - QString &type, QString &soName, QString &label); + static void parseIdentifier(TQString identifier, + TQString &type, TQString &soName, TQString &label); - static bool areIdentifiersSimilar(QString id1, QString id2); + static bool areIdentifiersSimilar(TQString id1, TQString id2); // Not strictly related to identifiers - static QString RESERVED_PROJECT_DIRECTORY_KEY; + static TQString RESERVED_PROJECT_DIRECTORY_KEY; }; } diff --git a/src/sound/RunnablePluginInstance.h b/src/sound/RunnablePluginInstance.h index f15f146..df07cf0 100644 --- a/src/sound/RunnablePluginInstance.h +++ b/src/sound/RunnablePluginInstance.h @@ -22,8 +22,8 @@ #ifndef _RUNNABLE_PLUGIN_INSTANCE_H_ #define _RUNNABLE_PLUGIN_INSTANCE_H_ -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <vector> #include "RealTime.h" @@ -54,7 +54,7 @@ public: virtual bool isOK() const = 0; - virtual QString getIdentifier() const = 0; + virtual TQString getIdentifier() const = 0; /** * Run for one block, starting at the given time. The start time @@ -71,16 +71,16 @@ public: virtual sample_t **getAudioInputBuffers() = 0; virtual sample_t **getAudioOutputBuffers() = 0; - virtual QStringList getPrograms() { return QStringList(); } - virtual QString getCurrentProgram() { return QString(); } - virtual QString getProgram(int /* bank */, int /* program */) { return QString(); } - virtual unsigned long getProgram(QString /* name */) { return 0; } // bank << 16 + program - virtual void selectProgram(QString) { } + virtual TQStringList getPrograms() { return TQStringList(); } + virtual TQString getCurrentProgram() { return TQString(); } + virtual TQString getProgram(int /* bank */, int /* program */) { return TQString(); } + virtual unsigned long getProgram(TQString /* name */) { return 0; } // bank << 16 + program + virtual void selectProgram(TQString) { } virtual void setPortValue(unsigned int port, float value) = 0; virtual float getPortValue(unsigned int port) = 0; - virtual QString configure(QString /* key */, QString /* value */) { return QString(); } + virtual TQString configure(TQString /* key */, TQString /* value */) { return TQString(); } virtual void sendEvent(const RealTime & /* eventTime */, const void * /* event */) { } @@ -98,11 +98,11 @@ public: void setFactory(PluginFactory *f) { m_factory = f; } // ew protected: - RunnablePluginInstance(PluginFactory *factory, QString identifier) : + RunnablePluginInstance(PluginFactory *factory, TQString identifier) : m_factory(factory), m_identifier(identifier) { } PluginFactory *m_factory; - QString m_identifier; + TQString m_identifier; friend class PluginFactory; }; diff --git a/src/sound/SoundDriver.h b/src/sound/SoundDriver.h index fabbaef..74bd966 100644 --- a/src/sound/SoundDriver.h +++ b/src/sound/SoundDriver.h @@ -21,7 +21,7 @@ #include <string> #include <vector> #include <list> -#include <qstringlist.h> +#include <tqstringlist.h> #include "Device.h" #include "MappedComposition.h" @@ -181,7 +181,7 @@ public: // virtual bool record(RecordStatus recordStatus, const std::vector<InstrumentId> *armedInstruments = 0, - const std::vector<QString> *audioFileNames = 0) = 0; + const std::vector<TQString> *audioFileNames = 0) = 0; // Process anything that's pending // @@ -194,7 +194,7 @@ public: // Plugin instance management // virtual void setPluginInstance(InstrumentId id, - QString identifier, + TQString identifier, int position) = 0; virtual void removePluginInstance(InstrumentId id, @@ -217,29 +217,29 @@ public: int position, bool value) = 0; - virtual QStringList getPluginInstancePrograms(InstrumentId id, + virtual TQStringList getPluginInstancePrograms(InstrumentId id, int position) = 0; - virtual QString getPluginInstanceProgram(InstrumentId id, + virtual TQString getPluginInstanceProgram(InstrumentId id, int position) = 0; - virtual QString getPluginInstanceProgram(InstrumentId id, + virtual TQString getPluginInstanceProgram(InstrumentId id, int position, int bank, int program) = 0; virtual unsigned long getPluginInstanceProgram(InstrumentId id, int position, - QString name) = 0; + TQString name) = 0; virtual void setPluginInstanceProgram(InstrumentId id, int position, - QString program) = 0; + TQString program) = 0; - virtual QString configurePlugin(InstrumentId id, + virtual TQString configurePlugin(InstrumentId id, int position, - QString key, - QString value) = 0; + TQString key, + TQString value) = 0; virtual void setAudioBussLevels(int bussId, float dB, @@ -260,7 +260,7 @@ public: virtual void sleep(const RealTime &rt); - virtual QString getStatusLog() { return ""; } + virtual TQString getStatusLog() { return ""; } // Mapped Instruments // @@ -301,20 +301,20 @@ public: return Device::NO_DEVICE; } virtual void removeDevice(DeviceId) { } - virtual void renameDevice(DeviceId, QString) { } + virtual void renameDevice(DeviceId, TQString) { } virtual unsigned int getConnections(Device::DeviceType, MidiDevice::DeviceDirection) { return 0; } - virtual QString getConnection(Device::DeviceType, + virtual TQString getConnection(Device::DeviceType, MidiDevice::DeviceDirection, unsigned int) { return ""; } - virtual void setConnection(DeviceId, QString) { } - virtual void setPlausibleConnection(DeviceId id, QString c) { setConnection(id, c); } + virtual void setConnection(DeviceId, TQString) { } + virtual void setPlausibleConnection(DeviceId id, TQString c) { setConnection(id, c); } virtual unsigned int getTimers() { return 0; } - virtual QString getTimer(unsigned int) { return ""; } - virtual QString getCurrentTimer() { return ""; } - virtual void setCurrentTimer(QString) { } + virtual TQString getTimer(unsigned int) { return ""; } + virtual TQString getCurrentTimer() { return ""; } + virtual void setCurrentTimer(TQString) { } virtual void getAudioInstrumentNumbers(InstrumentId &, int &) = 0; virtual void getSoftSynthInstrumentNumbers(InstrumentId &, int &) = 0; |