2016-05-31 23:22:03 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <nodes/NodeDataModel>
|
|
|
|
|
|
2017-01-30 10:31:43 +01:00
|
|
|
using QtNodes::NodeData;
|
|
|
|
|
using QtNodes::NodeDataType;
|
|
|
|
|
|
2016-05-31 23:22:03 +02:00
|
|
|
/// The class can potentially incapsulate any user data which
|
|
|
|
|
/// need to be transferred within the Node Editor graph
|
|
|
|
|
class TextData : public NodeData
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
2016-08-21 17:41:34 +02:00
|
|
|
TextData() {}
|
|
|
|
|
|
|
|
|
|
TextData(QString const &text)
|
|
|
|
|
: _text(text)
|
|
|
|
|
{}
|
|
|
|
|
|
2016-08-06 22:48:37 +02:00
|
|
|
NodeDataType type() const override
|
2020-04-17 07:16:51 -07:00
|
|
|
{ return NodeDataType {QLatin1String("text"), QLatin1String("Text")}; }
|
2016-08-21 17:41:34 +02:00
|
|
|
|
|
|
|
|
QString text() const { return _text; }
|
2016-05-31 23:22:03 +02:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
QString _text;
|
|
|
|
|
};
|