CANdevStudio
Development tool for CAN bus simulation
Loading...
Searching...
No Matches
cansignaldatamodel.h
Go to the documentation of this file.
1#ifndef CANSIGNALDATAMODEL_H
2#define CANSIGNALDATAMODEL_H
3
4#include "componentmodel.h"
5#include "nodepainter.h"
6#include <QtCore/QObject>
7#include <cansignaldata.h>
8#include <candbpainter.h>
9
10using QtNodes::NodeData;
11using QtNodes::NodeDataType;
12using QtNodes::PortIndex;
13using QtNodes::PortType;
14
15enum class Direction;
16
17class CanSignalDataModel : public ComponentModel<CanSignalData, CanSignalDataModel> {
18 Q_OBJECT
19
20public:
22
23 unsigned int nPorts(PortType portType) const override;
24 NodeDataType dataType(PortType portType, PortIndex portIndex) const override;
25 std::shared_ptr<NodeData> outData(PortIndex port) override;
26 void setInData(std::shared_ptr<NodeData>, PortIndex) override{};
27 QtNodes::NodePainterDelegate* painterDelegate() const override;
28
29signals:
31
32private:
33 std::unique_ptr<CanDbPainter> _painter;
34 CANmessages_t _messages;
35};
36
37#endif // CANSIGNALDATAMODEL_H
Definition cansignaldatamodel.h:17
NodeDataType dataType(PortType portType, PortIndex portIndex) const override
Definition cansignaldatamodel.cpp:37
std::shared_ptr< NodeData > outData(PortIndex port) override
Definition cansignaldatamodel.cpp:42
QtNodes::NodePainterDelegate * painterDelegate() const override
Definition cansignaldatamodel.cpp:27
void setInData(std::shared_ptr< NodeData >, PortIndex) override
Definition cansignaldatamodel.h:26
CanSignalDataModel()
Definition cansignaldatamodel.cpp:18
unsigned int nPorts(PortType portType) const override
Definition cansignaldatamodel.cpp:32
Definition componentmodel.h:37
Direction
The enum class describing frame direction.
Definition datadirection.h:7