CANdevStudio
Development tool for CAN bus simulation
Loading...
Searching...
No Matches
canrawview.h
Go to the documentation of this file.
1#ifndef CANRAWVIEW_H
2#define CANRAWVIEW_H
3
4#include <QWidget>
5#include <QtCore/QScopedPointer>
7#include <context.h>
8#include <memory>
9
10class QCanBusFrame;
12class QWidget;
13
14class CanRawView : public QObject, public ComponentInterface {
15 Q_OBJECT
16 Q_DECLARE_PRIVATE(CanRawView)
17
18public:
19 CanRawView();
20 explicit CanRawView(CanRawViewCtx&& ctx);
22
26 QWidget* mainWidget() override;
27
31 void setConfig(const QJsonObject& json) override;
32
36 void setConfig(const QWidget& qobject) override;
37
41 QJsonObject getConfig() const override;
42
46 std::shared_ptr<QWidget> getQConfig() const override;
47
51 virtual void configChanged() override;
52
56 bool mainWidgetDocked() const override;
57
62
63signals:
67 void mainWidgetDockToggled(QWidget* widget) override;
68 void simBcastSnd(const QJsonObject &msg, const QVariant &param = QVariant()) override;
69
70public slots:
71 void frameReceived(const QCanBusFrame& frame);
72 void frameSent(bool status, const QCanBusFrame& frame);
73
77 void stopSimulation() override;
78
82 void startSimulation() override;
83
84 void simBcastRcv(const QJsonObject &msg, const QVariant &param) override;
85
86private:
87 QScopedPointer<CanRawViewPrivate> d_ptr;
88};
89
90#endif // CANRAWVIEW_H
Definition canrawview.h:14
void startSimulation() override
Definition canrawview.cpp:34
void simBcastSnd(const QJsonObject &msg, const QVariant &param=QVariant()) override
void setConfig(const QJsonObject &json) override
Definition canrawview.cpp:73
void stopSimulation() override
Definition canrawview.cpp:43
QWidget * mainWidget() override
Definition canrawview.cpp:66
~CanRawView()
Definition canrawview.cpp:21
CanRawView()
Definition canrawview.cpp:11
void frameSent(bool status, const QCanBusFrame &frame)
Definition canrawview.cpp:57
ComponentInterface::ComponentProperties getSupportedProperties() const override
Definition canrawview.cpp:25
void frameReceived(const QCanBusFrame &frame)
Definition canrawview.cpp:50
virtual void configChanged() override
Definition canrawview.cpp:30
std::shared_ptr< QWidget > getQConfig() const override
Definition canrawview.cpp:96
void simBcastRcv(const QJsonObject &msg, const QVariant &param) override
Definition canrawview.cpp:108
bool mainWidgetDocked() const override
Definition canrawview.cpp:103
void mainWidgetDockToggled(QWidget *widget) override
QJsonObject getConfig() const override
Definition canrawview.cpp:79
Definition canrawview_p.h:20
Interface to be implemented by every component.
Definition componentinterface.h:15
std::vector< ComponentProperty > ComponentProperties
Definition componentinterface.h:66