-
Notifications
You must be signed in to change notification settings - Fork 6
/
StreamFrameTable.h
51 lines (35 loc) · 1.17 KB
/
StreamFrameTable.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef RXFRAMETABLE_H
#define RXFRAMETABLE_H
#include <QAbstractTableModel>
#include <QTimer>
#include <QVector>
#include "canal.h"
#include "messagetypes.h"
class RxFrameTable : public QAbstractTableModel
{
Q_OBJECT
public:
explicit RxFrameTable(QObject *parent);
~RxFrameTable();
QVector<streamMsg>* getStreamDatabasePointer(void);
// Header:
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
// Basic functionality:
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
Qt::ItemFlags flags(const QModelIndex &parent) const override;
QVector<streamMsg>* m_StreamCanFrames;
signals:
void newFrameArrived(int cnt);
private:
bool updateFrameTimerEnable = false;
QTimer *m_timer;
quint32 m_FramesCnt;
public slots:
void updateFrame(quint32 cnt, canalMsg rxmsg);
private slots:
void updateFrameTimerCallback(void);
void timerHit();
};
#endif // RXFRAMETABLE_H