summaryrefslogtreecommitdiffstats
path: root/src/track/cue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/track/cue.cpp')
-rw-r--r--src/track/cue.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/track/cue.cpp b/src/track/cue.cpp
index b171b1244d..f39f84ceb6 100644
--- a/src/track/cue.cpp
+++ b/src/track/cue.cpp
@@ -12,6 +12,7 @@
namespace {
const QString kDefaultLabel = ""; // empty string, not null
+ const mixxx::RgbColor kDefaultCueColor = mixxx::RgbColor(0xF2F2FF); // white
}
//static
@@ -30,11 +31,18 @@ Cue::Cue(TrackId trackId)
m_sampleEndPosition(Cue::kNoPosition),
m_iHotCue(-1),
m_label(kDefaultLabel),
- m_color(Color::kPredefinedColorsSet.noColor) {
+ m_color(kDefaultCueColor) {
DEBUG_ASSERT(!m_label.isNull());
}
-Cue::Cue(int id, TrackId trackId, mixxx::CueType type, double position, double length, int hotCue, QString label, PredefinedColorPointer color)
+Cue::Cue(int id,
+ TrackId trackId,
+ mixxx::CueType type,
+ double position,
+ double length,
+ int hotCue,
+ QString label,
+ mixxx::RgbColor color)
: m_bDirty(false),
m_iId(id),
m_trackId(trackId),
@@ -64,7 +72,7 @@ Cue::Cue(TrackId trackId, mixxx::AudioSignal::SampleRate sampleRate, const mixxx
m_sampleEndPosition(Cue::kNoPosition),
m_iHotCue(Cue::kNoHotCue),
m_label(cueInfo.getLabel()),
- m_color(Color::kPredefinedColorsSet.predefinedColorFromRgbColor(cueInfo.getColor())) {
+ m_color(cueInfo.getColor().value_or(kDefaultCueColor)) {
DEBUG_ASSERT(!m_label.isNull());
DEBUG_ASSERT(sampleRate.valid());
@@ -185,12 +193,12 @@ void Cue::setLabel(const QString label) {
emit updated();
}
-PredefinedColorPointer Cue::getColor() const {
+mixxx::RgbColor Cue::getColor() const {
QMutexLocker lock(&m_mutex);
return m_color;
}
-void Cue::setColor(const PredefinedColorPointer color) {
+void Cue::setColor(mixxx::RgbColor color) {
QMutexLocker lock(&m_mutex);
m_color = color;
m_bDirty = true;