mathnode: added parameters
This commit is contained in:
@@ -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(""));
|
||||
}
|
||||
|
||||
@@ -17,6 +17,13 @@ public:
|
||||
|
||||
virtual void Retranslate() override;
|
||||
|
||||
private:
|
||||
NodeInput* method_in_;
|
||||
|
||||
NodeInput* param_a_in_;
|
||||
|
||||
NodeInput* param_b_in_;
|
||||
|
||||
};
|
||||
|
||||
#endif // MATHNODE_H
|
||||
|
||||
Reference in New Issue
Block a user