paramview: implemented passthrough editing

This commit is contained in:
itsmattkc
2022-04-04 22:13:08 -07:00
parent d7b3c523f4
commit 38c8bd4b0d
10 changed files with 159 additions and 89 deletions
+2 -1
View File
@@ -31,7 +31,8 @@ NodePanel::NodePanel(QWidget *parent) :
// Connect node view signals to this panel - MAY REMOVE
connect(node_widget_->view(), &NodeView::NodesSelected, this, &NodePanel::NodesSelected);
connect(node_widget_->view(), &NodeView::NodesDeselected, this, &NodePanel::NodesDeselected);
connect(node_widget_->view(), &NodeView::NodeGroupOpenRequested, this, &NodePanel::NodeGroupOpenRequested);
connect(node_widget_->view(), &NodeView::NodeGroupOpened, this, &NodePanel::NodeGroupOpened);
connect(node_widget_->view(), &NodeView::NodeGroupClosed, this, &NodePanel::NodeGroupClosed);
// Set it as the main widget of this panel
SetWidgetWithPadding(node_widget_);
+6 -10
View File
@@ -40,10 +40,9 @@ public:
return node_widget_;
}
const QVector<Node*> &GetContexts() const
{
return node_widget_->view()->GetContexts();
}
const QVector<Node*> &GetContexts() const { return node_widget_->view()->GetContexts(); }
bool IsGroupOverlay() const { return node_widget_->view()->IsGroupOverlay(); }
void SetContexts(const QVector<Node*> &nodes)
{
@@ -55,11 +54,6 @@ public:
node_widget_->view()->CloseContextsBelongingToProject(project);
}
const QVector<Node*> &GetCurrentContexts() const
{
return node_widget_->view()->GetCurrentContexts();
}
virtual void SelectAll() override
{
node_widget_->view()->SelectAll();
@@ -122,7 +116,9 @@ signals:
void NodesDeselected(const QVector<Node*>& nodes);
void NodeGroupOpenRequested(NodeGroup *group);
void NodeGroupOpened(NodeGroup *group);
void NodeGroupClosed();
private:
virtual void Retranslate() override
+2 -2
View File
@@ -61,9 +61,9 @@ void ParamPanel::DeselectAll()
static_cast<NodeParamView*>(GetTimeBasedWidget())->DeselectAll();
}
void ParamPanel::SetContexts(const QVector<Node *> &contexts)
void ParamPanel::SetContexts(const QVector<Node *> &contexts, bool group_mode)
{
static_cast<NodeParamView*>(GetTimeBasedWidget())->SetContexts(contexts);
static_cast<NodeParamView*>(GetTimeBasedWidget())->SetContexts(contexts, group_mode);
}
void ParamPanel::Retranslate()
+1 -11
View File
@@ -43,16 +43,6 @@ public:
return GetParamView()->GetContexts();
}
void SetCreateCheckBoxes(NodeParamViewCheckBoxBehavior e)
{
GetParamView()->SetCreateCheckBoxes(e);
}
void SetIgnoreNodeFlags(bool e)
{
GetParamView()->SetIgnoreNodeFlags(e);
}
void CloseContextsBelongingToProject(Project *p)
{
GetParamView()->CloseContextsBelongingToProject(p);
@@ -68,7 +58,7 @@ public slots:
virtual void DeselectAll() override;
void SetContexts(const QVector<Node*> &contexts);
void SetContexts(const QVector<Node*> &contexts, bool group_mode);
signals:
void RequestSelectNode(const QVector<Node*>& target);