CANdevStudio
Development tool for CAN bus simulation
Loading...
Searching...
No Matches
cansignalsender_p.h
Go to the documentation of this file.
1#ifndef CANSIGNALSENDER_P_H
2#define CANSIGNALSENDER_P_H
3
4#include <QtCore/QObject>
5#include <memory>
7#include "cansignalsender.h"
9#include <cantypes.hpp>
10#include <QUuid>
11#include <candbhandler.h>
12#include <propertyfields.h>
13
14class CanSignalSender;
15
16class CanSignalSenderPrivate : public QObject {
17 Q_OBJECT
18 Q_DECLARE_PUBLIC(CanSignalSender)
19
20public:
23 QJsonObject getSettings();
24 void setSettings(const QJsonObject& json);
25
26private:
27 void initProps();
28
29private slots:
30 void setDroppedItems(const QList<QList<QString>>& droppedItems);
31
32public:
33 bool _simStarted{ false };
36 bool _docked{ true };
37 std::map<QString, QVariant> _props;
38 CanDbHandler _db{ _props, _dbProperty };
39
40private:
42 QStringList _tvColumns;
43 CanSignalSender* q_ptr;
44 const QString _nameProperty = "name";
45 const QString _dbProperty = "CAN database";
46
47 // workaround for clang 3.5
49
50 // clang-format off
52 std::make_tuple(_nameProperty, QVariant::String, true, cf(nullptr)),
53 std::make_tuple(_dbProperty, QVariant::String, true, cf(std::bind(&CanDbHandler::createPropertyWidget, &_db)))
54 };
55};
56
57#endif // CANSIGNALSENDER_P_H
Context< CanSignalSenderGuiInt > CanSignalSenderCtx
Definition cansignalsender.h:13
Definition candbhandler.h:14
QWidget * createPropertyWidget()
Definition candbhandler.cpp:96
Definition cansignalsender.h:15
Definition cansignalsender_p.h:16
void setSettings(const QJsonObject &json)
Definition cansignalsender_p.cpp:106
CanSignalSenderCtx _ctx
Definition cansignalsender_p.h:34
std::map< QString, QVariant > _props
Definition cansignalsender_p.h:37
ComponentInterface::ComponentProperties getSupportedProperties() const
Definition cansignalsender_p.cpp:88
bool _docked
Definition cansignalsender_p.h:36
bool _simStarted
Definition cansignalsender_p.h:33
CanDbHandler _db
Definition cansignalsender_p.h:38
CanSignalSenderGuiInt & _ui
Definition cansignalsender_p.h:35
QJsonObject getSettings()
Definition cansignalsender_p.cpp:93
Definition cansignalsendertablemodel.h:6
Definition cansignalsenderguiimpl.h:168
Definition cansignalsenderguiint.h:13
std::vector< ComponentProperty > ComponentProperties
Definition componentinterface.h:66
std::function< QWidget *(void)> CustomEditFieldCbk
Definition componentinterface.h:64