added convenience functions for working with NodeInputArray

NodeInputArray has to work a certain way internally, but it can still provide
array-like convenience functions to the rest of the program.
This commit is contained in:
itsmattkc
2019-12-02 00:11:45 +11:00
parent ef18980e7c
commit e3fdb96281
2 changed files with 104 additions and 3 deletions
+13 -1
View File
@@ -5,13 +5,25 @@
class NodeInputArray : public NodeInput
{
Q_OBJECT
public:
NodeInputArray(const QString &id);
int GetSize() const;
void Prepend();
void Append();
void InsertAt(int index);
void RemoveLast();
void RemoveAt(int index);
void SetSize(int size);
NodeInput* ParamAt(int index);
int IndexOfSubParameter(NodeInput* input) const;
NodeInput* ParamAt(int index) const;
signals:
void SizeChanged(int size);
private:
QVector<NodeInput*> sub_params_;