1#ifndef CANRAWSENDERMODEL_H
2#define CANRAWSENDERMODEL_H
7#include <QtSerialBus/QCanBusFrame>
9using QtNodes::NodeData;
10using QtNodes::NodeDataType;
11using QtNodes::PortIndex;
12using QtNodes::PortType;
29 unsigned int nPorts(PortType portType)
const override;
37 NodeDataType
dataType(PortType portType, PortIndex portIndex)
const override;
44 std::shared_ptr<NodeData>
outData(PortIndex port)
override;
51 void setInData(std::shared_ptr<NodeData>, PortIndex)
override{};
65 void sendFrame(
const QCanBusFrame& frame);
72 std::unique_ptr<NodePainter> _painter;
The class provides node graphical representation of CanRawSender.
Definition canrawsendermodel.h:17
void setInData(std::shared_ptr< NodeData >, PortIndex) override
Handles data on input port, not used in this class.
Definition canrawsendermodel.h:51
std::shared_ptr< NodeData > outData(PortIndex port) override
Sets output data for propagation.
Definition canrawsendermodel.cpp:29
CanRawSenderModel()
Definition canrawsendermodel.cpp:5
NodeDataType dataType(PortType portType, PortIndex portIndex) const override
Used to get data type of each port.
Definition canrawsendermodel.cpp:24
unsigned int nPorts(PortType portType) const override
Used to get number of ports of each type used by model.
Definition canrawsendermodel.cpp:41
void sendFrame(const QCanBusFrame &frame)
Callback, called when CanRawSender emits signal sendFrame, sends frame.
Definition canrawsendermodel.cpp:34
virtual ~CanRawSenderModel()=default
QtNodes::NodePainterDelegate * painterDelegate() const override
Used to provide custom painter to nodeeditor.
Definition canrawsendermodel.cpp:19
Definition componentmodel.h:37