modbus_rtu_test/subform.h

74 lines
1.3 KiB
C++

#ifndef SUBFORM_H
#define SUBFORM_H
#include <QWidget>
#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 <QStandardItemModel>
#include <QStandardItem>
QT_BEGIN_NAMESPACE
namespace Ui { class Form; }
QT_END_NAMESPACE
using namespace QtCharts;
class SubForm :QWidget
{
Q_OBJECT
public:
SubForm(QString,int baurate,int device_addr);
void init_charts();
private slots:
void on_pushButton_clicked();
void on_pushButton_2_clicked(bool checked);
void on_pushButton_2_clicked();
private:
Ui::Form *ui;
QChart *mChart;
QValueAxis *mAxisX;
QValueAxis *mAxisY;
QValueAxis *mAxisY2;
int baurate;
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;
QStandardItemModel *mModel;
};
#endif // SUBFORM_H