summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorronso0 <ronso0@mixxx.org>2020-11-22 23:05:00 +0100
committerronso0 <ronso0@mixxx.org>2020-11-23 11:26:27 +0100
commitb6cf473074784174f688158e148581be34098679 (patch)
treefbe732ab6103d3c2e4808bc118c3d51acff8be9f
parentf99d07b0a96cdbcf8c309fc0d7dc13dd2fc0b197 (diff)
Cuecontrol: add CO 'play_latched' to indicate true 'Play' status
-rw-r--r--src/engine/controls/cuecontrol.cpp9
-rw-r--r--src/engine/controls/cuecontrol.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/engine/controls/cuecontrol.cpp b/src/engine/controls/cuecontrol.cpp
index 22a1ef74f9..56d1337510 100644
--- a/src/engine/controls/cuecontrol.cpp
+++ b/src/engine/controls/cuecontrol.cpp
@@ -135,6 +135,9 @@ CueControl::CueControl(const QString& group,
m_pCueIndicator = new ControlIndicator(ConfigKey(group, "cue_indicator"));
m_pPlayIndicator = new ControlIndicator(ConfigKey(group, "play_indicator"));
+ m_pPlayLatched = new ControlObject(ConfigKey(group, "play_latched"));
+ m_pPlayLatched->setReadOnly();
+
m_pIntroStartPosition = new ControlObject(ConfigKey(group, "intro_start_position"));
m_pIntroStartPosition->set(Cue::kNoPosition);
@@ -255,6 +258,7 @@ CueControl::~CueControl() {
delete m_pPlayStutter;
delete m_pCueIndicator;
delete m_pPlayIndicator;
+ delete m_pPlayLatched;
delete m_pIntroStartPosition;
delete m_pIntroStartEnabled;
delete m_pIntroStartSet;
@@ -1549,8 +1553,10 @@ bool CueControl::updateIndicatorsAndModifyPlay(bool newPlay, bool oldPlay, bool
m_bPreviewing = false;
m_iCurrentlyPreviewingHotcues = 0;
newPlay = true;
+ m_pPlayLatched->forceSet(1.0);
} else {
previewing = true;
+ m_pPlayLatched->forceSet(0.0);
}
}
@@ -1561,13 +1567,16 @@ bool CueControl::updateIndicatorsAndModifyPlay(bool newPlay, bool oldPlay, bool
newPlay = false;
m_pPlayIndicator->setBlinkValue(ControlIndicator::OFF);
m_pStopButton->set(0.0);
+ m_pPlayLatched->forceSet(0.0);
} else if (newPlay && !previewing) {
// Play: Indicates a latched Play
m_pPlayIndicator->setBlinkValue(ControlIndicator::ON);
m_pStopButton->set(0.0);
+ m_pPlayLatched->forceSet(1.0);
} else {
// Pause:
m_pStopButton->set(1.0);
+ m_pPlayLatched->forceSet(0.0);
if (cueMode == CueMode::Denon) {
if (trackAt == TrackAt::Cue || previewing) {
m_pPlayIndicator->setBlinkValue(ControlIndicator::OFF);
diff --git a/src/engine/controls/cuecontrol.h b/src/engine/controls/cuecontrol.h
index e954b82cda..6ffb228ab4 100644
--- a/src/engine/controls/cuecontrol.h
+++ b/src/engine/controls/cuecontrol.h
@@ -220,6 +220,7 @@ class CueControl : public EngineControl {
ControlPushButton* m_pPlayStutter;
ControlIndicator* m_pCueIndicator;
ControlIndicator* m_pPlayIndicator;
+ ControlObject* m_pPlayLatched;
ControlPushButton* m_pCueGoto;
ControlPushButton* m_pCueGotoAndPlay;
ControlPushButton* m_pCuePlay;