comparison main/PreferencesDialog.cpp @ 1388:032bf0b11de9 3.0-integration

Remove resampler quality option (#1760)
author Chris Cannam
date Mon, 05 Dec 2016 16:39:03 +0000
parents a264b51728cf
children 558347e7e1ab
comparison
equal deleted inserted replaced
1387:7b058ba5fa67 1388:032bf0b11de9
200 } 200 }
201 201
202 connect(audioDevice, SIGNAL(currentIndexChanged(int)), 202 connect(audioDevice, SIGNAL(currentIndexChanged(int)),
203 this, SLOT(audioDeviceChanged(int))); 203 this, SLOT(audioDeviceChanged(int)));
204 */ 204 */
205 QComboBox *resampleQuality = new QComboBox;
206
207 int rsq = prefs->getPropertyRangeAndValue("Resample Quality", &min, &max,
208 &deflt);
209 m_resampleQuality = rsq;
210
211 for (i = min; i <= max; ++i) {
212 resampleQuality->addItem(prefs->getPropertyValueLabel("Resample Quality", i));
213 }
214
215 resampleQuality->setCurrentIndex(rsq);
216
217 connect(resampleQuality, SIGNAL(currentIndexChanged(int)),
218 this, SLOT(resampleQualityChanged(int)));
219 205
220 QCheckBox *resampleOnLoad = new QCheckBox; 206 QCheckBox *resampleOnLoad = new QCheckBox;
221 m_resampleOnLoad = prefs->getResampleOnLoad(); 207 m_resampleOnLoad = prefs->getResampleOnLoad();
222 resampleOnLoad->setCheckState(m_resampleOnLoad ? Qt::Checked : 208 resampleOnLoad->setCheckState(m_resampleOnLoad ? Qt::Checked :
223 Qt::Unchecked); 209 Qt::Unchecked);
384 subgrid->addWidget(gaplessMode, row++, 1, 1, 1); 370 subgrid->addWidget(gaplessMode, row++, 1, 1, 1);
385 371
386 //!!! subgrid->addWidget(new QLabel(tr("Playback audio device:")), row, 0); 372 //!!! subgrid->addWidget(new QLabel(tr("Playback audio device:")), row, 0);
387 //!!! subgrid->addWidget(audioDevice, row++, 1, 1, 2); 373 //!!! subgrid->addWidget(audioDevice, row++, 1, 1, 2);
388 374
389 subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel
390 ("Resample Quality"))),
391 row, 0);
392 subgrid->addWidget(resampleQuality, row++, 1, 1, 2);
393
394 subgrid->setRowStretch(row, 10); 375 subgrid->setRowStretch(row, 10);
395 376
396 m_tabOrdering[GeneralTab] = m_tabs->count(); 377 m_tabOrdering[GeneralTab] = m_tabs->count();
397 m_tabs->addTab(frame, tr("&General")); 378 m_tabs->addTab(frame, tr("&General"));
398 379
636 PreferencesDialog::audioDeviceChanged(int s) 617 PreferencesDialog::audioDeviceChanged(int s)
637 { 618 {
638 m_audioDevice = s; 619 m_audioDevice = s;
639 m_applyButton->setEnabled(true); 620 m_applyButton->setEnabled(true);
640 m_changesOnRestart = true; 621 m_changesOnRestart = true;
641 }
642
643 void
644 PreferencesDialog::resampleQualityChanged(int q)
645 {
646 m_resampleQuality = q;
647 m_applyButton->setEnabled(true);
648 } 622 }
649 623
650 void 624 void
651 PreferencesDialog::resampleOnLoadChanged(int state) 625 PreferencesDialog::resampleOnLoadChanged(int state)
652 { 626 {
781 prefs->setSpectrogramXSmoothing(Preferences::SpectrogramXSmoothing 755 prefs->setSpectrogramXSmoothing(Preferences::SpectrogramXSmoothing
782 (m_spectrogramXSmoothing)); 756 (m_spectrogramXSmoothing));
783 prefs->setPropertyBoxLayout(Preferences::PropertyBoxLayout 757 prefs->setPropertyBoxLayout(Preferences::PropertyBoxLayout
784 (m_propertyLayout)); 758 (m_propertyLayout));
785 prefs->setTuningFrequency(m_tuningFrequency); 759 prefs->setTuningFrequency(m_tuningFrequency);
786 prefs->setResampleQuality(m_resampleQuality);
787 prefs->setResampleOnLoad(m_resampleOnLoad); 760 prefs->setResampleOnLoad(m_resampleOnLoad);
788 prefs->setUseGaplessMode(m_gapless); 761 prefs->setUseGaplessMode(m_gapless);
789 prefs->setRunPluginsInProcess(m_runPluginsInProcess); 762 prefs->setRunPluginsInProcess(m_runPluginsInProcess);
790 prefs->setShowSplash(m_showSplash); 763 prefs->setShowSplash(m_showSplash);
791 prefs->setTemporaryDirectoryRoot(m_tempDirRoot); 764 prefs->setTemporaryDirectoryRoot(m_tempDirRoot);