diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-02 22:38:52 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-02 22:38:52 +0000 |
commit | 458efa7b0c935cbaafa2791021a5f8f7241aa876 (patch) | |
tree | 624583f2873febe23770bee3fa94b5c24bd59f4f /src/sequencer/RosegardenSequencerApp.cpp | |
parent | 747037b72944ae2c02962b7c5c96e0a7f8852e38 (diff) | |
download | rosegarden-458efa7b0c935cbaafa2791021a5f8f7241aa876.tar.gz rosegarden-458efa7b0c935cbaafa2791021a5f8f7241aa876.zip |
Initial TQt4 port of Rosegarden
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1230242 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/sequencer/RosegardenSequencerApp.cpp')
-rw-r--r-- | src/sequencer/RosegardenSequencerApp.cpp | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/src/sequencer/RosegardenSequencerApp.cpp b/src/sequencer/RosegardenSequencerApp.cpp index 179820f..0aabda1 100644 --- a/src/sequencer/RosegardenSequencerApp.cpp +++ b/src/sequencer/RosegardenSequencerApp.cpp @@ -66,7 +66,7 @@ namespace Rosegarden RosegardenSequencerApp::RosegardenSequencerApp() : DCOPObject("RosegardenSequencerIface"), m_driver(0), - m_transportStatus(STOPPED), + m_transporttqStatus(STOPPED), m_songPosition(0, 0), m_lastFetchSongPosition(0, 0), m_readAhead(0, 80000000), // default value @@ -143,7 +143,7 @@ RosegardenSequencerApp::quit() close(); // and break out of the loop next time around - m_transportStatus = QUIT; + m_transporttqStatus = TQUIT; } @@ -152,7 +152,7 @@ RosegardenSequencerApp::stop() { // set our state at this level to STOPPING (pending any // unfinished NOTES) - m_transportStatus = STOPPING; + m_transporttqStatus = STOPPING; // report // @@ -186,7 +186,7 @@ RosegardenSequencerApp::fetchEvents(MappedComposition &composition, { // Always return nothing if we're stopped // - if ( m_transportStatus == STOPPED || m_transportStatus == STOPPING ) + if ( m_transporttqStatus == STOPPED || m_transporttqStatus == STOPPING ) return ; // If we're looping then we should get as much of the rest of @@ -361,8 +361,8 @@ RosegardenSequencerApp::updateClocks() // If we're not playing etc. then that's all we need to do // - if (m_transportStatus != PLAYING && - m_transportStatus != RECORDING) + if (m_transporttqStatus != PLAYING && + m_transporttqStatus != RECORDING) return ; RealTime newPosition = m_driver->getSequencerTime(); @@ -409,19 +409,19 @@ RosegardenSequencerApp::updateClocks() } void -RosegardenSequencerApp::notifySequencerStatus() +RosegardenSequencerApp::notifySequencertqStatus() { TQByteArray data, replyData; TQCString replyType; TQDataStream arg(data, IO_WriteOnly); - arg << (int)m_transportStatus; + arg << (int)m_transporttqStatus; if (!kapp->dcopClient()->send(ROSEGARDEN_GUI_APP_NAME, ROSEGARDEN_GUI_IFACE_NAME, - "notifySequencerStatus(int)", + "notifySequencertqStatus(int)", data)) { - SEQUENCER_DEBUG << "RosegardenSequencer::notifySequencerStatus()" + SEQUENCER_DEBUG << "RosegardenSequencer::notifySequencertqStatus()" << " - can't send to RosegardenGUI client" << endl; @@ -645,12 +645,12 @@ RosegardenSequencerApp::record(const RealTime &time, long smallFileSize, long recordMode) { - TransportStatus localRecordMode = (TransportStatus) recordMode; + TransporttqStatus localRecordMode = (TransporttqStatus) recordMode; - SEQUENCER_DEBUG << "RosegardenSequencerApp::record - recordMode is " << recordMode << ", transport status is " << m_transportStatus << endl; + SEQUENCER_DEBUG << "RosegardenSequencerApp::record - recordMode is " << recordMode << ", transport status is " << m_transporttqStatus << endl; // punch in recording - if (m_transportStatus == PLAYING) { + if (m_transporttqStatus == PLAYING) { if (localRecordMode == STARTING_TO_RECORD) { SEQUENCER_DEBUG << "RosegardenSequencerApp::record: punching in" << endl; localRecordMode = RECORDING; // no need to start playback @@ -758,7 +758,7 @@ RosegardenSequencerApp::record(const RealTime &time, // Now set the local transport status to the record mode // // - m_transportStatus = localRecordMode; + m_transporttqStatus = localRecordMode; if (localRecordMode == RECORDING) { // punch in return 1; @@ -787,14 +787,14 @@ RosegardenSequencerApp::play(const RealTime &time, const RealTime &audioWrite, long smallFileSize) { - if (m_transportStatus == PLAYING || - m_transportStatus == STARTING_TO_PLAY) + if (m_transporttqStatus == PLAYING || + m_transporttqStatus == STARTING_TO_PLAY) return true; // Check for record toggle (punch out) // - if (m_transportStatus == RECORDING) { - m_transportStatus = PLAYING; + if (m_transporttqStatus == RECORDING) { + m_transporttqStatus = PLAYING; return punchOut(); } @@ -809,9 +809,9 @@ RosegardenSequencerApp::play(const RealTime &time, (m_songPosition); } - if (m_transportStatus != RECORDING && - m_transportStatus != STARTING_TO_RECORD) { - m_transportStatus = STARTING_TO_PLAY; + if (m_transporttqStatus != RECORDING && + m_transporttqStatus != STARTING_TO_RECORD) { + m_transporttqStatus = STARTING_TO_PLAY; } m_driver->stopClocks(); @@ -898,9 +898,9 @@ RosegardenSequencerApp::punchOut() { // Check for record toggle (punch out) // - if (m_transportStatus == RECORDING) { + if (m_transporttqStatus == RECORDING) { m_driver->punchOut(); - m_transportStatus = PLAYING; + m_transporttqStatus = PLAYING; return true; } return false; @@ -943,7 +943,7 @@ void RosegardenSequencerApp::cleanupMmapData() void RosegardenSequencerApp::remapSegment(const TQString& filename, size_t newSize) { - if (m_transportStatus != PLAYING) + if (m_transporttqStatus != PLAYING) return ; SEQUENCER_DEBUG << "RosegardenSequencerApp::remapSegment(" << filename << ")\n"; @@ -955,7 +955,7 @@ void RosegardenSequencerApp::remapSegment(const TQString& filename, size_t newSi void RosegardenSequencerApp::addSegment(const TQString& filename) { - if (m_transportStatus != PLAYING) + if (m_transporttqStatus != PLAYING) return ; SEQUENCER_DEBUG << "MmappedSegment::addSegment(" << filename << ")\n"; @@ -968,7 +968,7 @@ void RosegardenSequencerApp::addSegment(const TQString& filename) void RosegardenSequencerApp::deleteSegment(const TQString& filename) { - if (m_transportStatus != PLAYING) + if (m_transporttqStatus != PLAYING) return ; SEQUENCER_DEBUG << "MmappedSegment::deleteSegment(" << filename << ")\n"; @@ -1097,18 +1097,18 @@ RosegardenSequencerApp::setLoop(long loopStartSec, // Return the status of the sound systems (audio and MIDI) // unsigned int -RosegardenSequencerApp::getSoundDriverStatus(const TQString &guiVersion) +RosegardenSequencerApp::getSoundDrivertqStatus(const TQString &guiVersion) { - unsigned int driverStatus = m_driver->getStatus(); + unsigned int drivertqStatus = m_driver->gettqStatus(); if (guiVersion == VERSION) - driverStatus |= VERSION_OK; + drivertqStatus |= VERSION_OK; else { - std::cerr << "WARNING: RosegardenSequencerApp::getSoundDriverStatus: " + std::cerr << "WARNING: RosegardenSequencerApp::getSoundDrivertqStatus: " << "GUI version \"" << guiVersion << "\" does not match sequencer version \"" << VERSION << "\"" << std::endl; } - return driverStatus; + return drivertqStatus; } @@ -1250,7 +1250,7 @@ RosegardenSequencerApp::getConnections(int type, unsigned int direction) (MidiDevice::DeviceDirection)direction); } -QString +TQString RosegardenSequencerApp::getConnection(int type, unsigned int direction, unsigned int connectionNo) { @@ -1279,13 +1279,13 @@ RosegardenSequencerApp::getTimers() return m_driver->getTimers(); } -QString +TQString RosegardenSequencerApp::getTimer(unsigned int n) { return m_driver->getTimer(n); } -QString +TQString RosegardenSequencerApp::getCurrentTimer() { return m_driver->getCurrentTimer(); @@ -1483,7 +1483,7 @@ RosegardenSequencerApp::getPluginInformation() return list; } -QString +TQString RosegardenSequencerApp::getPluginProgram(int id, int bank, int program) { MappedObject *object = m_studio->getObjectById(id); @@ -1561,8 +1561,8 @@ RosegardenSequencerApp::connectMappedObjects(int id1, int id2) // When this happens we need to resynchronise our audio processing, // and this is the easiest (and most brutal) way to do it. - if (m_transportStatus == PLAYING || - m_transportStatus == RECORDING) { + if (m_transporttqStatus == PLAYING || + m_transporttqStatus == RECORDING) { RealTime seqTime = m_driver->getSequencerTime(); jumpTo(seqTime.sec, seqTime.nsec); } @@ -1637,8 +1637,8 @@ RosegardenSequencerApp::slotCheckForNewClients() { // Don't do this check if any of these conditions hold // - if (m_transportStatus == PLAYING || - m_transportStatus == RECORDING) + if (m_transporttqStatus == PLAYING || + m_transporttqStatus == RECORDING) return ; if (m_driver->checkForNewClients()) { @@ -1659,7 +1659,7 @@ RosegardenSequencerApp::setQuarterNoteLength(long timeSec, long timeNSec) RealTime(timeSec, timeNSec) / 24); } -QString +TQString RosegardenSequencerApp::getStatusLog() { return m_driver->getStatusLog(); @@ -1795,8 +1795,8 @@ RosegardenSequencerApp::checkExternalTransport() "jumpToTime(int, int)", data); - if (m_transportStatus == PLAYING || - m_transportStatus != RECORDING) { + if (m_transporttqStatus == PLAYING || + m_transporttqStatus != RECORDING) { jumpTo(pair.second.sec, pair.second.usec() * 1000); } |