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/gui/configuration/AudioPropertiesPage.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/gui/configuration/AudioPropertiesPage.cpp')
-rw-r--r-- | src/gui/configuration/AudioPropertiesPage.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/src/gui/configuration/AudioPropertiesPage.cpp b/src/gui/configuration/AudioPropertiesPage.cpp index 65d574e..9d0191e 100644 --- a/src/gui/configuration/AudioPropertiesPage.cpp +++ b/src/gui/configuration/AudioPropertiesPage.cpp @@ -36,46 +36,46 @@ #include <kdiskfreesp.h> #include <kfiledialog.h> #include <kfile.h> -#include <qcstring.h> -#include <qdatastream.h> -#include <qdialog.h> -#include <qframe.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qtabwidget.h> -#include <qwidget.h> -#include <qlayout.h> +#include <tqcstring.h> +#include <tqdatastream.h> +#include <tqdialog.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqtabwidget.h> +#include <tqwidget.h> +#include <tqlayout.h> namespace Rosegarden { AudioPropertiesPage::AudioPropertiesPage(RosegardenGUIDoc *doc, - QWidget *parent, + TQWidget *parent, const char *name) : TabbedConfigurationPage(doc, parent, name) { AudioFileManager &afm = doc->getAudioFileManager(); - QFrame *frame = new QFrame(m_tabWidget); - QGridLayout *layout = new QGridLayout(frame, 4, 3, 10, 5); - layout->addWidget(new QLabel(i18n("Audio file path:"), frame), 0, 0); - m_path = new QLabel(QString(afm.getAudioPath().c_str()), frame); + TQFrame *frame = new TQFrame(m_tabWidget); + TQGridLayout *layout = new TQGridLayout(frame, 4, 3, 10, 5); + layout->addWidget(new TQLabel(i18n("Audio file path:"), frame), 0, 0); + m_path = new TQLabel(TQString(afm.getAudioPath().c_str()), frame); layout->addWidget(m_path, 0, 1); m_changePathButton = - new QPushButton(i18n("Choose..."), frame); + new TQPushButton(i18n("Choose..."), frame); layout->addWidget(m_changePathButton, 0, 2); - m_diskSpace = new QLabel(frame); - layout->addWidget(new QLabel(i18n("Disk space remaining:"), frame), 1, 0); + m_diskSpace = new TQLabel(frame); + layout->addWidget(new TQLabel(i18n("Disk space remaining:"), frame), 1, 0); layout->addWidget(m_diskSpace, 1, 1); - m_minutesAtStereo = new QLabel(frame); + m_minutesAtStereo = new TQLabel(frame); layout->addWidget( - new QLabel(i18n("Equivalent minutes of 16-bit stereo:"), + new TQLabel(i18n("Equivalent minutes of 16-bit stereo:"), frame), 2, 0); layout->addWidget(m_minutesAtStereo, 2, 1, AlignCenter); @@ -84,8 +84,8 @@ AudioPropertiesPage::AudioPropertiesPage(RosegardenGUIDoc *doc, calculateStats(); - connect(m_changePathButton, SIGNAL(released()), - SLOT(slotFileDialog())); + connect(m_changePathButton, TQT_SIGNAL(released()), + TQT_SLOT(slotFileDialog())); addTab(frame, i18n("Modify audio path")); } @@ -95,17 +95,17 @@ AudioPropertiesPage::calculateStats() { // This stolen from KDE libs kfile/kpropertiesdialog.cpp // - QString mountPoint = KIO::findPathMountPoint(m_path->text()); + TQString mountPoint = KIO::findPathMountPoint(m_path->text()); KDiskFreeSp * job = new KDiskFreeSp; - connect(job, SIGNAL(foundMountPoint(const QString&, unsigned long, unsigned long, + connect(job, TQT_SIGNAL(foundMountPoint(const TQString&, unsigned long, unsigned long, unsigned long)), - this, SLOT(slotFoundMountPoint(const QString&, unsigned long, unsigned long, + this, TQT_SLOT(slotFoundMountPoint(const TQString&, unsigned long, unsigned long, unsigned long))); job->readDF(mountPoint); } void -AudioPropertiesPage::slotFoundMountPoint(const QString&, +AudioPropertiesPage::slotFoundMountPoint(const TQString&, unsigned long kBSize, unsigned long /*kBUsed*/, unsigned long kBAvail ) @@ -119,12 +119,12 @@ AudioPropertiesPage::slotFoundMountPoint(const QString&, AudioPluginManager *apm = m_doc->getPluginManager(); int sampleRate = 48000; - QCString replyType; - QByteArray replyData; + TQCString replyType; + TQByteArray replyData; if (rgapp->sequencerCall("getSampleRate()", replyType, replyData)) { - QDataStream streamIn(replyData, IO_ReadOnly); + TQDataStream streamIn(replyData, IO_ReadOnly); unsigned int result; streamIn >> result; sampleRate = result; @@ -136,11 +136,11 @@ AudioPropertiesPage::slotFoundMountPoint(const QString&, // float stereoMins = ( float(kBAvail) * 1024.0 ) / ( float(sampleRate) * 2.0 * 2.0 * 60.0 ); - QString minsStr; + TQString minsStr; minsStr.sprintf("%8.1f", stereoMins); m_minutesAtStereo-> - setText(QString("%1 %2 %3Hz").arg(minsStr) + setText(TQString("%1 %2 %3Hz").arg(minsStr) .arg(i18n("minutes at")) .arg(sampleRate)); } @@ -150,18 +150,18 @@ AudioPropertiesPage::slotFileDialog() { AudioFileManager &afm = m_doc->getAudioFileManager(); - KFileDialog *fileDialog = new KFileDialog(QString(afm.getAudioPath().c_str()), - QString::null, + KFileDialog *fileDialog = new KFileDialog(TQString(afm.getAudioPath().c_str()), + TQString::null, this, "file dialog", true); fileDialog->setMode(KFile::Directory); - connect(fileDialog, SIGNAL(fileSelected(const QString&)), - SLOT(slotFileSelected(const QString&))); + connect(fileDialog, TQT_SIGNAL(fileSelected(const TQString&)), + TQT_SLOT(slotFileSelected(const TQString&))); - connect(fileDialog, SIGNAL(destroyed()), - SLOT(slotDirectoryDialogClosed())); + connect(fileDialog, TQT_SIGNAL(destroyed()), + TQT_SLOT(slotDirectoryDialogClosed())); - if (fileDialog->exec() == QDialog::Accepted) { + if (fileDialog->exec() == TQDialog::Accepted) { m_path->setText(fileDialog->selectedFile()); calculateStats(); } @@ -172,7 +172,7 @@ void AudioPropertiesPage::apply() { AudioFileManager &afm = m_doc->getAudioFileManager(); - QString newDir = m_path->text(); + TQString newDir = m_path->text(); if (!newDir.isNull()) { afm.setAudioPath(qstrtostr(newDir)); |