forked from collin80/SavvyCAN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flowviewwindow.h
72 lines (63 loc) · 1.81 KB
/
flowviewwindow.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
#ifndef FLOWVIEWWINDOW_H
#define FLOWVIEWWINDOW_H
#include <QDialog>
#include "qcustomplot.h"
#include "can_structs.h"
namespace Ui {
class FlowViewWindow;
}
class FlowViewWindow : public QDialog
{
Q_OBJECT
public:
explicit FlowViewWindow(const QVector<CANFrame> *frames, QWidget *parent = 0);
~FlowViewWindow();
void showEvent(QShowEvent*);
private slots:
void btnBackOneClick();
void btnPauseClick();
void btnReverseClick();
void btnStopClick();
void btnPlayClick();
void btnFwdOneClick();
void changePlaybackSpeed(int newSpeed);
void changeLooping(bool check);
void timerTriggered();
void changeID(QString);
void updatedFrames(int);
void contextMenuRequestFlow(QPoint pos);
void contextMenuRequestGraph(QPoint pos);
void saveFileFlow();
void saveFileGraph();
void plottableDoubleClick(QCPAbstractPlottable* plottable, QMouseEvent* event);
void gotCenterTimeID(int32_t ID, double timestamp);
void updateTriggerValues();
signals:
void sendCenterTimeID(int32_t ID, double timestamp);
private:
Ui::FlowViewWindow *ui;
QList<int> foundID;
QList<CANFrame> frameCache;
const QVector<CANFrame> *modelFrames;
unsigned char refBytes[8];
unsigned char currBytes[8];
int triggerValues[8];
int currentPosition;
QTimer *playbackTimer;
bool playbackActive;
bool playbackForward;
static const QColor graphColors[8];
bool secondsMode;
void refreshIDList();
void updateFrameLabel();
void updatePosition(bool forward);
void updateDataView();
void removeAllGraphs();
void createGraph(int);
void updateGraphLocation();
void closeEvent(QCloseEvent *event);
void readSettings();
void writeSettings();
bool eventFilter(QObject *obj, QEvent *event);
};
#endif // FLOWVIEWWINDOW_H