40 lines
794 B
C
40 lines
794 B
C
|
#pragma once
|
|||
|
|
|||
|
#include <QtWidgets/QMainWindow>
|
|||
|
#include <QTimer>
|
|||
|
#include <QThread>
|
|||
|
#include "ui_realTimeDataDisplay.h"
|
|||
|
#include "qcustomplot.h"
|
|||
|
#include "AxisTag.h"
|
|||
|
|
|||
|
class realTimeDataDisplay : public QMainWindow
|
|||
|
{
|
|||
|
Q_OBJECT
|
|||
|
|
|||
|
public:
|
|||
|
realTimeDataDisplay(QWidget* parent = nullptr);
|
|||
|
~realTimeDataDisplay();
|
|||
|
|
|||
|
signals:
|
|||
|
void updateUICustomPlot(double key, double v1, double v2);
|
|||
|
|
|||
|
private slots:
|
|||
|
void timerSlot();
|
|||
|
void onUpdateUICustomPlot(double key, double v1, double v2);
|
|||
|
|
|||
|
private:
|
|||
|
Ui::realTimeDataDisplayClass ui;
|
|||
|
QCustomPlot* mPlot = nullptr;
|
|||
|
QTimer* mDataTimer = nullptr;
|
|||
|
QThread* mTimerThread = nullptr;
|
|||
|
|
|||
|
QPointer<QCPGraph> mGraph1;
|
|||
|
QPointer<QCPGraph> mGraph2;
|
|||
|
QSharedPointer<QCPAxisTickerText> textTicker;
|
|||
|
|
|||
|
AxisTag* mTag1;
|
|||
|
AxisTag* mTag2;
|
|||
|
|
|||
|
bool xAxisAutoChange = true;
|
|||
|
};
|