Move color to TimelineMarker and make sure all instances of a marker update on color change
This commit is contained in:
@@ -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_) {
|
||||
|
||||
Reference in New Issue
Block a user