Files
giesCANne/flowviewwindow.h
T
Collin Kidder 9e37ded7cb Fixes for many issues in flowview, graphing window, and frame playback.
In FlowView:
- Drastically improved functionality of live mode. It actually works now
- Fixed several crash bugs
- Program didn't used to pick up new frames properly. This is now corrected.

In Graphing window:
- Fixed dynamic updates to work properly even under heavy bus loads

In frame playback:
- Fixed a bug where single stepping through frames didn't send them over canbus
2016-06-05 22:08:47 -04:00

75 lines
1.9 KiB
C++

#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;
QVector<double> x[8], y[8];
QCPGraph *graphRef[8];
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