diff options
author | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2019-05-26 16:07:33 +0200 |
---|---|---|
committer | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2019-05-29 15:25:54 +0200 |
commit | 167f537bfcbf1c3b043581976dcf1344a92791b9 (patch) | |
tree | ccb9fd7c225d25dc5abe3abdbd46ba92f1f04544 /src/preferences/dialog/dlgprefdeck.cpp | |
parent | b3e7af9a7c5f265323af4e8ad6a61219d3acee84 (diff) |
Add checkbox for AutoHotcueColors control to Deck preferences
Diffstat (limited to 'src/preferences/dialog/dlgprefdeck.cpp')
-rw-r--r-- | src/preferences/dialog/dlgprefdeck.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/preferences/dialog/dlgprefdeck.cpp b/src/preferences/dialog/dlgprefdeck.cpp index f7ad5ed612..e8d08b1fec 100644 --- a/src/preferences/dialog/dlgprefdeck.cpp +++ b/src/preferences/dialog/dlgprefdeck.cpp @@ -166,6 +166,12 @@ DlgPrefDeck::DlgPrefDeck(QWidget * parent, MixxxMainWindow * mixxx, connect(checkBoxSeekToCue, SIGNAL(toggled(bool)), this, SLOT(slotJumpToCueOnTrackLoadCheckbox(bool))); + // Automatically assign a color to new hot cues + m_bAssignHotcueColors = m_pConfig->getValue(ConfigKey("[Controls]", "AutoHotcueColors"), false); + checkBoxAssignHotcueColors->setChecked(m_bAssignHotcueColors); + connect(checkBoxAssignHotcueColors, SIGNAL(toggled(bool)), + this, SLOT(slotAssignHotcueColorsCheckbox(bool))); + m_bRateInverted = m_pConfig->getValue(ConfigKey("[Controls]", "RateDir"), false); setRateDirectionForAllDecks(m_bRateInverted); checkBoxInvertSpeedSlider->setChecked(m_bRateInverted); @@ -335,6 +341,9 @@ void DlgPrefDeck::slotUpdate() { checkBoxSeekToCue->setChecked(!m_pConfig->getValue( ConfigKey("[Controls]", "CueRecall"), false)); + checkBoxAssignHotcueColors->setChecked(m_pConfig->getValue( + ConfigKey("[Controls]", "AutoHotcueColors"), false)); + double deck1RateRange = m_rateRangeControls[0]->get(); int index = ComboBoxRateRange->findData(static_cast<int>(deck1RateRange * 100)); if (index == -1) { @@ -490,6 +499,10 @@ void DlgPrefDeck::slotJumpToCueOnTrackLoadCheckbox(bool checked) { m_bJumpToCueOnTrackLoad = checked; } +void DlgPrefDeck::slotAssignHotcueColorsCheckbox(bool checked) { + m_bAssignHotcueColors = checked; +} + void DlgPrefDeck::slotSetTrackTimeDisplay(QAbstractButton* b) { if (b == radioButtonRemaining) { m_timeDisplayMode = TrackTime::DisplayMode::REMAINING; @@ -567,6 +580,7 @@ void DlgPrefDeck::slotApply() { !m_bDisallowTrackLoadToPlayingDeck); m_pConfig->setValue(ConfigKey("[Controls]", "CueRecall"), !m_bJumpToCueOnTrackLoad); + m_pConfig->setValue(ConfigKey("[Controls]", "AutoHotcueColors"), m_bAssignHotcueColors); // Set rate range setRateRangeForAllDecks(m_iRateRangePercent); |