CANdevStudio
Development tool for CAN bus simulation
Loading...
Searching...
No Matches
canrawfilter.h
Go to the documentation of this file.
1#ifndef CANRAWFILTER_H
2#define CANRAWFILTER_H
3
4#include <QWidget>
5#include <QtCore/QScopedPointer>
7#include <context.h>
8#include <memory>
9
11class QWidget;
12class QCanBusFrame;
15
16class CanRawFilter : public QObject, public ComponentInterface {
17 Q_OBJECT
18 Q_DECLARE_PRIVATE(CanRawFilter)
19
20public:
22 explicit CanRawFilter(CanRawFilterCtx&& ctx);
24
25 QWidget* mainWidget() override;
26 void setConfig(const QJsonObject& json) override;
27 void setConfig(const QWidget& qobject) override;
28 QJsonObject getConfig() const override;
29 std::shared_ptr<QWidget> getQConfig() const override;
30 void configChanged() override;
31 bool mainWidgetDocked() const override;
33
34signals:
35 void mainWidgetDockToggled(QWidget* widget) override;
36 void txFrameOut(const QCanBusFrame& frame);
37 void rxFrameOut(const QCanBusFrame& frame);
38 void simBcastSnd(const QJsonObject &msg, const QVariant &param = QVariant()) override;
39
40public slots:
41 void txFrameIn(const QCanBusFrame& frame);
42 void rxFrameIn(const QCanBusFrame& frame);
43 void stopSimulation() override;
44 void startSimulation() override;
45 void simBcastRcv(const QJsonObject &msg, const QVariant &param) override;
46
47private:
48 QScopedPointer<CanRawFilterPrivate> d_ptr;
49};
50
51#endif //CANRAWFILTER_H
Context< CanRawFilterGuiInt > CanRawFilterCtx
Definition canrawfilter.h:14
Definition canrawfilter.h:16
QJsonObject getConfig() const override
Gets current component configuation.
Definition canrawfilter.cpp:42
void setConfig(const QJsonObject &json) override
Sets configuration for component.
Definition canrawfilter.cpp:28
CanRawFilter()
Definition canrawfilter.cpp:7
void txFrameIn(const QCanBusFrame &frame)
Definition canrawfilter.cpp:82
void stopSimulation() override
Definition canrawfilter.cpp:68
void mainWidgetDockToggled(QWidget *widget) override
ComponentInterface::ComponentProperties getSupportedProperties() const override
Definition canrawfilter.cpp:63
void txFrameOut(const QCanBusFrame &frame)
void simBcastSnd(const QJsonObject &msg, const QVariant &param=QVariant()) override
bool mainWidgetDocked() const override
Main widget docking status.
Definition canrawfilter.cpp:58
QWidget * mainWidget() override
Gets components's main widget.
Definition canrawfilter.cpp:21
void rxFrameIn(const QCanBusFrame &frame)
Definition canrawfilter.cpp:91
void simBcastRcv(const QJsonObject &msg, const QVariant &param) override
Definition canrawfilter.cpp:100
std::shared_ptr< QWidget > getQConfig() const override
Gets current component configuation.
Definition canrawfilter.cpp:47
~CanRawFilter()
Definition canrawfilter.cpp:17
void configChanged() override
Reconfigure component if necessary.
Definition canrawfilter.cpp:54
void startSimulation() override
Definition canrawfilter.cpp:75
void rxFrameOut(const QCanBusFrame &frame)
Definition canrawfilter_p.h:11
Definition canrawfilterguiint.h:11
Interface to be implemented by every component.
Definition componentinterface.h:15
std::vector< ComponentProperty > ComponentProperties
Definition componentinterface.h:66
Definition context.h:13