Files
David Bachrati 64dd7d491a Implement automatic insertion of typecast nodes (#52)
* Automatic type cast node insertation working in a basic manner

* Port paint fix to handle convertible types

* Code cleanup, documentation,, and minor fixes

* Fixing master merge

* Master merge fix 2

* Master merge fix 3

* Code style fixes

* Fixing logic error, where typecast node with the same input-output types were permitted

* Fixes based on @russelltg 's suggestions

* Got rid of unique_ptr static_casts

* Partial fixes from the code review

* Merging master into branch vol. 3
2017-01-30 18:03:49 +01:00

35 lines
574 B
C++

#pragma once
#include <nodes/NodeDataModel>
/// The class can potentially incapsulate any user data which
/// need to be transferred within the Node Editor graph
class IntegerData : public NodeData
{
public:
IntegerData()
: _number(0.0)
{}
IntegerData(int const number)
: _number(number)
{}
NodeDataType type() const override
{
return NodeDataType {"integer",
"Integer"};
}
int number() const
{ return _number; }
QString numberAsText() const
{ return QString::number(_number); }
private:
int _number;
};