64 lines
1.3 KiB
C++
64 lines
1.3 KiB
C++
#ifndef TERMINALINFO_H
|
|
#define TERMINALINFO_H
|
|
|
|
#include <QWidget>
|
|
#include <QStandardItemModel> //数据模型类
|
|
#include "TableHeaderView.h"
|
|
#include <QtCharts>
|
|
#include <QtCharts/QPieSeries>
|
|
#include <QtCharts/QPieSlice>
|
|
#include "global.h"
|
|
|
|
QT_CHARTS_BEGIN_NAMESPACE
|
|
class QChartView;
|
|
class QChart;
|
|
QT_CHARTS_END_NAMESPACE
|
|
|
|
|
|
namespace Ui {
|
|
class CTerminalInfo;
|
|
}
|
|
|
|
class CTerminalInfo : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit CTerminalInfo(QWidget *parent = nullptr);
|
|
~CTerminalInfo();
|
|
|
|
private slots:
|
|
//网络请求数据响应
|
|
void slotNetMgr(QString sAddr,const QVariant& msg);
|
|
void on_pushButton_Update_clicked();
|
|
|
|
void on_pushButtonCopy_clicked();
|
|
|
|
void on_pushButton_export_clicked();
|
|
|
|
void on_pushButton_import_clicked();
|
|
|
|
private:
|
|
Ui::CTerminalInfo *ui;
|
|
|
|
QGridLayout *m_gridLayout;
|
|
QList<QChartView *> m_charts;
|
|
QLabel * m_centerLabel1;
|
|
QLabel * m_centerLabel2;
|
|
QLabel * m_centerLabel3;
|
|
|
|
|
|
TableHeaderView *myHeader;
|
|
QStandardItemModel *model;
|
|
QString headerStr ;
|
|
QString m_strTitle;
|
|
|
|
QChart * bulidPieChart(int percent,QString& strTitle);
|
|
void resizeEvent(QResizeEvent *event);
|
|
|
|
void UpdateChart(double&,double&,double&,double&,QString&);
|
|
|
|
};
|
|
|
|
#endif // TERMINALINFO_H
|