diff options
author | raulbehl <raulbehl@gmail.com> | 2014-11-28 22:27:13 +0530 |
---|---|---|
committer | raulbehl <raulbehl@gmail.com> | 2014-11-28 22:27:13 +0530 |
commit | 0236eb42dccddc0fb623655b429d4bd336263aab (patch) | |
tree | 60896fe0e3a8a53f342cdb29e6416159ef11e80d /src/dlgprefcontrols.cpp | |
parent | 553b2ab44b10cc64cf763fddbfa1012e4d058b51 (diff) |
Resolving merge conflicts & updating Pitch with Slider
Diffstat (limited to 'src/dlgprefcontrols.cpp')
-rw-r--r-- | src/dlgprefcontrols.cpp | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/dlgprefcontrols.cpp b/src/dlgprefcontrols.cpp index 7a4430de96..1c4c8ab550 100644 --- a/src/dlgprefcontrols.cpp +++ b/src/dlgprefcontrols.cpp @@ -50,7 +50,8 @@ DlgPrefControls::DlgPrefControls(QWidget * parent, MixxxMainWindow * mixxx, m_pPlayerManager(pPlayerManager), m_iNumConfiguredDecks(0), m_iNumConfiguredSamplers(0), - m_rebootNotifiedRowHeight(false) { + m_rebootNotifiedRowHeight(false), + m_bSpeedAutoReset(false) { setupUi(this); m_pNumDecks = new ControlObjectSlave("[Master]", "num_decks", this); @@ -334,7 +335,14 @@ DlgPrefControls::DlgPrefControls(QWidget * parent, MixxxMainWindow * mixxx, this, SLOT(slotSetRateRampSensitivity(int))); SliderRateRampSensitivity->setValue(m_pConfig->getValueString( ConfigKey("[Controls]", "RateRampSensitivity")).toInt()); - + + // Update Speed Auto Reset Slider Box + connect(CheckBoxSpeedAutoReset, SIGNAL(stateChanged(int)), + this, SLOT(slotUpdateSpeedAutoReset(int))); + m_bSpeedAutoReset = static_cast<bool>(m_pConfig->getValueString( + ConfigKey("[Mixer Profile]", "SpeedAutoReset")).toInt()); + CheckBoxSpeedAutoReset->setChecked(m_bSpeedAutoReset); + slotUpdate(); } @@ -390,6 +398,8 @@ void DlgPrefControls::slotUpdate() { int rowHeight = m_pConfig->getValueString(ConfigKey("[Library]","RowHeight"), QString::number(kDefaultRowHeight)).toInt(); spinBoxRowHeight->setValue(rowHeight); + + CheckBoxSpeedAutoReset->setChecked(m_bSpeedAutoReset); } void DlgPrefControls::slotResetToDefaults() { @@ -433,6 +443,10 @@ void DlgPrefControls::slotResetToDefaults() { spinBoxPermRateRight->setValue(0.05); spinBoxRowHeight->setValue(kDefaultRowHeight); + + // Pitch auto reset default un-checked. + m_bSpeedAutoReset = false; + CheckBoxSpeedAutoReset->setChecked(Qt::Unchecked); } void DlgPrefControls::slotSetLocale(int pos) { @@ -613,7 +627,9 @@ void DlgPrefControls::slotApply() { int rowHeight = spinBoxRowHeight->value(); m_pConfig->set(ConfigKey("[Library]","RowHeight"), ConfigValue(rowHeight)); - + + m_pConfig->set(ConfigKey("[Mixer Profile]","SpeedAutoReset"), + ConfigValue(m_bSpeedAutoReset ? 1 : 0)); } //Returns TRUE if skin fits to screen resolution, FALSE otherwise @@ -702,3 +718,7 @@ void DlgPrefControls::slotRowHeightValueChanged(int height) { m_rebootNotifiedRowHeight = true; } } + +void DlgPrefControls::slotUpdateSpeedAutoReset(int i) { + m_bSpeedAutoReset = static_cast<bool>(i); +} |