2016-05-31 23:22:03 +02:00
|
|
|
#include "TextDisplayDataModel.hpp"
|
|
|
|
|
|
|
|
|
|
// For some reason CMake could not generate moc-files correctly
|
|
|
|
|
// without having a cpp for an QObject from hpp.
|
|
|
|
|
|
|
|
|
|
TextDisplayDataModel::
|
|
|
|
|
TextDisplayDataModel()
|
|
|
|
|
: _label(new QLabel("Default Text"))
|
|
|
|
|
{
|
|
|
|
|
//
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsigned int
|
|
|
|
|
TextDisplayDataModel::
|
2016-06-05 22:16:43 +02:00
|
|
|
nPorts(PortType portType) const
|
2016-05-31 23:22:03 +02:00
|
|
|
{
|
|
|
|
|
unsigned int result = 1;
|
|
|
|
|
|
|
|
|
|
switch (portType)
|
|
|
|
|
{
|
|
|
|
|
case PortType::IN:
|
|
|
|
|
result = 1;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PortType::OUT:
|
|
|
|
|
result = 0;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2016-08-06 22:48:37 +02:00
|
|
|
NodeDataType
|
|
|
|
|
TextDisplayDataModel::
|
|
|
|
|
dataType(PortType, PortIndex) const
|
|
|
|
|
{
|
|
|
|
|
return TextData().type();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2016-05-31 23:22:03 +02:00
|
|
|
std::shared_ptr<NodeData>
|
|
|
|
|
TextDisplayDataModel::
|
2016-08-06 22:48:37 +02:00
|
|
|
outData(PortIndex)
|
2016-05-31 23:22:03 +02:00
|
|
|
{
|
|
|
|
|
return std::make_shared<TextData>();
|
|
|
|
|
}
|