contexts in param view

This commit is contained in:
itsmattkc
2021-12-08 14:08:12 -08:00
parent e98ac256c6
commit 090fbb09d0
23 changed files with 887 additions and 359 deletions
+7 -16
View File
@@ -38,16 +38,12 @@ ParamPanel::ParamPanel(QWidget* parent) :
void ParamPanel::SelectNodes(const QVector<Node *> &nodes)
{
static_cast<NodeParamView*>(GetTimeBasedWidget())->SelectNodes(nodes);
Retranslate();
//static_cast<NodeParamView*>(GetTimeBasedWidget())->SelectNodes(nodes);
}
void ParamPanel::DeselectNodes(const QVector<Node *> &nodes)
{
static_cast<NodeParamView*>(GetTimeBasedWidget())->DeselectNodes(nodes);
Retranslate();
//static_cast<NodeParamView*>(GetTimeBasedWidget())->DeselectNodes(nodes);
}
void ParamPanel::DeleteSelected()
@@ -65,19 +61,14 @@ void ParamPanel::DeselectAll()
static_cast<NodeParamView*>(GetTimeBasedWidget())->DeselectAll();
}
void ParamPanel::SetContexts(const QVector<Node *> &contexts)
{
static_cast<NodeParamView*>(GetTimeBasedWidget())->SetContexts(contexts);
}
void ParamPanel::Retranslate()
{
SetTitle(tr("Parameter Editor"));
NodeParamView* view = static_cast<NodeParamView*>(GetTimeBasedWidget());
if (view->GetItemMap().isEmpty()) {
SetSubtitle(tr("(none)"));
} else if (view->GetItemMap().size() == 1) {
SetSubtitle(view->GetItemMap().firstKey()->Name());
} else {
SetSubtitle(tr("(multiple)"));
}
}
}