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/sequencer/RosegardenSequencerApp.cpp | |
parent | 832eb69d571e8e518db45d0c0e6fbc0f00690209 (diff) | |
download | rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.tar.gz rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.zip |
Initial TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1172292 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/sequencer/RosegardenSequencerApp.cpp')
-rw-r--r-- | src/sequencer/RosegardenSequencerApp.cpp | 136 |
1 files changed, 68 insertions, 68 deletions
diff --git a/src/sequencer/RosegardenSequencerApp.cpp b/src/sequencer/RosegardenSequencerApp.cpp index 4c26efb..179820f 100644 --- a/src/sequencer/RosegardenSequencerApp.cpp +++ b/src/sequencer/RosegardenSequencerApp.cpp @@ -38,11 +38,11 @@ #include <kstandarddirs.h> #include <dcopclient.h> -#include <qdatetime.h> -#include <qstring.h> -#include <qdir.h> -#include <qbuffer.h> -#include <qvaluevector.h> +#include <tqdatetime.h> +#include <tqstring.h> +#include <tqdir.h> +#include <tqbuffer.h> +#include <tqvaluevector.h> #include "misc/Debug.h" #include "ControlBlockMmapper.h" @@ -86,7 +86,7 @@ RosegardenSequencerApp::RosegardenSequencerApp() : SEQUENCER_DEBUG << "Registering with DCOP server" << endl; // Without DCOP we are nothing - QCString realAppId = kapp->dcopClient()->registerAs(kapp->name(), false); + TQCString realAppId = kapp->dcopClient()->registerAs(kapp->name(), false); if (realAppId.isNull()) { SEQUENCER_DEBUG << "RosegardenSequencer cannot register " @@ -119,9 +119,9 @@ RosegardenSequencerApp::RosegardenSequencerApp() : // Check for new clients every so often // - m_newClientTimer = new QTimer(this); - connect(m_newClientTimer, SIGNAL(timeout()), - this, SLOT(slotCheckForNewClients())); + m_newClientTimer = new TQTimer(this); + connect(m_newClientTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotCheckForNewClients())); m_newClientTimer->start(3000); // every 3 seconds } @@ -411,9 +411,9 @@ RosegardenSequencerApp::updateClocks() void RosegardenSequencerApp::notifySequencerStatus() { - QByteArray data, replyData; - QCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data, replyData; + TQCString replyType; + TQDataStream arg(data, IO_WriteOnly); arg << (int)m_transportStatus; @@ -588,8 +588,8 @@ RosegardenSequencerApp::processAsynchronousEvents() // std::cerr << "processAsynchronousEvents: have " << mC->size() << " events" << std::endl; - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << mC; if (m_controlBlockMmapper->isMidiRoutingEnabled()) { @@ -665,13 +665,13 @@ RosegardenSequencerApp::record(const RealTime &time, SEQUENCER_DEBUG << "RosegardenSequencerApp::record()" << " - starting to record" << endl; - QValueVector<InstrumentId> armedInstruments; - QValueVector<QString> audioFileNames; + TQValueVector<InstrumentId> armedInstruments; + TQValueVector<TQString> audioFileNames; { - QByteArray data, replyData; - QCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data, replyData; + TQCString replyType; + TQDataStream arg(data, IO_WriteOnly); if (!kapp->dcopClient()->call(ROSEGARDEN_GUI_APP_NAME, ROSEGARDEN_GUI_IFACE_NAME, @@ -682,8 +682,8 @@ RosegardenSequencerApp::record(const RealTime &time, << endl; } - QDataStream reply(replyData, IO_ReadOnly); - if (replyType == "QValueVector<InstrumentId>") { + TQDataStream reply(replyData, IO_ReadOnly); + if (replyType == "TQValueVector<InstrumentId>") { reply >> armedInstruments; } else { SEQUENCER_DEBUG << "RosegardenSequencer::record() - " @@ -691,7 +691,7 @@ RosegardenSequencerApp::record(const RealTime &time, } } - QValueVector<InstrumentId> audioInstruments; + TQValueVector<InstrumentId> audioInstruments; for (unsigned int i = 0; i < armedInstruments.size(); ++i) { if (armedInstruments[i] >= AudioInstrumentBase && @@ -702,23 +702,23 @@ RosegardenSequencerApp::record(const RealTime &time, if (audioInstruments.size() > 0) { - QByteArray data, replyData; - QCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data, replyData; + TQCString replyType; + TQDataStream arg(data, IO_WriteOnly); arg << audioInstruments; if (!kapp->dcopClient()->call(ROSEGARDEN_GUI_APP_NAME, ROSEGARDEN_GUI_IFACE_NAME, - "createRecordAudioFiles(QValueVector<InstrumentId>)", + "createRecordAudioFiles(TQValueVector<InstrumentId>)", data, replyType, replyData, true)) { SEQUENCER_DEBUG << "RosegardenSequencer::record()" << " - can't call RosegardenGUI client for createNewAudioFiles" << endl; } - QDataStream reply(replyData, IO_ReadOnly); - if (replyType == "QValueVector<QString>") { + TQDataStream reply(replyData, IO_ReadOnly); + if (replyType == "TQValueVector<TQString>") { reply >> audioFileNames; } else { SEQUENCER_DEBUG << "RosegardenSequencer::record() - " @@ -733,7 +733,7 @@ RosegardenSequencerApp::record(const RealTime &time, } std::vector<InstrumentId> armedInstrumentsVec; - std::vector<QString> audioFileNamesVec; + std::vector<TQString> audioFileNamesVec; for (int i = 0; i < armedInstruments.size(); ++i) { armedInstrumentsVec.push_back(armedInstruments[i]); } @@ -834,17 +834,17 @@ RosegardenSequencerApp::play(const RealTime &time, // Map all segments // - QDir segmentsDir(m_segmentFilesPath, "segment_*"); + TQDir segmentsDir(m_segmentFilesPath, "segment_*"); for (unsigned int i = 0; i < segmentsDir.count(); ++i) { mmapSegment(m_segmentFilesPath + "/" + segmentsDir[i]); } - QString tmpDir = KGlobal::dirs()->resourceDirs("tmp").last(); + TQString tmpDir = KGlobal::dirs()->resourceDirs("tmp").last(); // Map metronome // - QString metronomeFileName = tmpDir + "/rosegarden_metronome"; - QFileInfo metronomeFileInfo(metronomeFileName); + TQString metronomeFileName = tmpDir + "/rosegarden_metronome"; + TQFileInfo metronomeFileInfo(metronomeFileName); if (metronomeFileInfo.exists()) mmapSegment(metronomeFileName); else @@ -852,8 +852,8 @@ RosegardenSequencerApp::play(const RealTime &time, // Map tempo segment // - QString tempoSegmentFileName = tmpDir + "/rosegarden_tempo"; - QFileInfo tempoSegmentFileInfo(tempoSegmentFileName); + TQString tempoSegmentFileName = tmpDir + "/rosegarden_tempo"; + TQFileInfo tempoSegmentFileInfo(tempoSegmentFileName); if (tempoSegmentFileInfo.exists()) mmapSegment(tempoSegmentFileName); else @@ -861,8 +861,8 @@ RosegardenSequencerApp::play(const RealTime &time, // Map time sig segment // - QString timeSigSegmentFileName = tmpDir + "/rosegarden_timesig"; - QFileInfo timeSigSegmentFileInfo(timeSigSegmentFileName); + TQString timeSigSegmentFileName = tmpDir + "/rosegarden_timesig"; + TQFileInfo timeSigSegmentFileInfo(timeSigSegmentFileName); if (timeSigSegmentFileInfo.exists()) mmapSegment(timeSigSegmentFileName); else @@ -906,7 +906,7 @@ RosegardenSequencerApp::punchOut() return false; } -MmappedSegment* RosegardenSequencerApp::mmapSegment(const QString& file) +MmappedSegment* RosegardenSequencerApp::mmapSegment(const TQString& file) { MmappedSegment* m = 0; @@ -941,7 +941,7 @@ void RosegardenSequencerApp::cleanupMmapData() m_metaIterator = 0; } -void RosegardenSequencerApp::remapSegment(const QString& filename, size_t newSize) +void RosegardenSequencerApp::remapSegment(const TQString& filename, size_t newSize) { if (m_transportStatus != PLAYING) return ; @@ -953,7 +953,7 @@ void RosegardenSequencerApp::remapSegment(const QString& filename, size_t newSiz m_metaIterator->resetIteratorForSegment(filename); } -void RosegardenSequencerApp::addSegment(const QString& filename) +void RosegardenSequencerApp::addSegment(const TQString& filename) { if (m_transportStatus != PLAYING) return ; @@ -966,7 +966,7 @@ void RosegardenSequencerApp::addSegment(const QString& filename) m_metaIterator->addSegment(m); } -void RosegardenSequencerApp::deleteSegment(const QString& filename) +void RosegardenSequencerApp::deleteSegment(const TQString& filename) { if (m_transportStatus != PLAYING) return ; @@ -1097,7 +1097,7 @@ RosegardenSequencerApp::setLoop(long loopStartSec, // Return the status of the sound systems (audio and MIDI) // unsigned int -RosegardenSequencerApp::getSoundDriverStatus(const QString &guiVersion) +RosegardenSequencerApp::getSoundDriverStatus(const TQString &guiVersion) { unsigned int driverStatus = m_driver->getStatus(); if (guiVersion == VERSION) @@ -1114,7 +1114,7 @@ RosegardenSequencerApp::getSoundDriverStatus(const QString &guiVersion) // Add an audio file to the sequencer int -RosegardenSequencerApp::addAudioFile(const QString &fileName, int id) +RosegardenSequencerApp::addAudioFile(const TQString &fileName, int id) { return ((int)m_driver->addAudioFile(fileName.utf8().data(), id)); } @@ -1238,7 +1238,7 @@ RosegardenSequencerApp::removeDevice(unsigned int deviceId) } void -RosegardenSequencerApp::renameDevice(unsigned int deviceId, QString name) +RosegardenSequencerApp::renameDevice(unsigned int deviceId, TQString name) { m_driver->renameDevice(deviceId, name); } @@ -1261,14 +1261,14 @@ RosegardenSequencerApp::getConnection(int type, unsigned int direction, void RosegardenSequencerApp::setConnection(unsigned int deviceId, - QString connection) + TQString connection) { m_driver->setConnection(deviceId, connection); } void RosegardenSequencerApp::setPlausibleConnection(unsigned int deviceId, - QString connection) + TQString connection) { m_driver->setPlausibleConnection(deviceId, connection); } @@ -1292,7 +1292,7 @@ RosegardenSequencerApp::getCurrentTimer() } void -RosegardenSequencerApp::setCurrentTimer(QString timer) +RosegardenSequencerApp::setCurrentTimer(TQString timer) { m_driver->setCurrentTimer(timer); } @@ -1307,13 +1307,13 @@ void RosegardenSequencerApp::sequencerAlive() { if (!kapp->dcopClient()-> - isApplicationRegistered(QCString(ROSEGARDEN_GUI_APP_NAME))) { + isApplicationRegistered(TQCString(ROSEGARDEN_GUI_APP_NAME))) { SEQUENCER_DEBUG << "RosegardenSequencerApp::sequencerAlive() - " << "waiting for GUI to register" << endl; return ; } - QByteArray data; + TQByteArray data; if (!kapp->dcopClient()->send(ROSEGARDEN_GUI_APP_NAME, ROSEGARDEN_GUI_IFACE_NAME, @@ -1356,7 +1356,7 @@ RosegardenSequencerApp::initialiseStudio() void RosegardenSequencerApp::setMappedProperty(int id, - const QString &property, + const TQString &property, float value) { @@ -1396,8 +1396,8 @@ RosegardenSequencerApp::setMappedProperties(const MappedObjectIdList &ids, void RosegardenSequencerApp::setMappedProperty(int id, - const QString &property, - const QString &value) + const TQString &property, + const TQString &value) { SEQUENCER_DEBUG << "setProperty: id = " << id @@ -1412,7 +1412,7 @@ RosegardenSequencerApp::setMappedProperty(int id, } void -RosegardenSequencerApp::setMappedPropertyList(int id, const QString &property, +RosegardenSequencerApp::setMappedPropertyList(int id, const TQString &property, const MappedObjectPropertyList &values) { SEQUENCER_DEBUG << "setPropertyList: id = " << id @@ -1424,13 +1424,13 @@ RosegardenSequencerApp::setMappedPropertyList(int id, const QString &property, if (object) { try { object->setPropertyList(property, values); - } catch (QString err) { - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + } catch (TQString err) { + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << err; kapp->dcopClient()->send(ROSEGARDEN_GUI_APP_NAME, ROSEGARDEN_GUI_IFACE_NAME, - "showError(QString)", + "showError(TQString)", data); } } @@ -1454,11 +1454,11 @@ RosegardenSequencerApp::getMappedObjectId(int type) } -std::vector<QString> +std::vector<TQString> RosegardenSequencerApp::getPropertyList(int id, - const QString &property) + const TQString &property) { - std::vector<QString> list; + std::vector<TQString> list; MappedObject *object = m_studio->getObjectById(id); @@ -1473,10 +1473,10 @@ RosegardenSequencerApp::getPropertyList(int id, return list; } -std::vector<QString> +std::vector<TQString> RosegardenSequencerApp::getPluginInformation() { - std::vector<QString> list; + std::vector<TQString> list; PluginFactory::enumerateAllPlugins(list); @@ -1496,11 +1496,11 @@ RosegardenSequencerApp::getPluginProgram(int id, int bank, int program) } } - return QString(); + return TQString(); } unsigned long -RosegardenSequencerApp::getPluginProgram(int id, const QString &name) +RosegardenSequencerApp::getPluginProgram(int id, const TQString &name) { MappedObject *object = m_studio->getObjectById(id); @@ -1750,7 +1750,7 @@ RosegardenSequencerApp::checkExternalTransport() TransportPair pair = *m_transportRequests.begin(); m_transportRequests.pop_front(); - QByteArray data; + TQByteArray data; switch (pair.first) { @@ -1786,7 +1786,7 @@ RosegardenSequencerApp::checkExternalTransport() break; case TransportJumpToTime: { - QDataStream arg(data, IO_WriteOnly); + TQDataStream arg(data, IO_WriteOnly); arg << (int)pair.second.sec; arg << (int)pair.second.usec(); @@ -1805,7 +1805,7 @@ RosegardenSequencerApp::checkExternalTransport() } case TransportStartAtTime: { - QDataStream arg(data, IO_WriteOnly); + TQDataStream arg(data, IO_WriteOnly); arg << (int)pair.second.sec; arg << (int)pair.second.usec(); @@ -1822,7 +1822,7 @@ RosegardenSequencerApp::checkExternalTransport() "stop()", data); - QDataStream arg(data, IO_WriteOnly); + TQDataStream arg(data, IO_WriteOnly); arg << (int)pair.second.sec; arg << (int)pair.second.usec(); |