panels: selecting a clip in the timeline automatically selects the corresponding

nodes in the nodeview
This commit is contained in:
itsmattkc
2020-02-26 00:39:30 +11:00
parent 78daf9e28a
commit bf7fc9a0c4
11 changed files with 86 additions and 1 deletions
+10
View File
@@ -59,6 +59,16 @@ void NodePanel::DeleteSelected()
node_view_->DeleteSelected();
}
void NodePanel::Select(const QList<Node *> &nodes)
{
node_view_->Select(nodes);
}
void NodePanel::SelectWithDependencies(const QList<Node *> &nodes)
{
node_view_->SelectWithDependencies(nodes);
}
void NodePanel::Retranslate()
{
SetTitle(tr("Node Editor"));
+5
View File
@@ -40,6 +40,10 @@ public:
virtual void DeleteSelected() override;
public slots:
void Select(const QList<Node*>& nodes);
void SelectWithDependencies(const QList<Node*>& nodes);
signals:
/**
* @brief Wrapper for NodeView::SelectionChanged()
@@ -50,6 +54,7 @@ private:
virtual void Retranslate() override;
NodeView* node_view_;
};
#endif // NODEPANEL_H
+4 -1
View File
@@ -26,9 +26,12 @@ TimelinePanel::TimelinePanel(QWidget *parent) :
// FIXME: This won't work if there's ever more than one of this panel
setObjectName("TimelinePanel");
SetTimeBasedWidget(new TimelineWidget());
TimelineWidget* tw = new TimelineWidget();
SetTimeBasedWidget(tw);
Retranslate();
connect(tw, &TimelineWidget::SelectionChanged, this, &TimelinePanel::SelectionChanged);
}
void TimelinePanel::Clear()
+3
View File
@@ -58,6 +58,9 @@ public:
protected:
virtual void Retranslate() override;
signals:
void SelectionChanged(const QList<Node*>& selected_blocks);
};
#endif // TIMELINE_PANEL_H