62 lines
1.4 KiB
C
62 lines
1.4 KiB
C
|
#ifndef TRAINREPORTTHREETWO_H
|
||
|
#define TRAINREPORTTHREETWO_H
|
||
|
|
||
|
#include <QDialog>
|
||
|
#include "dbforrmate.h"
|
||
|
#include "dataformate.h"
|
||
|
#include <QtCharts>
|
||
|
|
||
|
namespace Ui {
|
||
|
class TrainReportThreeTwo;
|
||
|
}
|
||
|
|
||
|
class TrainReportThreeTwo : public QDialog
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
explicit TrainReportThreeTwo(QDialog *parent = nullptr);
|
||
|
~TrainReportThreeTwo();
|
||
|
|
||
|
//参数 @int type 1-训练生成报告 0-查看导出报告
|
||
|
void setReportData(const ST_TrainReport&,int type);
|
||
|
|
||
|
ST_TrainReport getReportDataByStartTime(QString startTimeStr);
|
||
|
|
||
|
bool deleteReportByStartTime(QString startTimeStr);
|
||
|
|
||
|
//绘制饼状图
|
||
|
void drawPieChart(const ST_TrainReport&);
|
||
|
|
||
|
protected:
|
||
|
void paintEvent(QPaintEvent *event);
|
||
|
|
||
|
virtual void changeEvent(QEvent* event);
|
||
|
private:
|
||
|
/***将图片导出到pdf**
|
||
|
* @const QPixmap &pixmap 要保存的图片
|
||
|
* @QString fileName pdf的默认保存的名字
|
||
|
* *********/
|
||
|
void pixmapImportPDF(const QPixmap &pixmap,QString fileName);
|
||
|
|
||
|
//根据ID获取模式
|
||
|
QString getTrainMode(int8_t mode);
|
||
|
private slots:
|
||
|
void on_close_Btn_clicked();
|
||
|
|
||
|
void on_noSave_Btn_clicked();
|
||
|
|
||
|
void on_save_Btn_clicked();
|
||
|
|
||
|
void on_import_Btn_clicked();
|
||
|
|
||
|
private:
|
||
|
Ui::TrainReportThreeTwo *ui;
|
||
|
ST_TrainReport m_st_TrainReportThreeTwo;
|
||
|
QChart *m_chart1,*m_chart2,*m_chart3;
|
||
|
|
||
|
};
|
||
|
|
||
|
#endif // TrainReportThreeTwo_H
|
||
|
|