80 lines
1.6 KiB
C++
80 lines
1.6 KiB
C++
#pragma once
|
||
|
||
#include <QtWidgets>
|
||
#include <QtWidgets/QDialog>
|
||
#include <QThread>
|
||
#include <QFile>
|
||
#include <QMessageBox>
|
||
|
||
#include "ui_DEM_ASSESS.h"
|
||
#include "SrsMainPluginInterFace.h"
|
||
|
||
class WorkThreadObject :public QObject
|
||
{
|
||
Q_OBJECT
|
||
|
||
public:
|
||
void on_cancel();
|
||
|
||
signals:
|
||
void process(int value);
|
||
|
||
public slots:
|
||
void runAssessWork(QString model, QString PRE, QString label, QString index, QString result);
|
||
void writeAssessTxt();
|
||
|
||
private:
|
||
QProcess* mProces = nullptr;
|
||
QString assess_txt_path;
|
||
};
|
||
|
||
class ModelAssessment : public SrsMainInterface
|
||
{
|
||
Q_OBJECT
|
||
Q_INTERFACES(SrsMainInterface)
|
||
Q_PLUGIN_METADATA(IID MainInterface_iid)
|
||
|
||
public:
|
||
ModelAssessment();
|
||
~ModelAssessment();
|
||
|
||
virtual QString PannelName() override;
|
||
virtual QString CategoryName() override;
|
||
|
||
virtual QString EnglishName() override;
|
||
virtual QString ChineseName() override;
|
||
virtual QString Information() override;
|
||
virtual QString IconPath() override;
|
||
virtual QWidget* CenterWidget() override;
|
||
|
||
//读json文件,获取历史存储的路径
|
||
void ReadConfigHistoryPaths(QString strPath);
|
||
//保存本次打开的路径到json文件
|
||
void WriteConfigPaths(QString strPath);
|
||
|
||
void startWorkThread();
|
||
|
||
signals:
|
||
void startPreAssessment(QString model, QString PRE, QString label, QString index, QString result);
|
||
|
||
public slots:
|
||
//pushbutton_OK
|
||
void readAndStart();
|
||
void pbCancel();
|
||
|
||
void choosePredictPath();
|
||
void chooseLabelPath();
|
||
void chooseAssessFile();
|
||
void chooseModelFile();
|
||
void chooseResultPath();
|
||
|
||
private:
|
||
Ui::DEM_ASSESSClass ui;
|
||
|
||
QDialog* myWidget = nullptr;
|
||
|
||
WorkThreadObject* mWorker = nullptr;
|
||
QThread* mWorkThread = nullptr;
|
||
|
||
};
|