CANdevStudio
Development tool for CAN bus simulation
Loading...
Searching...
No Matches
qmlexecutor.h
Go to the documentation of this file.
1#ifndef QMLEXECUTOR_H
2#define QMLEXECUTOR_H
3
4#include <QWidget>
5#include <QtCore/QScopedPointer>
7#include <context.h>
8#include <memory>
9
11class QWidget;
13class CANBusModel;
14
19
23class QMLExecutor : public QObject, public ComponentInterface {
24 Q_OBJECT
25 Q_DECLARE_PRIVATE(QMLExecutor)
26
27public:
32
37 explicit QMLExecutor(QMLExecutorCtx&& ctx);
38
42 virtual ~QMLExecutor();
43
47 QWidget* mainWidget() override;
48
49
53 void setConfig(const QJsonObject& json) override;
54
58 void setConfig(const QWidget& qobject) override;
59
63 QJsonObject getConfig() const override;
64
68 std::shared_ptr<QWidget> getQConfig() const override;
69
73 void configChanged() override;
74
78 bool mainWidgetDocked() const override;
79
84
85public:
86
91 void setCANBusModel(CANBusModel* model);
92
93signals:
97 void mainWidgetDockToggled(QWidget* widget) override;
98
102 void simBcastSnd(const QJsonObject &msg, const QVariant &param = QVariant()) override;
103
104public slots:
108 void stopSimulation() override;
109
113 void startSimulation() override;
114
118 void simBcastRcv(const QJsonObject &msg, const QVariant &param) override;
119
120private:
124 QScopedPointer<QMLExecutorPrivate> d_ptr;
125};
126
127#endif //QMLEXECUTOR_H
The CANBusModel class is used to interface CAN operations with QML stack.
Definition canbusmodel.hpp:11
Interface of gui for QMLExecutor plugin.
Definition qmlexecutorguiint.h:16
Definition qmlexecutor.h:23
bool mainWidgetDocked() const override
Definition qmlexecutor.cpp:63
void simBcastRcv(const QJsonObject &msg, const QVariant &param) override
Definition qmlexecutor.cpp:87
ComponentInterface::ComponentProperties getSupportedProperties() const override
Definition qmlexecutor.cpp:68
QWidget * mainWidget() override
Definition qmlexecutor.cpp:25
QJsonObject getConfig() const override
Definition qmlexecutor.cpp:46
void mainWidgetDockToggled(QWidget *widget) override
void startSimulation() override
Definition qmlexecutor.cpp:80
void simBcastSnd(const QJsonObject &msg, const QVariant &param=QVariant()) override
void stopSimulation() override
Definition qmlexecutor.cpp:73
virtual ~QMLExecutor()
virtual dtor
Definition qmlexecutor.cpp:21
QMLExecutor()
constructor
Definition qmlexecutor.cpp:11
std::shared_ptr< QWidget > getQConfig() const override
Definition qmlexecutor.cpp:51
void configChanged() override
Definition qmlexecutor.cpp:58
void setCANBusModel(CANBusModel *model)
sets can bus model used from QML
Definition qmlexecutor.cpp:98
void setConfig(const QJsonObject &json) override
Definition qmlexecutor.cpp:32
QMLExecutor plugin private implementation.
Definition qmlexecutor_p.h:18
Context< QMLExecutorGuiInt > QMLExecutorCtx
single instance ioc/iod container
Definition qmlexecutor.h:18
Interface to be implemented by every component.
Definition componentinterface.h:15
std::vector< ComponentProperty > ComponentProperties
Definition componentinterface.h:66
Definition context.h:13