添加项目文件。
This commit is contained in:
parent
f21ac8c361
commit
c453db6248
22
DEM_ASSESS.sln
Normal file
22
DEM_ASSESS.sln
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.32126.315
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DEM_ASSESS", "DEM_ASSESS\DEM_ASSESS.vcxproj", "{E901DBCF-219B-4AA9-A34F-BBDDFC06FE11}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E901DBCF-219B-4AA9-A34F-BBDDFC06FE11}.Release|x64.ActiveCfg = Release|x64
|
||||
{E901DBCF-219B-4AA9-A34F-BBDDFC06FE11}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {1945C514-1E36-458A-841E-E9B4B69F86D4}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
386
DEM_ASSESS/DEM_ASSESS.cpp
Normal file
386
DEM_ASSESS/DEM_ASSESS.cpp
Normal file
@ -0,0 +1,386 @@
|
||||
#include "DEM_ASSESS.h"
|
||||
|
||||
#include <QSettings>
|
||||
|
||||
void WorkThreadObject::runAssessWork(QString model, QString PRE, QString label, QString index, QString result)
|
||||
{
|
||||
qDebug() << "start work:" << "\npredict: " << PRE << "\nLabel:" << label;
|
||||
QFileInfo file(index);
|
||||
file.absolutePath();
|
||||
assess_txt_path = file.absolutePath() + "/assessment.txt";
|
||||
//QDir pluginsDir = QDir(qApp->applicationDirPath());
|
||||
QDir pluginsDir = QDir("D:\\code\\RsSurvey\\RsSurvey_Build\\x64\\Release\\");
|
||||
qDebug() << "----" << pluginsDir.currentPath();
|
||||
if (!pluginsDir.cd("models\\envs"))
|
||||
{
|
||||
qDebug() << "no folder models\\envs";
|
||||
return;
|
||||
}
|
||||
QString exeDirName = pluginsDir.absoluteFilePath("miou_vegetation.exe");
|
||||
QString model_dir = " --model_dir " + model;
|
||||
QString img_data_dir = " --img_data_dir " + PRE + "/";
|
||||
QString label_dir = " --label_dir " + label + "/";
|
||||
QString val_list = " --val_list " + index;
|
||||
QString out_result = " --result_file " + result + "/";
|
||||
QString ss = exeDirName + model_dir + img_data_dir + label_dir + val_list + out_result;
|
||||
qDebug() << ss;
|
||||
QProcess* pProces = new QProcess(this);
|
||||
connect(pProces, SIGNAL(readyReadStandardOutput()), this, SLOT(writeAssessTxt()));
|
||||
pProces->start(ss);
|
||||
|
||||
emit process(2);
|
||||
}
|
||||
|
||||
void WorkThreadObject::writeAssessTxt()
|
||||
{
|
||||
mProces = (QProcess*)sender();
|
||||
QString output = QString::fromLocal8Bit(mProces->readAllStandardOutput());
|
||||
output.chop(2);
|
||||
if (output.toFloat() != 0)
|
||||
{
|
||||
qDebug() << "process:" << output.toFloat();
|
||||
emit process(output.toFloat());
|
||||
}
|
||||
else
|
||||
qDebug() << "unsolved exe out:" << output;
|
||||
}
|
||||
|
||||
void WorkThreadObject::on_cancel()
|
||||
{
|
||||
if (mProces == nullptr)
|
||||
{
|
||||
qDebug() << "--mProces null";
|
||||
}
|
||||
else
|
||||
{
|
||||
QString KillStr = "taskkill /f /im miou_vegetation.exe";
|
||||
mProces->startDetached(KillStr);
|
||||
qDebug() << "--kill Proces";
|
||||
}
|
||||
}
|
||||
///////////////////////////////////////////////////////
|
||||
|
||||
ModelAssessment::ModelAssessment()
|
||||
{
|
||||
//ui.setupUi(this);
|
||||
}
|
||||
|
||||
ModelAssessment::~ModelAssessment()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QString ModelAssessment::PannelName()
|
||||
{
|
||||
return QString::fromLocal8Bit("");
|
||||
}
|
||||
|
||||
QString ModelAssessment::CategoryName()
|
||||
{
|
||||
return QString::fromLocal8Bit("DEM模块");
|
||||
}
|
||||
|
||||
QString ModelAssessment::EnglishName()
|
||||
{
|
||||
return QString::fromLocal8Bit("DEM_Module");
|
||||
}
|
||||
|
||||
QString ModelAssessment::ChineseName()
|
||||
{
|
||||
return QString::fromLocal8Bit("结果评估");
|
||||
}
|
||||
|
||||
QString ModelAssessment::Information()
|
||||
{
|
||||
return "结果评估";
|
||||
}
|
||||
|
||||
QString ModelAssessment::IconPath()
|
||||
{
|
||||
return ":/DEM_ASSESS/resources/assessment.svg";
|
||||
}
|
||||
|
||||
QWidget* ModelAssessment::CenterWidget()
|
||||
{
|
||||
QString gdal_path = qApp->applicationDirPath().toLocal8Bit() + "/share/gdal";
|
||||
QString pro_lib_path = qApp->applicationDirPath().toLocal8Bit() + "/share/proj";
|
||||
qputenv("GDAL_DATA", gdal_path.toLocal8Bit());
|
||||
qputenv("PROJ_LIB", pro_lib_path.toLocal8Bit());
|
||||
|
||||
bool showWin = false;
|
||||
if (myWidget == nullptr)
|
||||
{
|
||||
myWidget = new QDialog();
|
||||
showWin = true;
|
||||
qDebug() << "new QDialog()";
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug() << "already have myWidget";
|
||||
//激活窗口并提升至顶层
|
||||
myWidget->activateWindow();
|
||||
myWidget->raise();
|
||||
return myWidget;
|
||||
}
|
||||
ui.setupUi(myWidget);
|
||||
|
||||
myWidget->setWindowTitle(QString::fromLocal8Bit("结果评估"));
|
||||
myWidget->setWindowFlags(Qt::CustomizeWindowHint | Qt::WindowCloseButtonHint);
|
||||
myWidget->setWindowIcon(QIcon(":/DEM_ASSESS/resources/assessment.svg"));
|
||||
myWidget->setAttribute(Qt::WA_QuitOnClose, false);
|
||||
|
||||
myWidget->setAttribute(Qt::WA_DeleteOnClose);
|
||||
connect(myWidget, &QDialog::destroyed, this, [=] {
|
||||
qDebug() << "----DEM assess window close----";
|
||||
|
||||
QDir pluginsDir = QDir(qApp->applicationDirPath());
|
||||
if (pluginsDir.cd("srsplugins\\DemModel"))
|
||||
{
|
||||
QString strConfigPath = pluginsDir.absoluteFilePath("dem_config.ini");
|
||||
QFile f(strConfigPath);
|
||||
if (f.exists())
|
||||
{
|
||||
WriteConfigPaths(strConfigPath);
|
||||
f.close();
|
||||
}
|
||||
}
|
||||
|
||||
if (mWorkThread != nullptr)
|
||||
{
|
||||
//mWorkThread->quit();
|
||||
//mWorkThread->wait();//调用wait后先调用finished信号对应的槽函数,执行完成后再往下走
|
||||
//mWorkThread = nullptr;//mWorkThread, &QThread::finished, mWorkThread, &QObject::deleteLater,不需要delete
|
||||
//mWorker = nullptr;//mWorkThread, &QThread::finished, mWorker, &QObject::deleteLater
|
||||
mWorkThread->requestInterruption();//请求线程中断
|
||||
mWorkThread->quit();
|
||||
mWorkThread->wait();//调用wait后先调用finished信号对应的槽函数,执行完成后再往下走
|
||||
mWorker->on_cancel();
|
||||
mWorkThread = nullptr;//mWorkThread, &QThread::finished, mWorkThread, &QObject::deleteLater,不需要delete
|
||||
mWorker = nullptr;//mWorkThread, &QThread::finished, mWorker, &QObject::deleteLater
|
||||
}
|
||||
//qDebug() << "--destroyed";
|
||||
myWidget->close();
|
||||
myWidget = nullptr;
|
||||
});
|
||||
connect(ui.pbtInPredict, &QPushButton::pressed, this, &ModelAssessment::choosePredictPath);
|
||||
connect(ui.pbtInLabel, &QPushButton::pressed, this, &ModelAssessment::chooseLabelPath);
|
||||
connect(ui.pbtIndex, &QPushButton::pressed, this, &ModelAssessment::chooseAssessFile);
|
||||
connect(ui.pbtModel, &QPushButton::pressed, this, &ModelAssessment::chooseModelFile);
|
||||
connect(ui.pbtOutResult, &QPushButton::pressed, this, &ModelAssessment::chooseResultPath);
|
||||
|
||||
connect(ui.pushButton_ok, &QPushButton::pressed, this, &ModelAssessment::readAndStart);
|
||||
connect(ui.pushButton_cancel, &QPushButton::pressed, this, &ModelAssessment::pbCancel);
|
||||
|
||||
ui.progressBar->setTextVisible(true);
|
||||
ui.progressBar->setRange(0, 100);
|
||||
|
||||
QFile qssFile(":/DEM_ASSESS/DEM_ASSESS.qss");
|
||||
qssFile.open(QFile::ReadOnly); //以只读方式打开
|
||||
if (qssFile.isOpen())
|
||||
{
|
||||
QString qss = QLatin1String(qssFile.readAll());
|
||||
myWidget->setStyleSheet(qss);
|
||||
qssFile.close();
|
||||
}
|
||||
else
|
||||
qDebug() << "无法打开文件";
|
||||
|
||||
QDir pluginsDir = QDir(qApp->applicationDirPath());
|
||||
if (pluginsDir.cd("srsplugins\\DemModel"))
|
||||
{
|
||||
QString strConfigPath = pluginsDir.absoluteFilePath("dem_config.ini");
|
||||
QFile f(strConfigPath);
|
||||
if (f.exists())
|
||||
{
|
||||
ReadConfigHistoryPaths(strConfigPath);
|
||||
f.close();
|
||||
}
|
||||
}
|
||||
|
||||
if (showWin)
|
||||
myWidget->show();
|
||||
|
||||
return myWidget;
|
||||
}
|
||||
|
||||
void ModelAssessment::startWorkThread()
|
||||
{
|
||||
if (mWorker != nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
mWorkThread = new QThread();
|
||||
mWorker = new WorkThreadObject();
|
||||
mWorker->moveToThread(mWorkThread);
|
||||
connect(mWorkThread, &QThread::finished, mWorkThread, &QObject::deleteLater);
|
||||
connect(mWorkThread, &QThread::finished, mWorker, &QObject::deleteLater);
|
||||
connect(mWorker, &WorkThreadObject::process, myWidget, [=](int value) {
|
||||
ui.progressBar->setValue(value);
|
||||
if (value == 100)
|
||||
{
|
||||
QString txtDir = ui.lineOutResult->text() + "/assessment.txt";
|
||||
QFile file(txtDir);
|
||||
QString outLines = "";
|
||||
if (file.open(QIODevice::ReadOnly))
|
||||
{
|
||||
QTextStream stream(&file);
|
||||
// recall 召回率
|
||||
// precision 精确率
|
||||
// mIoU 平均交并比
|
||||
// mAP 平均精度均值
|
||||
// f1_score
|
||||
while (!stream.atEnd())
|
||||
{
|
||||
QString line = stream.readLine();
|
||||
//strs.push_back(line);
|
||||
if (line.contains("===>mIoU"))
|
||||
{
|
||||
//===>mIoU:68.45; mAP: 74.92
|
||||
line.remove("===>");
|
||||
line.replace(QStringLiteral("mAP"), QStringLiteral("平均精度均值mAP"));
|
||||
line.replace(QStringLiteral("mIoU"), QStringLiteral("平均交并比mIoU"));
|
||||
outLines = outLines + line + "\n";
|
||||
}
|
||||
else if (line.contains("===>recall"))
|
||||
{
|
||||
//===>recall:66.62; precision: 51.2
|
||||
line.remove("===>");
|
||||
line.replace(QStringLiteral("recall"), QStringLiteral("召回率recall"));
|
||||
line.replace(QStringLiteral("precision"), QStringLiteral("精确率precision"));
|
||||
outLines = outLines + line + "\n";
|
||||
}
|
||||
else if (line.contains("===>f1_score"))
|
||||
{
|
||||
//===>f1_score:57.9
|
||||
line.remove("===>");
|
||||
line.replace(QStringLiteral("f1_score"), QStringLiteral("F1分数f1_score"));
|
||||
outLines = outLines + line;
|
||||
}
|
||||
}
|
||||
file.close();
|
||||
}
|
||||
|
||||
QMessageBox mess(QMessageBox::Information,
|
||||
QString::fromLocal8Bit("评估结束"),
|
||||
QString::fromLocal8Bit("评价结果:\n") + txtDir + "\n"
|
||||
+ outLines);
|
||||
mess.setWindowFlags(Qt::Drawer);
|
||||
mess.setTextInteractionFlags(Qt::TextSelectableByMouse);
|
||||
mess.setStandardButtons(QMessageBox::Yes);
|
||||
mess.button(QMessageBox::StandardButton::Yes)->setText(QString::fromLocal8Bit("确认"));
|
||||
//mess.setTextInteractionFlags(Qt::TextSelectableByMouse);
|
||||
int result = mess.exec();
|
||||
pbCancel();
|
||||
}
|
||||
});
|
||||
connect(this, &ModelAssessment::startPreAssessment, mWorker, &WorkThreadObject::runAssessWork);
|
||||
|
||||
mWorkThread->start();
|
||||
}
|
||||
|
||||
void ModelAssessment::chooseModelFile()
|
||||
{
|
||||
QString fileModel = QFileDialog::getOpenFileName(ui.pbtModel, QString::fromLocal8Bit("选择输入模型文件"), "", "*.pth");
|
||||
if (fileModel != "")
|
||||
ui.lineModel->setText(fileModel);
|
||||
}
|
||||
void ModelAssessment::choosePredictPath()
|
||||
{
|
||||
QString dirDom = QFileDialog::getExistingDirectory(ui.pbtInPredict, QString::fromLocal8Bit("选择输入评价文件路径"), "");
|
||||
if (dirDom != "")
|
||||
ui.lineInPredict->setText(dirDom);
|
||||
}
|
||||
void ModelAssessment::chooseLabelPath()
|
||||
{
|
||||
QString dirDom = QFileDialog::getExistingDirectory(ui.pbtInLabel, QString::fromLocal8Bit("选择输入Label文件路径"), "");
|
||||
if (dirDom != "")
|
||||
ui.lineInLabel->setText(dirDom);
|
||||
}
|
||||
void ModelAssessment::chooseAssessFile()
|
||||
{
|
||||
QString dirDom = QFileDialog::getOpenFileName(ui.pbtIndex, QString::fromLocal8Bit("选择输入评估文件索引"), "", "*.txt");
|
||||
if (dirDom != "")
|
||||
ui.lineIndex->setText(dirDom);
|
||||
}
|
||||
void ModelAssessment::chooseResultPath()
|
||||
{
|
||||
QString dirResult = QFileDialog::getExistingDirectory(ui.pbtOutResult, QString::fromLocal8Bit("选择评估结果输出路径"), "");
|
||||
if (dirResult != "")
|
||||
ui.lineOutResult->setText(dirResult);
|
||||
}
|
||||
|
||||
void ModelAssessment::ReadConfigHistoryPaths(QString strPath)
|
||||
{
|
||||
QSettings configIni(strPath, QSettings::IniFormat);
|
||||
|
||||
//打开标题为:[DemTrain] 的组,读取DemTrain输出结果TrainResult字段
|
||||
configIni.beginGroup("DemTrain");
|
||||
|
||||
QString strDemTrainResult = configIni.value("TrainResult").toString();
|
||||
QDir srcDir = QDir(strDemTrainResult);
|
||||
//更新评价文件列表
|
||||
if (srcDir.absoluteFilePath("val_list.txt") != "")
|
||||
ui.lineIndex->setText(srcDir.absoluteFilePath("val_list.txt"));
|
||||
//更新输入Images
|
||||
srcDir = QDir(strDemTrainResult);
|
||||
if (srcDir.cd("Images"))
|
||||
ui.lineInPredict->setText(srcDir.absolutePath());
|
||||
//更新输入Labels
|
||||
srcDir = QDir(strDemTrainResult);
|
||||
if (srcDir.cd("Labels"))
|
||||
ui.lineInLabel->setText(srcDir.absolutePath());
|
||||
|
||||
configIni.endGroup();//关闭组
|
||||
|
||||
//打开标题为:[DemAssess] 的组,读取AssessResult字段
|
||||
configIni.beginGroup("DemAssess");
|
||||
//更新评价结果输出
|
||||
ui.lineOutResult->setText(configIni.value("AssessResult").toString());
|
||||
|
||||
configIni.endGroup();//关闭组
|
||||
}
|
||||
|
||||
void ModelAssessment::WriteConfigPaths(QString strPath)
|
||||
{
|
||||
QSettings configIni(strPath, QSettings::IniFormat);
|
||||
configIni.setIniCodec("utf-8");
|
||||
//打开标题为:[DemAssess] 的组
|
||||
configIni.beginGroup("DemAssess");
|
||||
|
||||
//更新输入模型路径
|
||||
QString temp = ui.lineOutResult->text();
|
||||
if (temp != "")
|
||||
configIni.setValue("AssessResult", temp);
|
||||
|
||||
configIni.endGroup();//关闭组
|
||||
}
|
||||
|
||||
void ModelAssessment::readAndStart()
|
||||
{
|
||||
QString dirModel = ui.lineModel->text();
|
||||
QString dirIndex = ui.lineIndex->text();
|
||||
QString dirLabel = ui.lineInLabel->text();
|
||||
QString dirPredict = ui.lineInPredict->text();
|
||||
QString dirResult = ui.lineOutResult->text();
|
||||
|
||||
ui.progressBar->setValue(0);
|
||||
|
||||
if (dirLabel == "" || dirPredict == "" || dirIndex == "" || dirModel == "" || dirResult == "")
|
||||
{
|
||||
QMessageBox mess(QMessageBox::NoIcon, QString::fromLocal8Bit("错误"), QString::fromLocal8Bit("请检查输入路径"));
|
||||
mess.setWindowFlags(Qt::Drawer);
|
||||
int result = mess.exec();
|
||||
return;
|
||||
}
|
||||
if (mWorkThread == nullptr)
|
||||
{
|
||||
qDebug() << "--startThread";
|
||||
startWorkThread();
|
||||
}
|
||||
emit startPreAssessment(dirModel, dirPredict, dirLabel, dirIndex, dirResult);
|
||||
}
|
||||
|
||||
void ModelAssessment::pbCancel()
|
||||
{
|
||||
delete myWidget;//调起&QDialog::destroyed
|
||||
}
|
79
DEM_ASSESS/DEM_ASSESS.h
Normal file
79
DEM_ASSESS/DEM_ASSESS.h
Normal file
@ -0,0 +1,79 @@
|
||||
#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;
|
||||
|
||||
};
|
6
DEM_ASSESS/DEM_ASSESS.qrc
Normal file
6
DEM_ASSESS/DEM_ASSESS.qrc
Normal file
@ -0,0 +1,6 @@
|
||||
<RCC>
|
||||
<qresource prefix="/DEM_ASSESS">
|
||||
<file>DEM_ASSESS.qss</file>
|
||||
<file>resources/assessment.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
68
DEM_ASSESS/DEM_ASSESS.qss
Normal file
68
DEM_ASSESS/DEM_ASSESS.qss
Normal file
@ -0,0 +1,68 @@
|
||||
QProgressBar#progressBar {
|
||||
border:0px solid white;
|
||||
text-align:center;
|
||||
color:black;
|
||||
}
|
||||
QProgressBar#progressBar:chunk {
|
||||
background-color:#3FABBA;
|
||||
width:20px;
|
||||
}
|
||||
QProgressBar#progressBar QLineEdit {
|
||||
border:none;
|
||||
color:black;
|
||||
padding-left:5px;
|
||||
font-size:16px;
|
||||
background-color:transparent;
|
||||
}
|
||||
|
||||
QLabel{
|
||||
color:black;
|
||||
font-family:'Microsoft YaHei';
|
||||
font-size:12px;
|
||||
}
|
||||
|
||||
/*----QPushButtonÑùʽ±í*/
|
||||
#pushButton_ok, #pushButton_cancel, #pbtInPredict, #pbtInLabel, #pbtModel, #pbtIndex,#pbtOutResult{
|
||||
font-family:'Microsoft YaHei';
|
||||
font-size:12px;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #dcdfe6;
|
||||
padding: 2px;
|
||||
border-radius: 5px;
|
||||
max-height:20px;
|
||||
}
|
||||
#pushButton_ok, #pushButton_cancel{
|
||||
min-width:36px;
|
||||
}
|
||||
#pushButton_ok:hover, #pushButton_cancel:hover, #pbtInPredict:hover, #pbtInLabel:hover, #pbtModel:hover, #pbtIndex:hover,#pbtOutResult:hover{
|
||||
background-color: #ecf5ff;
|
||||
color: #409eff;
|
||||
}
|
||||
#pushButton_ok:pressed, #pushButton_cancel:pressed, #pbtInPredict:pressed, #pbtInLabel:pressed, #pbtModel:pressed, #pbtIndex:pressed,#pbtOutResult:pressed{
|
||||
border: 1px solid #3a8ee6;
|
||||
color: #409eff;
|
||||
}
|
||||
#pushButton_ok:checked, #pushButton_cancel:checked, #pbtInPredict:checked, #pbtInLabel:checked, #pbtModel:checked, #pbtIndex:checked,#pbtOutResult:checked{
|
||||
border: 1px solid #3a8ee6;
|
||||
color: #409eff;
|
||||
}
|
||||
#pushButton_ok:focus, #pushButton_cancel:focus, #pbtInPredict:focus, #pbtInLabel:focus, #pbtModel:focus, #pbtIndex:focus,#pbtOutResult:focus{
|
||||
border: 1px solid #3a8ee6;
|
||||
color: #409eff;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/*----QLineEditÑùʽ*/
|
||||
#lineInPredict, #lineInLabel, #lineModel, #lineIndex, #lineOutResult{
|
||||
border:0px;
|
||||
border-bottom: 1px solid #B3B3B3;
|
||||
font-family:'Microsoft YaHei';
|
||||
font-size:12px;
|
||||
background-color:transparent;
|
||||
}
|
||||
#lineInPredict:hover, #lineInLabel:hover, #lineModel:hover, #lineIndex:hover, #lineOutResult:hover{
|
||||
border-bottom: 2px solid #66A3FF;
|
||||
}
|
||||
#lineInPredict:focus, #lineInLabel:focus, #lineModel:focus, #lineIndex:focus, #lineOutResult:focus{
|
||||
border-bottom: 2px solid #7666FF;
|
||||
}
|
317
DEM_ASSESS/DEM_ASSESS.ui
Normal file
317
DEM_ASSESS/DEM_ASSESS.ui
Normal file
@ -0,0 +1,317 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DEM_ASSESSClass</class>
|
||||
<widget class="QDialog" name="DEM_ASSESSClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>500</width>
|
||||
<height>300</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>500</width>
|
||||
<height>300</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>DEM_ASSESS</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset>
|
||||
<normaloff>resources/assessment.svg</normaloff>resources/assessment.svg</iconset>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_mask_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>输入验证文件路径</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_mask">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>输入标签文件路径</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineModel"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineIndex"/>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="lineInPredict">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>输入模型文件路径</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pbtIndex">
|
||||
<property name="text">
|
||||
<string>选择文件</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QPushButton" name="pbtInPredict">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>75</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>75</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择文件夹</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="lineInLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>输入验证文件索引</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pbtModel">
|
||||
<property name="text">
|
||||
<string>选择文件</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QPushButton" name="pbtInLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>75</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>75</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择文件夹</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>评估结果输出路径</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="lineOutResult"/>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QPushButton" name="pbtOutResult">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>75</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>75</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择文件夹</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_ok">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确定</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>13</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_cancel">
|
||||
<property name="text">
|
||||
<string>取消</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QProgressBar" name="progressBar">
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources>
|
||||
<include location="DEM_ASSESS.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
80
DEM_ASSESS/DEM_ASSESS.vcxproj
Normal file
80
DEM_ASSESS/DEM_ASSESS.vcxproj
Normal file
@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{E901DBCF-219B-4AA9-A34F-BBDDFC06FE11}</ProjectGuid>
|
||||
<Keyword>QtVS_v304</Keyword>
|
||||
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
<QtMsBuild Condition="'$(QtMsBuild)'=='' OR !Exists('$(QtMsBuild)\qt.targets')">$(MSBuildProjectDirectory)\QtMsBuild</QtMsBuild>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')">
|
||||
<Import Project="$(QtMsBuild)\qt_defaults.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="QtSettings">
|
||||
<QtInstall>QtQgis</QtInstall>
|
||||
<QtModules>core;gui;widgets</QtModules>
|
||||
<QtBuildConfig>release</QtBuildConfig>
|
||||
</PropertyGroup>
|
||||
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
|
||||
<Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
|
||||
</Target>
|
||||
<ImportGroup Label="ExtensionSettings" />
|
||||
<ImportGroup Label="Shared" />
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(QtMsBuild)\Qt.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<TargetName>dem2-$(ProjectName)</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="Configuration">
|
||||
<ClCompile>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<UsePrecompiledHeader>Use</UsePrecompiledHeader>
|
||||
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<QtMoc>
|
||||
<PrependInclude>%(PrependInclude)</PrependInclude>
|
||||
</QtMoc>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<QtRcc Include="DEM_ASSESS.qrc" />
|
||||
<QtUic Include="DEM_ASSESS.ui" />
|
||||
<QtMoc Include="DEM_ASSESS.h" />
|
||||
<ClCompile Include="DEM_ASSESS.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="SrsMainPluginInterFace.h" />
|
||||
<ClInclude Include="x64\Release\uic\ui_DEM_ASSESS.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="DEM_ASSESS.qss" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
|
||||
<Import Project="$(QtMsBuild)\qt.targets" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
59
DEM_ASSESS/DEM_ASSESS.vcxproj.filters
Normal file
59
DEM_ASSESS/DEM_ASSESS.vcxproj.filters
Normal file
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Form Files">
|
||||
<UniqueIdentifier>{99349809-55BA-4b9d-BF79-8FDBB0286EB3}</UniqueIdentifier>
|
||||
<Extensions>ui</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Translation Files">
|
||||
<UniqueIdentifier>{639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}</UniqueIdentifier>
|
||||
<Extensions>ts</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtRcc Include="DEM_ASSESS.qrc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</QtRcc>
|
||||
<QtUic Include="DEM_ASSESS.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
<QtMoc Include="DEM_ASSESS.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<ClCompile Include="DEM_ASSESS.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="x64\Release\uic\ui_DEM_ASSESS.h">
|
||||
<Filter>Form Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="SrsMainPluginInterFace.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="DEM_ASSESS.qss">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
58
DEM_ASSESS/SrsMainPluginInterFace.h
Normal file
58
DEM_ASSESS/SrsMainPluginInterFace.h
Normal file
@ -0,0 +1,58 @@
|
||||
#pragma once
|
||||
//#if _MSC_VER >=1600 // MSVC2015>1899, msvc_ver=14.0
|
||||
//#pragma execution_character_set("utf-8")
|
||||
//#endif
|
||||
//#include "qtclasslibrary1_global.h"
|
||||
#include <qstring.h>
|
||||
#include <QtPlugin>
|
||||
#include <QVector>
|
||||
#include <QObject>
|
||||
|
||||
struct SPluginMetaData
|
||||
{
|
||||
QVector<QString> qvsReturnFilePaths;
|
||||
QVector<QString> qvsSendFilePaths;
|
||||
bool isAdd2Map;
|
||||
|
||||
};
|
||||
class SrsMainInterface : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
virtual ~SrsMainInterface() {}
|
||||
|
||||
/// <summary>
|
||||
/// 返回pannel的名字
|
||||
/// </summary>
|
||||
virtual QString PannelName() = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 返回Category名字
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
virtual QString CategoryName() = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 返回插件的英文名字
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
virtual QString EnglishName() = 0;
|
||||
/// <summary>
|
||||
/// 返回插件的中文名字
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
virtual QString ChineseName() = 0;
|
||||
virtual QString Information() = 0;
|
||||
virtual QString IconPath() = 0;
|
||||
virtual QWidget* CenterWidget() = 0;
|
||||
//
|
||||
//public slots:
|
||||
// virtual void test(QWidget* parent) = 0;
|
||||
|
||||
signals:
|
||||
void AddDataToMap(QStringList string_list);
|
||||
//void addDataToCanvas(QStringList string_list);
|
||||
};
|
||||
|
||||
#define MainInterface_iid "com.Srs.MainInterface"
|
||||
Q_DECLARE_INTERFACE(SrsMainInterface, MainInterface_iid)
|
16
DEM_ASSESS/main.cpp
Normal file
16
DEM_ASSESS/main.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#include "DEM_ASSESS.h"
|
||||
#include <QtWidgets/QApplication>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
|
||||
QString gdal_path = qApp->applicationDirPath().toLocal8Bit() + "/share/gdal";
|
||||
QString pro_lib_path = qApp->applicationDirPath().toLocal8Bit() + "/share/proj";
|
||||
qputenv("GDAL_DATA", gdal_path.toLocal8Bit());
|
||||
qputenv("PROJ_LIB", pro_lib_path.toLocal8Bit());
|
||||
|
||||
ModelAssessment w;
|
||||
w.CenterWidget()->show();
|
||||
return a.exec();
|
||||
}
|
2
DEM_ASSESS/resources/assessment.svg
Normal file
2
DEM_ASSESS/resources/assessment.svg
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1652932649746" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2186" width="32" height="32" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
|
||||
</style></defs><path d="M802.3 649c-13.3 0-24 10.7-24 24v163.9c0 17.7-14.4 32.1-32.1 32.1H222.6c-17.7 0-32.1-14.4-32.1-32.1v-656c0-17.7 14.4-32.1 32.1-32.1h523.7c17.7 0 32 14.4 32 32V235c0 13.3 10.7 24 24 24s24-10.7 24-24v-54.2c0-44.1-35.9-80-80-80H222.6c-44.2 0-80.1 35.9-80.1 80.1v656c0 44.2 35.9 80.1 80.1 80.1h523.6c44.2 0 80.1-35.9 80.1-80.1V673c0-13.3-10.7-24-24-24z" fill="#2c2c2c" p-id="2187"></path><path d="M856.6 332.2L827 315.1c-15.2-9.3-31.5-11.1-47-5.2-12.7 4.8-24.3 14.8-33.8 29l-16.4 25.2c-0.8 0.8-1.5 1.7-2.1 2.6-0.7 1-1.2 2.1-1.7 3.2L563 620.5c-8.8 13.2-13.2 29.2-12.6 45.1l-2.2 90.4c-0.1 5.7 5.4 9.7 10.8 7.9l100.8-35.2c15.6-4.6 28.6-14.8 36.8-28.9L866 411.2l0.1-0.1c5.3-9.1 11.7-23.2 12.1-38 0.5-17.5-7.2-32-21.6-40.9z m-50.3 17.1l29.6 17.1c1.4 0.9 2.4 1.7 2.3 5.4-0.1 5-2.6 12-6.7 19.1l-8.5 14.5-50.6-33.3 7.3-11.2c13.1-19.8 22.6-14 26.6-11.6zM662.1 679.5l-0.1 0.1c-3 5.2-8 9-13.8 10.7l-0.5 0.1-51.7 18c-3.2 1.1-6.6-1.3-6.5-4.7l1-38.7v-0.8c-0.4-7.6 1.7-15.4 5.9-21.7l154.2-236.9 52.2 34.3-140.7 239.6zM702.6 256.9c-7.8-7.8-20.5-7.9-28.3-0.1L467.8 462.4l-93.9-98.6c-7-7.4-18.5-8.3-26.6-2.1l-113.1 86.6c-8.8 6.7-10.4 19.3-3.7 28 6.7 8.8 19.3 10.4 28 3.7l98.8-75.7 95.6 100.4c3.7 3.9 8.8 6.1 14.2 6.2h0.3c5.3 0 10.4-2.1 14.1-5.8l221.1-220c7.8-7.7 7.8-20.4 0-28.2zM266.3 647h186.2c11 0 20-9 20-20s-9-20-20-20H266.3c-11 0-20 9-20 20s9 20 20 20zM266.3 775h232.2c11 0 20-9 20-20s-9-20-20-20H266.3c-11 0-20 9-20 20s9 20 20 20z" fill="#2c2c2c" p-id="2188"></path></svg>
|
After Width: | Height: | Size: 2.1 KiB |
Loading…
Reference in New Issue
Block a user