CANdevStudio
Development tool for CAN bus simulation
Loading...
Searching...
No Matches
candbhandler.h
Go to the documentation of this file.
1#ifndef __CANDBHANDLER_H
2#define __CANDBHANDLER_H
3
5#include <QObject>
6#include <QUuid>
7#include <cantypes.hpp>
8
9class QString;
10class QJsonObject;
11
12Q_DECLARE_METATYPE(CANmessages_t);
13
14class CanDbHandler : public QObject {
15 Q_OBJECT
16
17public:
18 CanDbHandler(ComponentInterface::PropertyContainer& props, const QString& dbProperty);
19 void processBcast(const QJsonObject& msg, const QVariant& param);
20 const CANmessages_t& getDb() const;
21 const QString getName() const;
23 QWidget* createPropertyWidget();
24
25signals:
26 void sendCanDbRequest(const QJsonObject& msg, const QVariant = QVariant());
28 void dbChanged();
29
30private:
31 void dbDeleted(const QUuid& id);
32
33private:
35 const QString& _dbProperty;
36 std::map<QUuid, QString> _dbNames;
37 std::map<QUuid, CANmessages_t> _candb;
38 std::map<QUuid, QString> _dbColor;
39 QUuid _currentDb;
40 const CANmessages_t _emptyDb;
41};
42
43#endif /* !__CANDBHANDLER_H */
Q_DECLARE_METATYPE(CANmessages_t)
Definition candbhandler.h:14
void updateCurrentDbFromProps()
Definition candbhandler.cpp:88
void processBcast(const QJsonObject &msg, const QVariant &param)
Definition candbhandler.cpp:14
const QString getName() const
Definition candbhandler.cpp:79
void requestRedraw()
void sendCanDbRequest(const QJsonObject &msg, const QVariant=QVariant())
const CANmessages_t & getDb() const
Definition candbhandler.cpp:70
void dbChanged()
QWidget * createPropertyWidget()
Definition candbhandler.cpp:96
std::map< QString, QVariant > PropertyContainer
Definition componentinterface.h:67