2018-12-29 00:46:47 +08:00
|
|
|
#pragma once
|
|
|
|
#include <array>
|
|
|
|
#include <random>
|
|
|
|
#include <chrono>
|
|
|
|
|
|
|
|
#include "jkqtplotter/jkqtplotter.h"
|
|
|
|
|
|
|
|
|
|
|
|
#define NDATA 500
|
|
|
|
|
2019-01-20 23:15:10 +08:00
|
|
|
class SpeedTestPlot: public JKQTPlotter {
|
2018-12-29 00:46:47 +08:00
|
|
|
Q_OBJECT
|
|
|
|
protected:
|
|
|
|
std::array<double, NDATA> X, Y, Y2;
|
|
|
|
const double dx;
|
|
|
|
double x0;
|
|
|
|
std::chrono::system_clock::time_point t_lastplot;
|
2019-11-18 23:46:15 +08:00
|
|
|
QAction* actAntiAliase;
|
|
|
|
QAction* actTwoGraphs;
|
|
|
|
QAction* actFixedXAxis;
|
2018-12-29 00:46:47 +08:00
|
|
|
public:
|
|
|
|
SpeedTestPlot();
|
|
|
|
|
|
|
|
virtual ~SpeedTestPlot();
|
|
|
|
public slots:
|
|
|
|
void plotNewData();
|
2019-11-18 23:46:15 +08:00
|
|
|
|
2018-12-29 00:46:47 +08:00
|
|
|
};
|