mathnode: added parameters

This commit is contained in:
itsmattkc
2020-03-29 00:22:44 +11:00
parent 48d8c8f242
commit 52acb272bf
2 changed files with 24 additions and 0 deletions
+17
View File
@@ -2,7 +2,15 @@
MathNode::MathNode()
{
// FIXME: Make this a combobox
method_in_ = new NodeInput(QStringLiteral("method_in"), NodeParam::kText);
AddInput(method_in_);
param_a_in_ = new NodeInput(QStringLiteral("param_a_in"), NodeParam::kFloat);
AddInput(param_a_in_);
param_b_in_ = new NodeInput(QStringLiteral("param_b_in"), NodeParam::kFloat);
AddInput(param_b_in_);
}
Node *MathNode::copy() const
@@ -29,3 +37,12 @@ QString MathNode::Description() const
{
return tr("Perform a mathematical operation between two.");
}
void MathNode::Retranslate()
{
Node::Retranslate();
method_in_->set_name(tr(""));
param_a_in_->set_name(tr(""));
param_b_in_->set_name(tr(""));
}
+7
View File
@@ -17,6 +17,13 @@ public:
virtual void Retranslate() override;
private:
NodeInput* method_in_;
NodeInput* param_a_in_;
NodeInput* param_b_in_;
};
#endif // MATHNODE_H