#ifndef TRAINREPORT_H #define TRAINREPORT_H #include #include "dbforrmate.h" #include "dataformate.h" #include namespace Ui { class TrainReport; } class TrainReport : public QDialog { Q_OBJECT public: explicit TrainReport(QDialog *parent = nullptr); ~TrainReport(); //参数 @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::TrainReport *ui; ST_TrainReport m_st_trainReport; QChart *m_chart1,*m_chart2,*m_chart3; }; #endif // TRAINREPORT_H