CANdevStudio
Development tool for CAN bus simulation
Loading...
Searching...
No Matches
cansignalsenderguiint.h
Go to the documentation of this file.
1#ifndef CANSIGNALSENDERGUIINT_H
2#define CANSIGNALSENDERGUIINT_H
3
4#include <QJsonArray>
5#include <QModelIndexList>
6#include <Qt>
7#include <functional>
8
9class QWidget;
10class QStandardItemModel;
11class CanDbHandler;
12
14 using dockUndock_t = std::function<void()>;
15 using remove_t = std::function<void()>;
16 using add_t = std::function<void()>;
17 using send_t = std::function<void(const QString&, const QString&, const QVariant&)>;
18
20
21 virtual QWidget* mainWidget() = 0;
22 virtual void initTv(QStandardItemModel& tvModel, const CanDbHandler* db) = 0;
23 virtual void setRemoveCbk(const remove_t& cb) = 0;
24 virtual void setAddCbk(const add_t& cb) = 0;
25 virtual void setDockUndockCbk(const dockUndock_t& cb) = 0;
26 virtual void setSendCbk(const send_t& cbk) = 0;
27 virtual void addRow(const QString& id = "", const QString& sig = "", const QString& val = "") = 0;
28 virtual QJsonArray getRows() = 0;
29 virtual QModelIndexList getSelectedRows() = 0;
30};
31
32#endif // CANSIGNALSENDERGUIINT_H
Definition candbhandler.h:14
Definition cansignalsenderguiint.h:13
virtual void addRow(const QString &id="", const QString &sig="", const QString &val="")=0
virtual ~CanSignalSenderGuiInt()
Definition cansignalsenderguiint.h:19
std::function< void()> remove_t
Definition cansignalsenderguiint.h:15
virtual void setAddCbk(const add_t &cb)=0
std::function< void(const QString &, const QString &, const QVariant &)> send_t
Definition cansignalsenderguiint.h:17
std::function< void()> add_t
Definition cansignalsenderguiint.h:16
virtual QModelIndexList getSelectedRows()=0
virtual QWidget * mainWidget()=0
virtual void setRemoveCbk(const remove_t &cb)=0
virtual void initTv(QStandardItemModel &tvModel, const CanDbHandler *db)=0
virtual void setDockUndockCbk(const dockUndock_t &cb)=0
virtual void setSendCbk(const send_t &cbk)=0
std::function< void()> dockUndock_t
Definition cansignalsenderguiint.h:14
virtual QJsonArray getRows()=0