summaryrefslogtreecommitdiffstats
path: root/src/gui/configuration/AudioConfigurationPage.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-06 20:59:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-06 20:59:29 +0000
commit11f31c37e5fa4889d9989f10272f44845449cb7b (patch)
tree4383da04a76c497950d957fc6120b0fd0d9082c2 /src/gui/configuration/AudioConfigurationPage.cpp
parent832eb69d571e8e518db45d0c0e6fbc0f00690209 (diff)
downloadrosegarden-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/AudioConfigurationPage.cpp')
-rw-r--r--src/gui/configuration/AudioConfigurationPage.cpp108
1 files changed, 54 insertions, 54 deletions
diff --git a/src/gui/configuration/AudioConfigurationPage.cpp b/src/gui/configuration/AudioConfigurationPage.cpp
index 28aff71..6361576 100644
--- a/src/gui/configuration/AudioConfigurationPage.cpp
+++ b/src/gui/configuration/AudioConfigurationPage.cpp
@@ -41,23 +41,23 @@
#include <kcombobox.h>
#include <kconfig.h>
#include <kfiledialog.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qcstring.h>
-#include <qdatastream.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qobject.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qslider.h>
-#include <qspinbox.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtabwidget.h>
-#include <qtooltip.h>
-#include <qwidget.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqobject.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqslider.h>
+#include <tqspinbox.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtabwidget.h>
+#include <tqtooltip.h>
+#include <tqwidget.h>
#include <kmessagebox.h>
@@ -67,7 +67,7 @@ namespace Rosegarden
AudioConfigurationPage::AudioConfigurationPage(
RosegardenGUIDoc *doc,
KConfig *cfg,
- QWidget *parent,
+ TQWidget *parent,
const char *name):
TabbedConfigurationPage(cfg, parent, name),
m_externalAudioEditorPath(0)
@@ -77,10 +77,10 @@ AudioConfigurationPage::AudioConfigurationPage(
m_cfg->setGroup(SequencerOptionsConfigGroup);
- QFrame *frame = new QFrame(m_tabWidget);
- QGridLayout *layout = new QGridLayout(frame, 7, 2, 10, 5);
+ TQFrame *frame = new TQFrame(m_tabWidget);
+ TQGridLayout *layout = new TQGridLayout(frame, 7, 2, 10, 5);
- QLabel *label = 0;
+ TQLabel *label = 0;
int row = 0;
@@ -89,7 +89,7 @@ AudioConfigurationPage::AudioConfigurationPage(
layout->setRowSpacing(row, 15);
++row;
- layout->addWidget(new QLabel(i18n("Audio preview scale"),
+ layout->addWidget(new TQLabel(i18n("Audio preview scale"),
frame), row, 0);
m_previewStyle = new KComboBox(frame);
@@ -102,7 +102,7 @@ AudioConfigurationPage::AudioConfigurationPage(
#ifdef HAVE_LIBJACK
m_cfg->setGroup(SequencerOptionsConfigGroup);
- label = new QLabel(i18n("Record audio files as"), frame);
+ label = new TQLabel(i18n("Record audio files as"), frame);
m_audioRecFormat = new KComboBox(frame);
m_audioRecFormat->insertItem(i18n("16-bit PCM WAV format (smaller files)"));
m_audioRecFormat->insertItem(i18n("32-bit float WAV format (higher quality)"));
@@ -114,14 +114,14 @@ AudioConfigurationPage::AudioConfigurationPage(
m_cfg->setGroup(GeneralOptionsConfigGroup);
- layout->addWidget(new QLabel(i18n("External audio editor"), frame),
+ layout->addWidget(new TQLabel(i18n("External audio editor"), frame),
row, 0);
- QString defaultAudioEditor = getBestAvailableAudioEditor();
+ TQString defaultAudioEditor = getBestAvailableAudioEditor();
std::cerr << "defaultAudioEditor = " << defaultAudioEditor << std::endl;
- QString externalAudioEditor = m_cfg->readEntry("externalaudioeditor",
+ TQString externalAudioEditor = m_cfg->readEntry("externalaudioeditor",
defaultAudioEditor);
if (externalAudioEditor == "") {
@@ -129,32 +129,32 @@ AudioConfigurationPage::AudioConfigurationPage(
m_cfg->writeEntry("externalaudioeditor", externalAudioEditor);
}
- m_externalAudioEditorPath = new QLineEdit(externalAudioEditor, frame);
+ m_externalAudioEditorPath = new TQLineEdit(externalAudioEditor, frame);
// m_externalAudioEditorPath->setMinimumWidth(150);
layout->addWidget(m_externalAudioEditorPath, row, 1);
- QPushButton *changePathButton =
- new QPushButton(i18n("Choose..."), frame);
+ TQPushButton *changePathButton =
+ new TQPushButton(i18n("Choose..."), frame);
layout->addWidget(changePathButton, row, 2);
- connect(changePathButton, SIGNAL(clicked()), SLOT(slotFileDialog()));
+ connect(changePathButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotFileDialog()));
++row;
m_cfg->setGroup(SequencerOptionsConfigGroup);
- layout->addWidget(new QLabel(i18n("Create JACK outputs"), frame),
+ layout->addWidget(new TQLabel(i18n("Create JACK outputs"), frame),
row, 0);
// ++row;
#ifdef HAVE_LIBJACK
- m_createFaderOuts = new QCheckBox(i18n("for individual audio instruments"), frame);
+ m_createFaderOuts = new TQCheckBox(i18n("for individual audio instruments"), frame);
m_createFaderOuts->setChecked(m_cfg->readBoolEntry("audiofaderouts", false));
// layout->addWidget(label, row, 0, Qt::AlignRight);
layout->addWidget(m_createFaderOuts, row, 1);
++row;
- m_createSubmasterOuts = new QCheckBox(i18n("for submasters"), frame);
+ m_createSubmasterOuts = new TQCheckBox(i18n("for submasters"), frame);
m_createSubmasterOuts->setChecked(m_cfg->readBoolEntry("audiosubmasterouts",
false));
@@ -173,15 +173,15 @@ AudioConfigurationPage::AudioConfigurationPage(
#define OFFER_JACK_START_OPTION 1
#ifdef OFFER_JACK_START_OPTION
- frame = new QFrame(m_tabWidget);
- layout = new QGridLayout(frame, 8, 4, 10, 5);
+ frame = new TQFrame(m_tabWidget);
+ layout = new TQGridLayout(frame, 8, 4, 10, 5);
row = 0;
layout->setRowSpacing(row, 15);
++row;
- label = new QLabel(i18n("Rosegarden can start the JACK audio daemon (jackd) for you automatically if it isn't already running when Rosegarden starts.\n\nThis is recommended for beginners and those who use Rosegarden as their main audio application, but it might not be to the liking of advanced users.\n\nIf you want to start JACK automatically, make sure the command includes a full path where necessary as well as any command-line arguments you want to use.\n\nFor example: /usr/local/bin/jackd -d alsa -d hw -r44100 -p 2048 -n 2\n\n"), frame);
+ label = new TQLabel(i18n("Rosegarden can start the JACK audio daemon (jackd) for you automatically if it isn't already running when Rosegarden starts.\n\nThis is recommended for beginners and those who use Rosegarden as their main audio application, but it might not be to the liking of advanced users.\n\nIf you want to start JACK automatically, make sure the command includes a full path where necessary as well as any command-line arguments you want to use.\n\nFor example: /usr/local/bin/jackd -d alsa -d hw -r44100 -p 2048 -n 2\n\n"), frame);
label->setAlignment(Qt::WordBreak);
layout->addMultiCellWidget(label, row, row, 0, 3);
@@ -190,21 +190,21 @@ AudioConfigurationPage::AudioConfigurationPage(
// JACK control things
//
bool startJack = m_cfg->readBoolEntry("jackstart", false);
- m_startJack = new QCheckBox(frame);
+ m_startJack = new TQCheckBox(frame);
m_startJack->setChecked(startJack);
- layout->addWidget(new QLabel(i18n("Start JACK when Rosegarden starts"), frame), 2, 0);
+ layout->addWidget(new TQLabel(i18n("Start JACK when Rosegarden starts"), frame), 2, 0);
layout->addWidget(m_startJack, row, 1);
++row;
- layout->addWidget(new QLabel(i18n("JACK command"), frame),
+ layout->addWidget(new TQLabel(i18n("JACK command"), frame),
row, 0);
- QString jackPath = m_cfg->readEntry("jackcommand",
+ TQString jackPath = m_cfg->readEntry("jackcommand",
// "/usr/local/bin/jackd -d alsa -d hw -r 44100 -p 2048 -n 2");
"/usr/bin/qjackctl -s");
- m_jackPath = new QLineEdit(jackPath, frame);
+ m_jackPath = new TQLineEdit(jackPath, frame);
layout->addMultiCellWidget(m_jackPath, row, row, 1, 3);
++row;
@@ -221,7 +221,7 @@ AudioConfigurationPage::AudioConfigurationPage(
void
AudioConfigurationPage::slotFileDialog()
{
- QString path = KFileDialog::getOpenFileName(QString::null, QString::null, this, i18n("External audio editor path"));
+ TQString path = KFileDialog::getOpenFileName(TQString::null, TQString::null, this, i18n("External audio editor path"));
m_externalAudioEditorPath->setText(path);
}
@@ -250,14 +250,14 @@ AudioConfigurationPage::apply()
int previewstyle = m_previewStyle->currentItem();
m_cfg->writeEntry("audiopreviewstyle", previewstyle);
- QString externalAudioEditor = getExternalAudioEditor();
+ TQString externalAudioEditor = getExternalAudioEditor();
- QStringList extlist = QStringList::split(" ", externalAudioEditor);
- QString extpath = "";
+ TQStringList extlist = TQStringList::split(" ", externalAudioEditor);
+ TQString extpath = "";
if (extlist.size() > 0) extpath = extlist[0];
if (extpath != "") {
- QFileInfo info(extpath);
+ TQFileInfo info(extpath);
if (!info.exists() || !info.isExecutable()) {
KMessageBox::error(0, i18n("External audio editor \"%1\" not found or not executable").arg(extpath));
m_cfg->writeEntry("externalaudioeditor", "");
@@ -272,17 +272,17 @@ AudioConfigurationPage::apply()
QString
AudioConfigurationPage::getBestAvailableAudioEditor()
{
- static QString result = "";
+ static TQString result = "";
static bool haveResult = false;
if (haveResult) return result;
- QString path;
+ TQString path;
const char *cpath = getenv("PATH");
if (cpath) path = cpath;
else path = "/usr/bin:/bin";
- QStringList pathList = QStringList::split(":", path);
+ TQStringList pathList = TQStringList::split(":", path);
const char *candidates[] = {
"mhwaveedit",
@@ -294,19 +294,19 @@ AudioConfigurationPage::getBestAvailableAudioEditor()
i < sizeof(candidates)/sizeof(candidates[0]) && result == "";
i++) {
- QString n(candidates[i]);
+ TQString n(candidates[i]);
for (int j = 0;
j < pathList.size() && result == "";
j++) {
- QDir dir(pathList[j]);
- QString fp(dir.filePath(n));
- QFileInfo fi(fp);
+ TQDir dir(pathList[j]);
+ TQString fp(dir.filePath(n));
+ TQFileInfo fi(fp);
if (fi.exists() && fi.isExecutable()) {
if (n == "rezound") {
- result = QString("%1 --audio-method=jack").arg(fp);
+ result = TQString("%1 --audio-method=jack").arg(fp);
} else {
result = fp;
}