timeline views can be siblings
This commit is contained in:
@@ -483,3 +483,24 @@ void TimelineView::SetEndTime(const rational &length)
|
||||
{
|
||||
end_item_->SetEndTime(length);
|
||||
}
|
||||
|
||||
void TimelineView::SetSiblings(TimelineView *a, TimelineView *b)
|
||||
{
|
||||
if (a == b)
|
||||
return;
|
||||
|
||||
if (!a->siblings_.contains(b))
|
||||
a->siblings_.append(b);
|
||||
|
||||
if (!b->siblings_.contains(a))
|
||||
b->siblings_.append(a);
|
||||
}
|
||||
|
||||
void TimelineView::SetSiblings(const QList<TimelineView *> &siblings)
|
||||
{
|
||||
foreach (TimelineView* view, siblings) {
|
||||
foreach (TimelineView* sibling, siblings) {
|
||||
SetSiblings(view, sibling);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,6 +61,10 @@ public:
|
||||
|
||||
void SetEndTime(const rational& length);
|
||||
|
||||
static void SetSiblings(TimelineView* a, TimelineView* b);
|
||||
|
||||
static void SetSiblings(const QList<TimelineView*>& siblings);
|
||||
|
||||
public slots:
|
||||
void SetTimebase(const rational& timebase);
|
||||
|
||||
@@ -385,6 +389,8 @@ private:
|
||||
|
||||
bool use_tracklist_length_directly_;
|
||||
|
||||
QVector<TimelineView*> siblings_;
|
||||
|
||||
private slots:
|
||||
/**
|
||||
* @brief Slot for when a Block node changes its parameters and the graphics need to update
|
||||
|
||||
Reference in New Issue
Block a user