Move color to TimelineMarker and make sure all instances of a marker update on color change

This commit is contained in:
Thomas Wilshaw
2021-10-22 22:15:50 +01:00
parent 562b0e3a7f
commit 575ce39696
5 changed files with 29 additions and 3 deletions
+14 -1
View File
@@ -27,7 +27,8 @@ namespace olive {
TimelineMarker::TimelineMarker(const TimeRange &time, const QString &name, QObject *parent) :
QObject(parent),
time_(time),
name_(name)
name_(name),
color_(7) // FIXME: set via config
{
}
@@ -53,6 +54,18 @@ void TimelineMarker::set_name(const QString &name)
emit NameChanged(name_);
}
int TimelineMarker::color()
{
return color_;
}
void TimelineMarker::set_color(int c)
{
color_ = c;
emit ColorChanged(color_);
}
void TimelineMarkerList::Save(QXmlStreamWriter *writer) const
{
foreach (TimelineMarker* marker, markers_) {