diff options
Diffstat (limited to 'src/document/RosegardenGUIDoc.cpp')
-rw-r--r-- | src/document/RosegardenGUIDoc.cpp | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/src/document/RosegardenGUIDoc.cpp b/src/document/RosegardenGUIDoc.cpp index 99cead1..a48907f 100644 --- a/src/document/RosegardenGUIDoc.cpp +++ b/src/document/RosegardenGUIDoc.cpp @@ -117,11 +117,11 @@ namespace Rosegarden using namespace BaseProperties; -RosegardenGUIDoc::RosegardenGUIDoc(TQWidget *parent, +RosegardenGUIDoc::RosegardenGUIDoc(TQWidget *tqparent, AudioPluginManager *pluginManager, bool skipAutoload, const char *name) - : TQObject(parent, name), + : TQObject(tqparent, name), m_modified(false), m_autoSaved(false), m_audioPreviewThread(&m_audioFileManager), @@ -229,7 +229,7 @@ void RosegardenGUIDoc::slotUpdateAllViews(RosegardenGUIView *sender) for (w = m_viewList.first(); w != 0; w = m_viewList.next()) { if (w != sender) - w->repaint(); + w->tqrepaint(); } } @@ -239,7 +239,7 @@ void RosegardenGUIDoc::setModified(bool m) RG_DEBUG << "RosegardenGUIDoc[" << this << "]::setModified(" << m << ")\n"; } -void RosegardenGUIDoc::clearModifiedStatus() +void RosegardenGUIDoc::clearModifiedtqStatus() { setModified(false); setAutoSaved(true); @@ -321,7 +321,7 @@ bool RosegardenGUIDoc::saveIfModified() return completed; - RosegardenGUIApp *win = (RosegardenGUIApp *)parent(); + RosegardenGUIApp *win = (RosegardenGUIApp *)tqparent(); int wantSave = KMessageBox::warningYesNoCancel (win, @@ -349,10 +349,10 @@ bool RosegardenGUIDoc::saveIfModified() if (!completed) { if (errMsg) { KMessageBox::error(0, i18n(TQString("Could not save document at %1\n(%2)") - .arg(getAbsFilePath()).arg(errMsg))); + .tqarg(getAbsFilePath()).tqarg(errMsg))); } else { KMessageBox::error(0, i18n(TQString("Could not save document at %1") - .arg(getAbsFilePath()))); + .tqarg(getAbsFilePath()))); } } } @@ -463,7 +463,7 @@ RosegardenGUIDoc::deleteOrphanedAudioFiles(bool documentWillNotBeSaved) if (!file.remove()) { std::cerr << "WARNING: Failed to remove orphaned derived audio file \"" << derivedOrphans[i] << std::endl; } - TQFile peakFile(TQString("%1.pk").arg(derivedOrphans[i])); + TQFile peakFile(TQString("%1.pk").tqarg(derivedOrphans[i])); peakFile.remove(); } @@ -523,10 +523,10 @@ RosegardenGUIDoc::deleteOrphanedAudioFiles(bool documentWillNotBeSaved) TQFile file(recordedOrphans[i]); if (!file.remove()) { KMessageBox::error(0, i18n("File %1 could not be deleted.") - .arg(recordedOrphans[i])); + .tqarg(recordedOrphans[i])); } - TQFile peakFile(TQString("%1.pk").arg(recordedOrphans[i])); + TQFile peakFile(TQString("%1.pk").tqarg(recordedOrphans[i])); peakFile.remove(); } } @@ -537,7 +537,7 @@ RosegardenGUIDoc::deleteOrphanedAudioFiles(bool documentWillNotBeSaved) void RosegardenGUIDoc::newDocument() { setModified(false); - setAbsFilePath(TQString::null); + setAbsFilePath(TQString()); setTitle(i18n("Untitled")); m_commandHistory->clear(); } @@ -577,14 +577,14 @@ bool RosegardenGUIDoc::openDocument(const TQString& filename, // Check if file readable with fileInfo ? if (!fileInfo.isReadable() || fileInfo.isDir()) { KStartupLogo::hideIfStillThere(); - TQString msg(i18n("Can't open file '%1'").arg(filename)); + TQString msg(i18n("Can't open file '%1'").tqarg(filename)); KMessageBox::sorry(0, msg); return false; } ProgressDialog progressDlg(i18n("Reading file..."), 100, - (TQWidget*)parent()); + (TQWidget*)tqparent()); connect(&progressDlg, TQT_SIGNAL(cancelClicked()), &m_audioFileManager, TQT_SLOT(slotStopPreview())); @@ -639,8 +639,8 @@ bool RosegardenGUIDoc::openDocument(const TQString& filename, if (!okay) { KStartupLogo::hideIfStillThere(); TQString msg(i18n("Error when parsing file '%1': \"%2\"") - .arg(filename) - .arg(errMsg)); + .tqarg(filename) + .tqarg(errMsg)); CurrentProgressDialog::freeze(); KMessageBox::sorry(0, msg); @@ -1152,7 +1152,7 @@ bool RosegardenGUIDoc::saveDocument(const TQString& filename, int status = temp.status(); if (status != 0) { - errMsg = i18n(TQString("Could not create temporary file in directory of '%1': %2").arg(filename).arg(strerror(status))); + errMsg = i18n(TQString("Could not create temporary file in directory of '%1': %2").tqarg(filename).tqarg(strerror(status))); return false; } @@ -1164,7 +1164,7 @@ bool RosegardenGUIDoc::saveDocument(const TQString& filename, if (!temp.close()) { status = temp.status(); errMsg = i18n(TQString("Failure in temporary file handling for file '%1': %2") - .arg(tempFileName).arg(strerror(status))); + .tqarg(tempFileName).tqarg(strerror(status))); return false; } @@ -1177,7 +1177,7 @@ bool RosegardenGUIDoc::saveDocument(const TQString& filename, TQDir dir(TQFileInfo(tempFileName).dir()); if (!dir.rename(tempFileName, filename)) { - errMsg = i18n(TQString("Failed to rename temporary output file '%1' to desired output file '%2'").arg(tempFileName).arg(filename)); + errMsg = i18n(TQString("Failed to rename temporary output file '%1' to desired output file '%2'").tqarg(tempFileName).tqarg(filename)); return false; } @@ -1198,7 +1198,7 @@ bool RosegardenGUIDoc::saveDocumentActual(const TQString& filename, if (!rc) { // do some error report - errMsg = i18n(TQString("Could not open file '%1' for writing").arg(filename)); + errMsg = i18n(TQString("Could not open file '%1' for writing").tqarg(filename)); delete fileCompressedDevice; return false; // couldn't open file } @@ -1224,7 +1224,7 @@ bool RosegardenGUIDoc::saveDocumentActual(const TQString& filename, progressDlg = new ProgressDialog(i18n("Saving file..."), 100, - (TQWidget*)parent()); + (TQWidget*)tqparent()); progress = progressDlg->progressBar(); progressDlg->setMinimumDuration(500); @@ -1232,7 +1232,7 @@ bool RosegardenGUIDoc::saveDocumentActual(const TQString& filename, } else { - progress = ((RosegardenGUIApp *)parent())->getProgressBar(); + progress = ((RosegardenGUIApp *)tqparent())->getProgressBar(); } // Send out Composition (this includes Tracks, Instruments, Tempo @@ -1281,13 +1281,13 @@ bool RosegardenGUIDoc::saveDocumentActual(const TQString& filename, m_composition.getTriggerSegments().begin(); ci != m_composition.getTriggerSegments().end(); ++ci) { - TQString triggerAtts = QString + TQString triggerAtts = TQString ("triggerid=\"%1\" triggerbasepitch=\"%2\" triggerbasevelocity=\"%3\" triggerretune=\"%4\" triggeradjusttimes=\"%5\" ") - .arg((*ci)->getId()) - .arg((*ci)->getBasePitch()) - .arg((*ci)->getBaseVelocity()) - .arg((*ci)->getDefaultRetune()) - .arg(strtoqstr((*ci)->getDefaultTimeAdjust())); + .tqarg((*ci)->getId()) + .tqarg((*ci)->getBasePitch()) + .tqarg((*ci)->getBaseVelocity()) + .tqarg((*ci)->getDefaultRetune()) + .tqarg(strtoqstr((*ci)->getDefaultTimeAdjust())); Segment *segment = (*ci)->getSegment(); saveSegment(outStream, segment, progress, totalEvents, eventCount, triggerAtts); @@ -1315,7 +1315,7 @@ bool RosegardenGUIDoc::saveDocumentActual(const TQString& filename, // check that all went ok // if (fileCompressedDevice->status() != IO_Ok) { - errMsg = i18n(TQString("Error while writing on '%1'").arg(filename)); + errMsg = i18n(TQString("Error while writing on '%1'").tqarg(filename)); delete fileCompressedDevice; return false; } @@ -1380,8 +1380,8 @@ void RosegardenGUIDoc::saveSegment(TQTextStream& outStream, Segment *segment, TQString time; outStream << TQString("<segment track=\"%1\" start=\"%2\" ") - .arg(segment->getTrack()) - .arg(segment->getStartTime()); + .tqarg(segment->getTrack()) + .tqarg(segment->getStartTime()); if (extraAttributes) outStream << extraAttributes << " "; @@ -1556,13 +1556,13 @@ void RosegardenGUIDoc::saveSegment(TQTextStream& outStream, Segment *segment, bool RosegardenGUIDoc::isSequencerRunning() { - RosegardenGUIApp* parentApp = dynamic_cast<RosegardenGUIApp*>(parent()); - if (!parentApp) { - RG_DEBUG << "RosegardenGUIDoc::isSequencerRunning() : parentApp == 0\n"; + RosegardenGUIApp* tqparentApp = dynamic_cast<RosegardenGUIApp*>(tqparent()); + if (!tqparentApp) { + RG_DEBUG << "RosegardenGUIDoc::isSequencerRunning() : tqparentApp == 0\n"; return false; } - return parentApp->isSequencerRunning(); + return tqparentApp->isSequencerRunning(); } bool @@ -1612,7 +1612,7 @@ RosegardenGUIDoc::xmlParse(TQString fileContents, TQString &errMsg, } else { if (getSequenceManager() && - !(getSequenceManager()->getSoundDriverStatus() & AUDIO_OK)) { + !(getSequenceManager()->getSoundDrivertqStatus() & AUDIO_OK)) { KStartupLogo::hideIfStillThere(); CurrentProgressDialog::freeze(); @@ -1662,7 +1662,7 @@ RosegardenGUIDoc::xmlParse(TQString fileContents, TQString &errMsg, KStartupLogo::hideIfStillThere(); CurrentProgressDialog::freeze(); - KMessageBox::information(0, i18n("<h3>Incorrect audio sample rate</h3><p>This composition contains audio files that were recorded or imported with the audio server running at a different sample rate (%1 Hz) from the current JACK server sample rate (%2 Hz).</p><p>Rosegarden will play this composition at the correct speed, but any audio files in it will probably sound awful.</p><p>Please consider re-starting the JACK server at the correct rate (%3 Hz) and re-loading this composition before you do any more work with it.</p>").arg(er).arg(sr).arg(er)); + KMessageBox::information(0, i18n("<h3>Incorrect audio sample rate</h3><p>This composition contains audio files that were recorded or imported with the audio server running at a different sample rate (%1 Hz) from the current JACK server sample rate (%2 Hz).</p><p>Rosegarden will play this composition at the correct speed, but any audio files in it will probably sound awful.</p><p>Please consider re-starting the JACK server at the correct rate (%3 Hz) and re-loading this composition before you do any more work with it.</p>").tqarg(er).tqarg(sr).tqarg(er)); CurrentProgressDialog::thaw(); shownWarning = true; @@ -1672,7 +1672,7 @@ RosegardenGUIDoc::xmlParse(TQString fileContents, TQString &errMsg, KStartupLogo::hideIfStillThere(); CurrentProgressDialog::freeze(); - KMessageBox::information(0, i18n("<h3>Inconsistent audio sample rates</h3><p>This composition contains audio files at more than one sample rate.</p><p>Rosegarden will play them at the correct speed, but any audio files that were recorded or imported at rates different from the current JACK server sample rate (%1 Hz) will probably sound awful.</p><p>Please see the audio file manager dialog for more details, and consider resampling any files that are at the wrong rate.</p>").arg(sr), + KMessageBox::information(0, i18n("<h3>Inconsistent audio sample rates</h3><p>This composition contains audio files at more than one sample rate.</p><p>Rosegarden will play them at the correct speed, but any audio files that were recorded or imported at rates different from the current JACK server sample rate (%1 Hz) will probably sound awful.</p><p>Please see the audio file manager dialog for more details, and consider resampling any files that are at the wrong rate.</p>").tqarg(sr), i18n("Inconsistent sample rates"), "file-load-inconsistent-samplerates"); @@ -1695,7 +1695,7 @@ RosegardenGUIDoc::xmlParse(TQString fileContents, TQString &errMsg, TQString type, soName, label; PluginIdentifier::parseIdentifier(ident, type, soName, label); TQString pluginFileName = TQFileInfo(soName).fileName(); - msg += i18n("<li>%1 (from %2)</li>").arg(label).arg(pluginFileName); + msg += i18n("<li>%1 (from %2)</li>").tqarg(label).tqarg(pluginFileName); } msg += "</ul>"; @@ -1834,7 +1834,7 @@ RosegardenGUIDoc::insertRecordedMidi(const MappedComposition &mC) // it's a note-off - //NoteOnMap::iterator mi = m_noteOnEvents.find((*i)->getPitch()); + //NoteOnMap::iterator mi = m_noteOnEvents.tqfind((*i)->getPitch()); PitchMap *pm = &m_noteOnEvents[device][channel]; PitchMap::iterator mi = pm->find(pitch); @@ -2247,7 +2247,7 @@ RosegardenGUIDoc::prepareAudio() TQByteArray data; TQDataStream streamOut(data, IO_WriteOnly); - // We have to pass the filename as a QString + // We have to pass the filename as a TQString // streamOut << TQString(strtoqstr((*it)->getFilename())); streamOut << (int)(*it)->getId(); @@ -2317,7 +2317,7 @@ RosegardenGUIDoc::syncDevices() } delete proc; - RosegardenGUIApp *app = (RosegardenGUIApp*)parent(); + RosegardenGUIApp *app = (RosegardenGUIApp*)tqparent(); app->slotSequencerExited(0); return ; } @@ -2557,7 +2557,7 @@ RosegardenGUIDoc::addRecordMIDISegment(TrackId tid) } else { label = track->getLabel(); } - label = qstrtostr(i18n("%1 (recorded)").arg(strtoqstr(label))); + label = qstrtostr(i18n("%1 (recorded)").tqarg(strtoqstr(label))); } recordMIDISegment->setLabel(label); @@ -2786,7 +2786,7 @@ RosegardenGUIDoc::finalizeAudioFile(InstrumentId iid) // Create a progress dialog // ProgressDialog *progressDlg = new ProgressDialog - (i18n("Generating audio preview..."), 100, (TQWidget*)parent()); + (i18n("Generating audio preview..."), 100, (TQWidget*)tqparent()); progressDlg->setAutoClose(false); progressDlg->setAutoReset(false); progressDlg->show(); @@ -2887,7 +2887,7 @@ RosegardenGUIDoc::updateAudioRecordLatency() m_audioRecordLatency = getAudioRecordLatency(); } -QStringList +TQStringList RosegardenGUIDoc::getTimers() { TQStringList list; @@ -2925,7 +2925,7 @@ RosegardenGUIDoc::getTimers() return list; } - if (replyType != "TQString") { + if (replyType != TQSTRING_OBJECT_NAME_STRING) { RG_DEBUG << "RosegardenGUIDoc::getTimers - " << "wrong reply type (" << replyType << ") from sequencer" << endl; return list; @@ -2941,7 +2941,7 @@ RosegardenGUIDoc::getTimers() return list; } -QString +TQString RosegardenGUIDoc::getCurrentTimer() { TQCString replyType; @@ -2953,7 +2953,7 @@ RosegardenGUIDoc::getCurrentTimer() return ""; } - if (replyType != "TQString") { + if (replyType != TQSTRING_OBJECT_NAME_STRING) { RG_DEBUG << "RosegardenGUIDoc::getCurrentTimer - " << "wrong reply type (" << replyType << ") from sequencer" << endl; return ""; @@ -3070,7 +3070,7 @@ RosegardenGUIDoc::clearAllPlugins() Clipboard* RosegardenGUIDoc::getClipboard() { - RosegardenGUIApp *app = (RosegardenGUIApp*)parent(); + RosegardenGUIApp *app = (RosegardenGUIApp*)tqparent(); return app->getClipboard(); } @@ -3102,13 +3102,13 @@ RosegardenGUIDoc::notifyAudioFileRemoval(AudioFileId id) if (m_audioFileManager.wasAudioFileRecentlyRecorded(id)) { file = m_audioFileManager.getAudioFile(id); - if (file) addOrphanedRecordedAudioFile(file->getFilename()); + if (file) addOrphanedRecordedAudioFile(file->getFilename().c_str()); return; } if (m_audioFileManager.wasAudioFileRecentlyDerived(id)) { file = m_audioFileManager.getAudioFile(id); - if (file) addOrphanedDerivedAudioFile(file->getFilename()); + if (file) addOrphanedDerivedAudioFile(file->getFilename().c_str()); return; } } |