forked from collin80/SavvyCAN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathframeplaybackwindow.h
80 lines (71 loc) · 1.93 KB
/
frameplaybackwindow.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#ifndef FRAMEPLAYBACKWINDOW_H
#define FRAMEPLAYBACKWINDOW_H
#include <QDialog>
#include <QListWidget>
#include <QTimer>
#include "can_structs.h"
#include "framefileio.h"
namespace Ui {
class FramePlaybackWindow;
}
//one entry in the sequence of data to use
struct SequenceItem
{
QString filename;
QVector<CANFrame> data;
QHash<int, bool> idFilters;
int maxLoops;
int currentLoopCount;
};
class FramePlaybackWindow : public QDialog
{
Q_OBJECT
public:
explicit FramePlaybackWindow(const QVector<CANFrame> *frames, QWidget *parent = 0);
~FramePlaybackWindow();
private slots:
void btnBackOneClick();
void btnPauseClick();
void btnReverseClick();
void btnStopClick();
void btnPlayClick();
void btnFwdOneClick();
void btnDeleteCurrSeq();
void changePlaybackSpeed(int newSpeed);
void changeLooping(bool check);
void changeSendingBus(int newIdx);
void changeIDFiltering(QListWidgetItem *item);
void btnSelectAllClick();
void btnSelectNoneClick();
void timerTriggered();
void btnLoadFile();
void btnLoadLive();
void seqTableCellClicked(int row, int col);
void seqTableCellChanged(int row, int col);
void contextMenuFilters(QPoint);
void saveFilters();
void loadFilters();
private:
Ui::FramePlaybackWindow *ui;
QList<int> foundID;
QList<CANFrame> frameCache;
QList<CANFrame> sendingBuffer;
const QVector<CANFrame> *modelFrames;
int currentPosition;
QTimer *playbackTimer;
bool playbackActive;
bool playbackForward;
int whichBusSend;
QList<SequenceItem> seqItems;
SequenceItem *currentSeqItem;
int currentSeqNum;
void refreshIDList();
void updateFrameLabel();
void updatePosition(bool forward);
void fillIDHash(SequenceItem &item);
void showEvent(QShowEvent *);
void closeEvent(QCloseEvent *event);
void readSettings();
void writeSettings();
};
#endif // FRAMEPLAYBACKWINDOW_H