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/document/RosegardenGUIDoc.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/document/RosegardenGUIDoc.cpp')
-rw-r--r-- | src/document/RosegardenGUIDoc.cpp | 304 |
1 files changed, 152 insertions, 152 deletions
diff --git a/src/document/RosegardenGUIDoc.cpp b/src/document/RosegardenGUIDoc.cpp index f89a83f..99cead1 100644 --- a/src/document/RosegardenGUIDoc.cpp +++ b/src/document/RosegardenGUIDoc.cpp @@ -26,7 +26,7 @@ #include "RosegardenGUIDoc.h" #include <kapplication.h> -#include <qxml.h> +#include <tqxml.h> #include "sound/Midi.h" #include "gui/editors/segment/TrackEditor.h" #include "gui/editors/segment/TrackButtons.h" @@ -98,17 +98,17 @@ #include <kprocess.h> #include <kprogress.h> #include <ktempfile.h> -#include <qcstring.h> -#include <qdatastream.h> -#include <qdialog.h> -#include <qdir.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qobject.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qtextstream.h> -#include <qwidget.h> +#include <tqcstring.h> +#include <tqdatastream.h> +#include <tqdialog.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqtextstream.h> +#include <tqwidget.h> #include "gui/widgets/ProgressBar.h" @@ -117,11 +117,11 @@ namespace Rosegarden using namespace BaseProperties; -RosegardenGUIDoc::RosegardenGUIDoc(QWidget *parent, +RosegardenGUIDoc::RosegardenGUIDoc(TQWidget *parent, AudioPluginManager *pluginManager, bool skipAutoload, const char *name) - : QObject(parent, name), + : TQObject(parent, name), m_modified(false), m_autoSaved(false), m_audioPreviewThread(&m_audioFileManager), @@ -137,11 +137,11 @@ RosegardenGUIDoc::RosegardenGUIDoc(QWidget *parent, m_viewList.setAutoDelete(false); m_editViewList.setAutoDelete(false); - connect(m_commandHistory, SIGNAL(commandExecuted(KCommand *)), - this, SLOT(slotDocumentModified())); + connect(m_commandHistory, TQT_SIGNAL(commandExecuted(KCommand *)), + this, TQT_SLOT(slotDocumentModified())); - connect(m_commandHistory, SIGNAL(documentRestored()), - this, SLOT(slotDocumentRestored())); + connect(m_commandHistory, TQT_SIGNAL(documentRestored()), + this, TQT_SLOT(slotDocumentRestored())); // autoload a new document if (!skipAutoload) @@ -203,22 +203,22 @@ void RosegardenGUIDoc::deleteEditViews() m_editViewList.clear(); } -void RosegardenGUIDoc::setAbsFilePath(const QString &filename) +void RosegardenGUIDoc::setAbsFilePath(const TQString &filename) { m_absFilePath = filename; } -void RosegardenGUIDoc::setTitle(const QString &_t) +void RosegardenGUIDoc::setTitle(const TQString &_t) { m_title = _t; } -const QString &RosegardenGUIDoc::getAbsFilePath() const +const TQString &RosegardenGUIDoc::getAbsFilePath() const { return m_absFilePath; } -const QString& RosegardenGUIDoc::getTitle() const +const TQString& RosegardenGUIDoc::getTitle() const { return m_title; } @@ -277,13 +277,13 @@ RosegardenGUIDoc::jumpToQuickMarker() slotSetPointerPosition(m_quickMarkerTime); } -QString RosegardenGUIDoc::getAutoSaveFileName() +TQString RosegardenGUIDoc::getAutoSaveFileName() { - QString filename = getAbsFilePath(); + TQString filename = getAbsFilePath(); if (filename.isEmpty()) - filename = QDir::currentDirPath() + "/" + getTitle(); + filename = TQDir::currentDirPath() + "/" + getTitle(); - QString autoSaveFileName = kapp->tempSaveName(filename); + TQString autoSaveFileName = kapp->tempSaveName(filename); return autoSaveFileName; } @@ -295,13 +295,13 @@ void RosegardenGUIDoc::slotAutoSave() if (isAutoSaved() || !isModified()) return ; - QString autoSaveFileName = getAutoSaveFileName(); + TQString autoSaveFileName = getAutoSaveFileName(); RG_DEBUG << "RosegardenGUIDoc::slotAutoSave() - doc modified - saving '" << getAbsFilePath() << "' as " << autoSaveFileName << endl; - QString errMsg; + TQString errMsg; saveDocument(autoSaveFileName, errMsg, true); @@ -343,15 +343,15 @@ bool RosegardenGUIDoc::saveIfModified() } else { RG_DEBUG << "RosegardenGUIDoc::saveIfModified() : regular file\n"; - QString errMsg; + TQString errMsg; completed = saveDocument(getAbsFilePath(), errMsg); if (!completed) { if (errMsg) { - KMessageBox::error(0, i18n(QString("Could not save document at %1\n(%2)") + KMessageBox::error(0, i18n(TQString("Could not save document at %1\n(%2)") .arg(getAbsFilePath()).arg(errMsg))); } else { - KMessageBox::error(0, i18n(QString("Could not save document at %1") + KMessageBox::error(0, i18n(TQString("Could not save document at %1") .arg(getAbsFilePath()))); } } @@ -362,7 +362,7 @@ bool RosegardenGUIDoc::saveIfModified() case KMessageBox::No: // delete the autosave file so it won't annoy // the user when reloading the file. - QFile::remove + TQFile::remove (getAutoSaveFileName()); completed = true; break; @@ -391,8 +391,8 @@ bool RosegardenGUIDoc::saveIfModified() bool RosegardenGUIDoc::deleteOrphanedAudioFiles(bool documentWillNotBeSaved) { - std::vector<QString> recordedOrphans; - std::vector<QString> derivedOrphans; + std::vector<TQString> recordedOrphans; + std::vector<TQString> derivedOrphans; if (documentWillNotBeSaved) { @@ -419,7 +419,7 @@ RosegardenGUIDoc::deleteOrphanedAudioFiles(bool documentWillNotBeSaved) // (i.e. they haven't been loaded more than once, or reloaded // after orphaning). - for (std::vector<QString>::iterator i = m_orphanedRecordedAudioFiles.begin(); + for (std::vector<TQString>::iterator i = m_orphanedRecordedAudioFiles.begin(); i != m_orphanedRecordedAudioFiles.end(); ++i) { bool stillHave = false; @@ -441,7 +441,7 @@ RosegardenGUIDoc::deleteOrphanedAudioFiles(bool documentWillNotBeSaved) //is not currently used in a segment? Probably: we have no way to //reuse them - for (std::vector<QString>::iterator i = m_orphanedDerivedAudioFiles.begin(); + for (std::vector<TQString>::iterator i = m_orphanedDerivedAudioFiles.begin(); i != m_orphanedDerivedAudioFiles.end(); ++i) { bool stillHave = false; @@ -459,11 +459,11 @@ RosegardenGUIDoc::deleteOrphanedAudioFiles(bool documentWillNotBeSaved) } for (size_t i = 0; i < derivedOrphans.size(); ++i) { - QFile file(derivedOrphans[i]); + TQFile file(derivedOrphans[i]); if (!file.remove()) { std::cerr << "WARNING: Failed to remove orphaned derived audio file \"" << derivedOrphans[i] << std::endl; } - QFile peakFile(QString("%1.pk").arg(derivedOrphans[i])); + TQFile peakFile(TQString("%1.pk").arg(derivedOrphans[i])); peakFile.remove(); } @@ -501,7 +501,7 @@ RosegardenGUIDoc::deleteOrphanedAudioFiles(bool documentWillNotBeSaved) i18n("The following audio files were recorded during this session but have been unloaded\nfrom the audio file manager, and so are no longer in use in the document you are saving.\n\nYou may want to clean up these files to save disk space.\n\nPlease select any you wish to delete permanently from the hard disk.\n"), recordedOrphans); - if (dialog->exec() != QDialog::Accepted) { + if (dialog->exec() != TQDialog::Accepted) { delete dialog; return true; } @@ -513,20 +513,20 @@ RosegardenGUIDoc::deleteOrphanedAudioFiles(bool documentWillNotBeSaved) if (recordedOrphans.empty()) return true; - QString question = + TQString question = i18n("<qt>About to delete 1 audio file permanently from the hard disk.<br>There will be no way to recover this file.<br>Are you sure?</qt>\n", "<qt>About to delete %n audio files permanently from the hard disk.<br>There will be no way to recover these files.<br>Are you sure?</qt>", recordedOrphans.size()); int reply = KMessageBox::warningContinueCancel(0, question); if (reply == KMessageBox::Continue) { for (size_t i = 0; i < recordedOrphans.size(); ++i) { - QFile file(recordedOrphans[i]); + TQFile file(recordedOrphans[i]); if (!file.remove()) { KMessageBox::error(0, i18n("File %1 could not be deleted.") .arg(recordedOrphans[i])); } - QFile peakFile(QString("%1.pk").arg(recordedOrphans[i])); + TQFile peakFile(TQString("%1.pk").arg(recordedOrphans[i])); peakFile.remove(); } } @@ -537,17 +537,17 @@ RosegardenGUIDoc::deleteOrphanedAudioFiles(bool documentWillNotBeSaved) void RosegardenGUIDoc::newDocument() { setModified(false); - setAbsFilePath(QString::null); + setAbsFilePath(TQString::null); setTitle(i18n("Untitled")); m_commandHistory->clear(); } void RosegardenGUIDoc::performAutoload() { - QString autoloadFile = + TQString autoloadFile = KGlobal::dirs()->findResource("appdata", "autoload.rg"); - QFileInfo autoloadFileInfo(autoloadFile); + TQFileInfo autoloadFileInfo(autoloadFile); if (!autoloadFileInfo.isReadable()) { RG_DEBUG << "RosegardenGUIDoc::performAutoload - " @@ -559,7 +559,7 @@ void RosegardenGUIDoc::performAutoload() } -bool RosegardenGUIDoc::openDocument(const QString& filename, +bool RosegardenGUIDoc::openDocument(const TQString& filename, bool permanent, const char* /*format*/ /*=0*/) { @@ -571,30 +571,30 @@ bool RosegardenGUIDoc::openDocument(const QString& filename, newDocument(); - QFileInfo fileInfo(filename); + TQFileInfo fileInfo(filename); setTitle(fileInfo.fileName()); // Check if file readable with fileInfo ? if (!fileInfo.isReadable() || fileInfo.isDir()) { KStartupLogo::hideIfStillThere(); - QString msg(i18n("Can't open file '%1'").arg(filename)); + TQString msg(i18n("Can't open file '%1'").arg(filename)); KMessageBox::sorry(0, msg); return false; } ProgressDialog progressDlg(i18n("Reading file..."), 100, - (QWidget*)parent()); + (TQWidget*)parent()); - connect(&progressDlg, SIGNAL(cancelClicked()), - &m_audioFileManager, SLOT(slotStopPreview())); + connect(&progressDlg, TQT_SIGNAL(cancelClicked()), + &m_audioFileManager, TQT_SLOT(slotStopPreview())); progressDlg.setMinimumDuration(500); progressDlg.setAutoReset(true); // we're re-using it for the preview generation setAbsFilePath(fileInfo.absFilePath()); - QString errMsg; - QString fileContents; + TQString errMsg; + TQString fileContents; bool cancelled = false, okay = true; KFilterDev* fileCompressedDevice = static_cast<KFilterDev*>(KFilterDev::deviceForFile(filename, "application/x-gzip")); @@ -624,7 +624,7 @@ bool RosegardenGUIDoc::openDocument(const QString& filename, fileCompressedDevice->close(); - QString fileContents = QString::fromUtf8(&baseBuffer[0], + TQString fileContents = TQString::fromUtf8(&baseBuffer[0], baseBuffer.size()); // parse xml file @@ -638,7 +638,7 @@ bool RosegardenGUIDoc::openDocument(const QString& filename, if (!okay) { KStartupLogo::hideIfStillThere(); - QString msg(i18n("Error when parsing file '%1': \"%2\"") + TQString msg(i18n("Error when parsing file '%1': \"%2\"") .arg(filename) .arg(errMsg)); @@ -688,8 +688,8 @@ bool RosegardenGUIDoc::openDocument(const QString& filename, // reuse the previous one progressDlg.setLabel(i18n("Generating audio previews...")); - connect(&m_audioFileManager, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); + connect(&m_audioFileManager, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); try { // generate any audio previews after loading the files m_audioFileManager.generatePreviews(); @@ -826,8 +826,8 @@ RosegardenGUIDoc::mergeDocument(RosegardenGUIDoc *doc, void RosegardenGUIDoc::clearStudio() { - QCString replyType; - QByteArray replyData; + TQCString replyType; + TQByteArray replyData; rgapp->sequencerCall("clearStudio()", replyType, replyData); RG_DEBUG << "cleared studio\n"; } @@ -1140,11 +1140,11 @@ int RosegardenGUIDoc::FILE_FORMAT_VERSION_POINT = 0; -bool RosegardenGUIDoc::saveDocument(const QString& filename, - QString& errMsg, +bool RosegardenGUIDoc::saveDocument(const TQString& filename, + TQString& errMsg, bool autosave) { - if (!QFileInfo(filename).exists()) { // safe to write directly + if (!TQFileInfo(filename).exists()) { // safe to write directly return saveDocumentActual(filename, errMsg, autosave); } @@ -1152,18 +1152,18 @@ bool RosegardenGUIDoc::saveDocument(const QString& filename, int status = temp.status(); if (status != 0) { - errMsg = i18n(QString("Could not create temporary file in directory of '%1': %2").arg(filename).arg(strerror(status))); + errMsg = i18n(TQString("Could not create temporary file in directory of '%1': %2").arg(filename).arg(strerror(status))); return false; } - QString tempFileName = temp.name(); + TQString tempFileName = temp.name(); RG_DEBUG << "Temporary file name is: \"" << tempFileName << "\"" << endl; // KTempFile creates a temporary file that is already open: close it if (!temp.close()) { status = temp.status(); - errMsg = i18n(QString("Failure in temporary file handling for file '%1': %2") + errMsg = i18n(TQString("Failure in temporary file handling for file '%1': %2") .arg(tempFileName).arg(strerror(status))); return false; } @@ -1175,9 +1175,9 @@ bool RosegardenGUIDoc::saveDocument(const QString& filename, return false; } - QDir dir(QFileInfo(tempFileName).dir()); + TQDir dir(TQFileInfo(tempFileName).dir()); if (!dir.rename(tempFileName, filename)) { - errMsg = i18n(QString("Failed to rename temporary output file '%1' to desired output file '%2'").arg(tempFileName).arg(filename)); + errMsg = i18n(TQString("Failed to rename temporary output file '%1' to desired output file '%2'").arg(tempFileName).arg(filename)); return false; } @@ -1185,8 +1185,8 @@ bool RosegardenGUIDoc::saveDocument(const QString& filename, } -bool RosegardenGUIDoc::saveDocumentActual(const QString& filename, - QString& errMsg, +bool RosegardenGUIDoc::saveDocumentActual(const TQString& filename, + TQString& errMsg, bool autosave) { Profiler profiler("RosegardenGUIDoc::saveDocumentActual"); @@ -1198,14 +1198,14 @@ bool RosegardenGUIDoc::saveDocumentActual(const QString& filename, if (!rc) { // do some error report - errMsg = i18n(QString("Could not open file '%1' for writing").arg(filename)); + errMsg = i18n(TQString("Could not open file '%1' for writing").arg(filename)); delete fileCompressedDevice; return false; // couldn't open file } - QTextStream outStream(fileCompressedDevice); - outStream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream outStream(fileCompressedDevice); + outStream.setEncoding(TQTextStream::UnicodeUTF8); // output XML header // @@ -1224,7 +1224,7 @@ bool RosegardenGUIDoc::saveDocumentActual(const QString& filename, progressDlg = new ProgressDialog(i18n("Saving file..."), 100, - (QWidget*)parent()); + (TQWidget*)parent()); progress = progressDlg->progressBar(); progressDlg->setMinimumDuration(500); @@ -1281,7 +1281,7 @@ bool RosegardenGUIDoc::saveDocumentActual(const QString& filename, m_composition.getTriggerSegments().begin(); ci != m_composition.getTriggerSegments().end(); ++ci) { - QString triggerAtts = QString + TQString triggerAtts = QString ("triggerid=\"%1\" triggerbasepitch=\"%2\" triggerbasevelocity=\"%3\" triggerretune=\"%4\" triggeradjusttimes=\"%5\" ") .arg((*ci)->getId()) .arg((*ci)->getBasePitch()) @@ -1315,7 +1315,7 @@ bool RosegardenGUIDoc::saveDocumentActual(const QString& filename, // check that all went ok // if (fileCompressedDevice->status() != IO_Ok) { - errMsg = i18n(QString("Error while writing on '%1'").arg(filename)); + errMsg = i18n(TQString("Error while writing on '%1'").arg(filename)); delete fileCompressedDevice; return false; } @@ -1340,7 +1340,7 @@ bool RosegardenGUIDoc::saveDocumentActual(const QString& filename, return true; } -bool RosegardenGUIDoc::exportStudio(const QString& filename, +bool RosegardenGUIDoc::exportStudio(const TQString& filename, std::vector<DeviceId> devices) { Profiler profiler("RosegardenGUIDoc::exportStudio"); @@ -1350,8 +1350,8 @@ bool RosegardenGUIDoc::exportStudio(const QString& filename, KFilterDev* fileCompressedDevice = static_cast<KFilterDev*>(KFilterDev::deviceForFile(filename, "application/x-gzip")); fileCompressedDevice->setOrigFileName("audio/x-rosegarden-device"); fileCompressedDevice->open(IO_WriteOnly); - QTextStream outStream(fileCompressedDevice); - outStream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream outStream(fileCompressedDevice); + outStream.setEncoding(TQTextStream::UnicodeUTF8); // output XML header // @@ -1373,13 +1373,13 @@ bool RosegardenGUIDoc::exportStudio(const QString& filename, return true; } -void RosegardenGUIDoc::saveSegment(QTextStream& outStream, Segment *segment, +void RosegardenGUIDoc::saveSegment(TQTextStream& outStream, Segment *segment, KProgress* progress, long totalEvents, long &count, - QString extraAttributes) + TQString extraAttributes) { - QString time; + TQString time; - outStream << QString("<segment track=\"%1\" start=\"%2\" ") + outStream << TQString("<segment track=\"%1\" start=\"%2\" ") .arg(segment->getTrack()) .arg(segment->getStartTime()); @@ -1566,7 +1566,7 @@ bool RosegardenGUIDoc::isSequencerRunning() } bool -RosegardenGUIDoc::xmlParse(QString fileContents, QString &errMsg, +RosegardenGUIDoc::xmlParse(TQString fileContents, TQString &errMsg, ProgressDialog *progress, unsigned int elementCount, bool permanent, @@ -1577,19 +1577,19 @@ RosegardenGUIDoc::xmlParse(QString fileContents, QString &errMsg, RoseXmlHandler handler(this, elementCount, permanent); if (progress) { - connect(&handler, SIGNAL(setProgress(int)), - progress->progressBar(), SLOT(setValue(int))); - connect(&handler, SIGNAL(setOperationName(QString)), - progress, SLOT(slotSetOperationName(QString))); - connect(&handler, SIGNAL(incrementProgress(int)), - progress->progressBar(), SLOT(advance(int))); - connect(progress, SIGNAL(cancelClicked()), - &handler, SLOT(slotCancel())); + connect(&handler, TQT_SIGNAL(setProgress(int)), + progress->progressBar(), TQT_SLOT(setValue(int))); + connect(&handler, TQT_SIGNAL(setOperationName(TQString)), + progress, TQT_SLOT(slotSetOperationName(TQString))); + connect(&handler, TQT_SIGNAL(incrementProgress(int)), + progress->progressBar(), TQT_SLOT(advance(int))); + connect(progress, TQT_SIGNAL(cancelClicked()), + &handler, TQT_SLOT(slotCancel())); } - QXmlInputSource source; + TQXmlInputSource source; source.setData(fileContents); - QXmlSimpleReader reader; + TQXmlSimpleReader reader; reader.setContentHandler(&handler); reader.setErrorHandler(&handler); @@ -1687,14 +1687,14 @@ RosegardenGUIDoc::xmlParse(QString fileContents, QString &errMsg, // another file (which is the normal case in which we // have no plugin manager). - QString msg(i18n("<h3>Plugins not found</h3><p>The following audio plugins could not be loaded:</p><ul>")); + TQString msg(i18n("<h3>Plugins not found</h3><p>The following audio plugins could not be loaded:</p><ul>")); - for (std::set<QString>::iterator i = handler.pluginsNotFound().begin(); + for (std::set<TQString>::iterator i = handler.pluginsNotFound().begin(); i != handler.pluginsNotFound().end(); ++i) { - QString ident = *i; - QString type, soName, label; + TQString ident = *i; + TQString type, soName, label; PluginIdentifier::parseIdentifier(ident, type, soName, label); - QString pluginFileName = QFileInfo(soName).fileName(); + TQString pluginFileName = TQFileInfo(soName).fileName(); msg += i18n("<li>%1 (from %2)</li>").arg(label).arg(pluginFileName); } msg += "</ul>"; @@ -1709,7 +1709,7 @@ RosegardenGUIDoc::xmlParse(QString fileContents, QString &errMsg, if (handler.isDeprecated() && !shownWarning) { - QString msg(i18n("This file contains one or more old element types that are now deprecated.\nSupport for these elements may disappear in future versions of Rosegarden.\nWe recommend you re-save this file from this version of Rosegarden to ensure that it can still be re-loaded in future versions.")); + TQString msg(i18n("This file contains one or more old element types that are now deprecated.\nSupport for these elements may disappear in future versions of Rosegarden.\nWe recommend you re-save this file from this version of Rosegarden to ensure that it can still be re-loaded in future versions.")); slotDocumentModified(); // so file can be re-saved immediately KStartupLogo::hideIfStillThere(); @@ -2234,8 +2234,8 @@ RosegardenGUIDoc::prepareAudio() if (!isSequencerRunning()) return ; - QCString replyType; - QByteArray replyData; + TQCString replyType; + TQByteArray replyData; // Clear down the sequencer AudioFilePlayer object // @@ -2244,16 +2244,16 @@ RosegardenGUIDoc::prepareAudio() for (AudioFileManagerIterator it = m_audioFileManager.begin(); it != m_audioFileManager.end(); it++) { - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); // We have to pass the filename as a QString // - streamOut << QString(strtoqstr((*it)->getFilename())); + streamOut << TQString(strtoqstr((*it)->getFilename())); streamOut << (int)(*it)->getId(); - rgapp->sequencerCall("addAudioFile(QString, int)", replyType, replyData, data); - QDataStream streamIn(replyData, IO_ReadOnly); + rgapp->sequencerCall("addAudioFile(TQString, int)", replyType, replyData, data); + TQDataStream streamIn(replyData, IO_ReadOnly); int result; streamIn >> result; if (!result) { @@ -2330,14 +2330,14 @@ RosegardenGUIDoc::syncDevices() static bool setTimer = false; if (!setTimer) { kapp->config()->setGroup(SequencerOptionsConfigGroup); - QString currentTimer = getCurrentTimer(); + TQString currentTimer = getCurrentTimer(); currentTimer = kapp->config()->readEntry("timer", currentTimer); setCurrentTimer(currentTimer); setTimer = true; } - QByteArray replyData; - QCString replyType; + TQByteArray replyData; + TQCString replyType; // Get number of devices the sequencer has found // @@ -2346,7 +2346,7 @@ RosegardenGUIDoc::syncDevices() unsigned int devices = 0; if (replyType == "unsigned int") { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); reply >> devices; } else { RG_DEBUG << "RosegardenGUIDoc::syncDevices - " @@ -2389,10 +2389,10 @@ RosegardenGUIDoc::syncDevices() void RosegardenGUIDoc::getMappedDevice(DeviceId id) { - QByteArray data; - QByteArray replyData; - QCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQByteArray replyData; + TQCString replyType; + TQDataStream arg(data, IO_WriteOnly); arg << (unsigned int)id; @@ -2400,7 +2400,7 @@ RosegardenGUIDoc::getMappedDevice(DeviceId id) replyType, replyData, data); MappedDevice *mD = new MappedDevice(); - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if (replyType == "MappedDevice") // unfurl @@ -2786,16 +2786,16 @@ RosegardenGUIDoc::finalizeAudioFile(InstrumentId iid) // Create a progress dialog // ProgressDialog *progressDlg = new ProgressDialog - (i18n("Generating audio preview..."), 100, (QWidget*)parent()); + (i18n("Generating audio preview..."), 100, (TQWidget*)parent()); progressDlg->setAutoClose(false); progressDlg->setAutoReset(false); progressDlg->show(); - connect(progressDlg, SIGNAL(cancelClicked()), - &m_audioFileManager, SLOT(slotStopPreview())); + connect(progressDlg, TQT_SIGNAL(cancelClicked()), + &m_audioFileManager, TQT_SLOT(slotStopPreview())); - connect(&m_audioFileManager, SIGNAL(setProgress(int)), - progressDlg->progressBar(), SLOT(setValue(int))); + connect(&m_audioFileManager, TQT_SIGNAL(setProgress(int)), + progressDlg->progressBar(), TQT_SLOT(setValue(int))); try { m_audioFileManager.generatePreview(newAudioFile->getId()); @@ -2828,11 +2828,11 @@ RosegardenGUIDoc::finalizeAudioFile(InstrumentId iid) // don't get a return type. Ugly and hacky but it appears to // work for me - so hey. // - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); - streamOut << QString(strtoqstr(newAudioFile->getFilename())); + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); + streamOut << TQString(strtoqstr(newAudioFile->getFilename())); streamOut << (int)newAudioFile->getId(); - rgapp->sequencerSend("addAudioFile(QString, int)", data); + rgapp->sequencerSend("addAudioFile(TQString, int)", data); // clear down m_recordAudioSegments.erase(iid); @@ -2842,8 +2842,8 @@ RosegardenGUIDoc::finalizeAudioFile(InstrumentId iid) RealTime RosegardenGUIDoc::getAudioPlayLatency() { - QCString replyType; - QByteArray replyData; + TQCString replyType; + TQByteArray replyData; if (!rgapp->sequencerCall("getAudioPlayLatency()", replyType, replyData)) { RG_DEBUG << "RosegardenGUIDoc::getAudioPlayLatency - " @@ -2853,7 +2853,7 @@ RosegardenGUIDoc::getAudioPlayLatency() } // ensure the return type is ok - QDataStream streamIn(replyData, IO_ReadOnly); + TQDataStream streamIn(replyData, IO_ReadOnly); MappedRealTime result; streamIn >> result; @@ -2863,8 +2863,8 @@ RosegardenGUIDoc::getAudioPlayLatency() RealTime RosegardenGUIDoc::getAudioRecordLatency() { - QCString replyType; - QByteArray replyData; + TQCString replyType; + TQByteArray replyData; if (!rgapp->sequencerCall("getAudioRecordLatency()", replyType, replyData)) { RG_DEBUG << "RosegardenGUIDoc::getAudioRecordLatency - " @@ -2874,7 +2874,7 @@ RosegardenGUIDoc::getAudioRecordLatency() } // ensure the return type is ok - QDataStream streamIn(replyData, IO_ReadOnly); + TQDataStream streamIn(replyData, IO_ReadOnly); MappedRealTime result; streamIn >> result; @@ -2890,10 +2890,10 @@ RosegardenGUIDoc::updateAudioRecordLatency() QStringList RosegardenGUIDoc::getTimers() { - QStringList list; + TQStringList list; - QCString replyType; - QByteArray replyData; + TQCString replyType; + TQByteArray replyData; if (!rgapp->sequencerCall("getTimers()", replyType, replyData)) { RG_DEBUG << "RosegardenGUIDoc::getTimers - " @@ -2907,14 +2907,14 @@ RosegardenGUIDoc::getTimers() return list; } - QDataStream streamIn(replyData, IO_ReadOnly); + TQDataStream streamIn(replyData, IO_ReadOnly); unsigned int count = 0; streamIn >> count; for (unsigned int i = 0; i < count; ++i) { - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); streamOut << i; @@ -2925,14 +2925,14 @@ RosegardenGUIDoc::getTimers() return list; } - if (replyType != "QString") { + if (replyType != "TQString") { RG_DEBUG << "RosegardenGUIDoc::getTimers - " << "wrong reply type (" << replyType << ") from sequencer" << endl; return list; } - QDataStream streamIn(replyData, IO_ReadOnly); - QString name; + TQDataStream streamIn(replyData, IO_ReadOnly); + TQString name; streamIn >> name; list.push_back(name); @@ -2944,8 +2944,8 @@ RosegardenGUIDoc::getTimers() QString RosegardenGUIDoc::getCurrentTimer() { - QCString replyType; - QByteArray replyData; + TQCString replyType; + TQByteArray replyData; if (!rgapp->sequencerCall("getCurrentTimer()", replyType, replyData)) { RG_DEBUG << "RosegardenGUIDoc::getCurrentTimer - " @@ -2953,30 +2953,30 @@ RosegardenGUIDoc::getCurrentTimer() return ""; } - if (replyType != "QString") { + if (replyType != "TQString") { RG_DEBUG << "RosegardenGUIDoc::getCurrentTimer - " << "wrong reply type (" << replyType << ") from sequencer" << endl; return ""; } - QDataStream streamIn(replyData, IO_ReadOnly); - QString name; + TQDataStream streamIn(replyData, IO_ReadOnly); + TQString name; streamIn >> name; return name; } void -RosegardenGUIDoc::setCurrentTimer(QString name) +RosegardenGUIDoc::setCurrentTimer(TQString name) { - QCString replyType; - QByteArray replyData; + TQCString replyType; + TQByteArray replyData; - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); streamOut << name; - if (!rgapp->sequencerCall("setCurrentTimer(QString)", + if (!rgapp->sequencerCall("setCurrentTimer(TQString)", replyType, replyData, data)) { RG_DEBUG << "RosegardenGUIDoc::setCurrentTimer - " << "failed to contact Rosegarden sequencer" << endl; @@ -3082,14 +3082,14 @@ void RosegardenGUIDoc::slotDocColoursChanged() } void -RosegardenGUIDoc::addOrphanedRecordedAudioFile(QString fileName) +RosegardenGUIDoc::addOrphanedRecordedAudioFile(TQString fileName) { m_orphanedRecordedAudioFiles.push_back(fileName); slotDocumentModified(); } void -RosegardenGUIDoc::addOrphanedDerivedAudioFile(QString fileName) +RosegardenGUIDoc::addOrphanedDerivedAudioFile(TQString fileName) { m_orphanedDerivedAudioFiles.push_back(fileName); slotDocumentModified(); |