ui: optimized widget signals for selecting clips/nodes

Decent performance optimization when working with the UI.
This commit is contained in:
itsmattkc
2020-08-01 02:12:20 +10:00
parent fb05594b50
commit 2afa5a42c7
25 changed files with 491 additions and 351 deletions
+2 -61
View File
@@ -29,7 +29,8 @@ NodePanel::NodePanel(QWidget *parent) :
node_view_ = new NodeView(this);
// Connect node view signals to this panel
connect(node_view_, SIGNAL(SelectionChanged(QList<Node*>)), this, SIGNAL(SelectionChanged(QList<Node*>)));
connect(node_view_, &NodeView::NodesSelected, this, &NodePanel::NodesSelected);
connect(node_view_, &NodeView::NodesDeselected, this, &NodePanel::NodesDeselected);
// Set it as the main widget of this panel
SetWidgetWithPadding(node_view_);
@@ -38,64 +39,4 @@ NodePanel::NodePanel(QWidget *parent) :
Retranslate();
}
void NodePanel::SetGraph(NodeGraph *graph)
{
node_view_->SetGraph(graph);
}
void NodePanel::SelectAll()
{
node_view_->SelectAll();
}
void NodePanel::DeselectAll()
{
node_view_->DeselectAll();
}
void NodePanel::DeleteSelected()
{
node_view_->DeleteSelected();
}
void NodePanel::CutSelected()
{
node_view_->CopySelected(true);
}
void NodePanel::CopySelected()
{
node_view_->CopySelected(false);
}
void NodePanel::Paste()
{
node_view_->Paste();
}
void NodePanel::Duplicate()
{
node_view_->Duplicate();
}
void NodePanel::Select(const QList<Node *> &nodes)
{
node_view_->Select(nodes);
}
void NodePanel::SelectWithDependencies(const QList<Node *> &nodes)
{
node_view_->SelectWithDependencies(nodes);
}
void NodePanel::SelectBlocks(const QList<Block *> &nodes)
{
node_view_->SelectBlocks(nodes);
}
void NodePanel::Retranslate()
{
SetTitle(tr("Node Editor"));
}
OLIVE_NAMESPACE_EXIT