Files
oak-editor/app/node/inputarray.h
T
itsmattkc e3fdb96281 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.
2019-12-02 00:11:45 +11:00

34 lines
529 B
C++

#ifndef INPUTARRAY_H
#define INPUTARRAY_H
#include "input.h"
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);
int IndexOfSubParameter(NodeInput* input) const;
NodeInput* ParamAt(int index) const;
signals:
void SizeChanged(int size);
private:
QVector<NodeInput*> sub_params_;
};
#endif // INPUTARRAY_H