modbus_rtu_test/mainwindow.h

70 lines
1.3 KiB
C
Raw Normal View History

2023-09-27 17:30:27 +00:00
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QtCharts/QChartView>
#include <QtCharts/QLineSeries>
#include <QtCharts/QBarSet>
#include <QtCharts/QChart>
#include <QtCharts/QValueAxis>
#include <QtCharts/QAreaSeries>
#include <QtCharts/QBarCategoryAxis>
#include <QDateTime>
#include "global.h"
#include "subform.h"
#include <QMap>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
void init_charts();
private slots:
void on_pushButton_2_clicked();
void on_pushButton_clicked();
void on_pushButton_3_clicked();
private:
QMap<QString,SubForm *> mForms;
Ui::MainWindow *ui;
QChart *mChart;
QValueAxis *mAxisX;
QValueAxis *mAxisY;
QValueAxis *mAxisY2;
QLineSeries *mSeries1;
QLineSeries *mSeries2;
QLineSeries *mSeries3;
QLineSeries *mSeries4;
QLineSeries *mSeries5;
QLineSeries *mSeries6;
QVector<QString> pTime;
QVector<float> p1;
QVector<float> p2;
QVector<float> p3;
QVector<float> p4;
QVector<float> p5;
QVector<float> p6;
Config *mConfig;
float mMaxX;
QDateTime mStartTime;
bool mStart;
};
#endif // MAINWINDOW_H