-
Notifications
You must be signed in to change notification settings - Fork 947
Expand file tree
/
Copy pathstate_node_model.cpp
More file actions
57 lines (47 loc) · 1.24 KB
/
state_node_model.cpp
File metadata and controls
57 lines (47 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include "state_node_model.h"
QString StateNodeModel::caption() const
{
return QStringLiteral("State");
}
QString StateNodeModel::name() const
{
return QStringLiteral("state_node");
}
unsigned int StateNodeModel::nPorts(PortType portType) const
{
std::ignore = portType;
return 1;
}
NodeDataType StateNodeModel::dataType(PortType portType, PortIndex portIndex) const
{
std::ignore = portType;
std::ignore = portIndex;
return getTranstitionType();
}
NodeDataType StateNodeModel::getTranstitionType()
{
return NodeDataType{"transition_port", ""};
}
QtNodes::NodeDataModel::ConnectionPolicy StateNodeModel::portOutConnectionPolicy(PortIndex) const
{
return ConnectionPolicy::Many;
}
QtNodes::NodeDataModel::ConnectionPolicy StateNodeModel::portInConnectionPolicy(PortIndex) const
{
return ConnectionPolicy::Many;
}
void StateNodeModel::setInData(std::shared_ptr<NodeData> nodeData, PortIndex port)
{
std::ignore = nodeData;
std::ignore = port;
}
void StateNodeModel::setInData(std::vector<std::shared_ptr<NodeData>> nodeData, PortIndex port)
{
std::ignore = nodeData;
std::ignore = port;
}
std::shared_ptr<NodeData> StateNodeModel::outData(PortIndex port)
{
std::ignore = port;
return nullptr;
}