Mercurial > hg > sonic-visualiser
changeset 1436:a9c30afdbbfe levelpanwidget
Rejig preferences dialog to make it a bit less cumbersome
author | Chris Cannam |
---|---|
date | Thu, 15 Dec 2016 14:53:05 +0000 |
parents | 796cf6bc4b2a |
children | 19567489e0bb |
files | main/PreferencesDialog.cpp main/PreferencesDialog.h |
diffstat | 2 files changed, 67 insertions(+), 52 deletions(-) [+] |
line wrap: on
line diff
--- a/main/PreferencesDialog.cpp Thu Dec 15 14:40:30 2016 +0000 +++ b/main/PreferencesDialog.cpp Thu Dec 15 14:53:05 2016 +0000 @@ -353,55 +353,11 @@ hms->setCheckState(m_showHMS ? Qt::Checked : Qt::Unchecked); connect(hms, SIGNAL(stateChanged(int)), this, SLOT(showHMSChanged(int))); - - // General tab - QFrame *frame = new QFrame; - - QGridLayout *subgrid = new QGridLayout; - frame->setLayout(subgrid); - + QFrame *frame = 0; + QGridLayout *subgrid = 0; int row = 0; - subgrid->addWidget(new QLabel(tr("%1:").arg(tr("User interface language"))), - row, 0); - subgrid->addWidget(locale, row++, 1, 1, 1); - - subgrid->addWidget(new QLabel(tr("%1:").arg(tr("Allow network usage"))), - row, 0); - subgrid->addWidget(networkPermish, row++, 1, 1, 1); - - subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel - ("Temporary Directory Root"))), - row, 0); - subgrid->addWidget(m_tempDirRootEdit, row, 1, 1, 1); - subgrid->addWidget(tempDirButton, row, 2, 1, 1); - row++; - - subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel - ("Resample On Load"))), - row, 0); - subgrid->addWidget(resampleOnLoad, row++, 1, 1, 1); - - subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel - ("Use Gapless Mode"))), - row, 0); - subgrid->addWidget(gaplessMode, row++, 1, 1, 1); - - subgrid->addWidget(new QLabel(tr("Audio service:")), row, 0); - subgrid->addWidget(audioImplementation, row++, 1, 1, 2); - - subgrid->addWidget(new QLabel(tr("Audio playback device:")), row, 0); - subgrid->addWidget(m_audioPlaybackDeviceCombo, row++, 1, 1, 2); - - subgrid->addWidget(new QLabel(tr("Audio record device:")), row, 0); - subgrid->addWidget(m_audioRecordDeviceCombo, row++, 1, 1, 2); - - subgrid->setRowStretch(row, 10); - - m_tabOrdering[GeneralTab] = m_tabs->count(); - m_tabs->addTab(frame, tr("&General")); - // Appearance tab frame = new QFrame; @@ -409,11 +365,6 @@ frame->setLayout(subgrid); row = 0; - subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel - ("Show Splash Screen"))), - row, 0); - subgrid->addWidget(showSplash, row++, 1, 1, 1); - #ifdef Q_OS_MAC if (devicePixelRatio() > 1) { subgrid->addWidget(new QLabel(tr("Draw layers at Retina resolution:")), row, 0); @@ -516,7 +467,7 @@ frame->setLayout(subgrid); row = 0; - subgrid->addWidget(new QLabel(tr("Default session template for audio files:")), row++, 0); + subgrid->addWidget(new QLabel(tr("Default session template when loading audio files:")), row++, 0); QListWidget *lw = new QListWidget(); subgrid->addWidget(lw, row, 0); @@ -558,6 +509,69 @@ m_tabOrdering[TemplateTab] = m_tabs->count(); m_tabs->addTab(frame, tr("Session &Template")); + // Audio IO tab + + frame = new QFrame; + subgrid = new QGridLayout; + frame->setLayout(subgrid); + row = 0; + + subgrid->addWidget(new QLabel(tr("Audio service:")), row, 0); + subgrid->addWidget(audioImplementation, row++, 1, 1, 2); + + subgrid->addWidget(new QLabel(tr("Audio playback device:")), row, 0); + subgrid->addWidget(m_audioPlaybackDeviceCombo, row++, 1, 1, 2); + + subgrid->addWidget(new QLabel(tr("Audio record device:")), row, 0); + subgrid->addWidget(m_audioRecordDeviceCombo, row++, 1, 1, 2); + + subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel + ("Use Gapless Mode"))), + row, 0); + subgrid->addWidget(gaplessMode, row++, 1, 1, 1); + + subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel + ("Resample On Load"))), + row, 0); + subgrid->addWidget(resampleOnLoad, row++, 1, 1, 1); + + subgrid->setRowStretch(row, 10); + + m_tabOrdering[AudioIOTab] = m_tabs->count(); + m_tabs->addTab(frame, tr("A&udio I/O")); + + // General tab + + frame = new QFrame; + subgrid = new QGridLayout; + frame->setLayout(subgrid); + row = 0; + + subgrid->addWidget(new QLabel(tr("%1:").arg(tr("User interface language"))), + row, 0); + subgrid->addWidget(locale, row++, 1, 1, 1); + + subgrid->addWidget(new QLabel(tr("%1:").arg(tr("Allow network usage"))), + row, 0); + subgrid->addWidget(networkPermish, row++, 1, 1, 1); + + subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel + ("Show Splash Screen"))), + row, 0); + subgrid->addWidget(showSplash, row++, 1, 1, 1); + + subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel + ("Temporary Directory Root"))), + row, 0); + subgrid->addWidget(m_tempDirRootEdit, row, 1, 1, 1); + subgrid->addWidget(tempDirButton, row, 2, 1, 1); + row++; + + subgrid->setRowStretch(row, 10); + + m_tabOrdering[GeneralTab] = m_tabs->count(); + m_tabs->addTab(frame, tr("&Other")); + QDialogButtonBox *bb = new QDialogButtonBox(Qt::Horizontal); grid->addWidget(bb, 1, 0);