CANdevStudio
Development tool for CAN bus simulation
Loading...
Searching...
No Matches
canrawfilter_p.h
Go to the documentation of this file.
1#ifndef CANRAWFILTER_P_H
2#define CANRAWFILTER_P_H
3
4#include "canrawfilter.h"
6#include <QtCore/QObject>
7#include <memory>
8
9class CanRawFilter;
10
11class CanRawFilterPrivate : public QObject {
12 Q_OBJECT
13 Q_DECLARE_PUBLIC(CanRawFilter)
14
15public:
18 QJsonObject getSettings();
19 void setSettings(const QJsonObject& json);
20 bool acceptRxFrame(const QCanBusFrame& frame);
21 bool acceptTxFrame(const QCanBusFrame& frame);
22
23private:
24 void initProps();
25 bool acceptFrame(const CanRawFilterGuiInt::AcceptList_t& list, const QCanBusFrame& frame);
26 CanRawFilterGuiInt::AcceptList_t getAcceptList(const QJsonObject& json, const QString& listName);
27
28public:
29 bool _simStarted{ false };
32 bool _docked{ true };
33 std::map<QString, QVariant> _props;
34
35private:
38 CanRawFilter* q_ptr;
39 const QString _nameProperty = "name";
40
41 // workaround for clang 3.5
43
44 // clang-format off
46 std::make_tuple(_nameProperty, QVariant::String, true, cf(nullptr))
47 };
48 // clang-format on
49};
50
51#endif // CANRAWFILTER_P_H
Context< CanRawFilterGuiInt > CanRawFilterCtx
Definition canrawfilter.h:14
Definition canrawfilter.h:16
Definition canrawfilter_p.h:11
std::map< QString, QVariant > _props
Definition canrawfilter_p.h:33
bool acceptRxFrame(const QCanBusFrame &frame)
Definition canrawfilter_p.cpp:147
CanRawFilterGuiInt & _ui
Definition canrawfilter_p.h:31
bool _docked
Definition canrawfilter_p.h:32
void setSettings(const QJsonObject &json)
Definition canrawfilter_p.cpp:110
QJsonObject getSettings()
Definition canrawfilter_p.cpp:47
bool acceptTxFrame(const QCanBusFrame &frame)
Definition canrawfilter_p.cpp:152
CanRawFilterCtx _ctx
Definition canrawfilter_p.h:30
ComponentInterface::ComponentProperties getSupportedProperties() const
Definition canrawfilter_p.cpp:42
bool _simStarted
Definition canrawfilter_p.h:29
Definition canrawfilterguiimpl.h:27
Definition canrawfilterguiint.h:11
std::vector< AcceptListItem_t > AcceptList_t
Definition canrawfilterguiint.h:13
std::vector< ComponentProperty > ComponentProperties
Definition componentinterface.h:66
std::function< QWidget *(void)> CustomEditFieldCbk
Definition componentinterface.h:64