Files

29 lines
490 B
C++
Raw Permalink Normal View History

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:
TextData() {}
TextData(QString const &text)
: _text(text)
{}
NodeDataType type() const override
{ return NodeDataType {"text", "Text"}; }
QString text() const { return _text; }
2016-05-31 23:22:03 +02:00
private:
QString _text;
};