UpLowLimp/ZBD_IIIDL_S_Project/Src/Report/trainreporttwothree.h
2024-11-25 17:15:44 +08:00

62 lines
1.4 KiB
C++

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