Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c453db6248 | |||
| f21ac8c361 |
@@ -1,22 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.32630.194
|
||||
VisualStudioVersion = 16.0.32126.315
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LandslideAssess", "LandslideAssess\LandslideAssess.vcxproj", "{AEAE6E5B-D14B-46CB-BF18-3375936B7CD2}"
|
||||
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
|
||||
{AEAE6E5B-D14B-46CB-BF18-3375936B7CD2}.Release|x64.ActiveCfg = Release|x64
|
||||
{AEAE6E5B-D14B-46CB-BF18-3375936B7CD2}.Release|x64.Build.0 = Release|x64
|
||||
{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 = {B31E7462-C1A4-4BA3-97F3-704180A5CDB6}
|
||||
SolutionGuid = {1945C514-1E36-458A-841E-E9B4B69F86D4}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -1,43 +1,106 @@
|
||||
#include "LandslideAssess.h"
|
||||
#include "DEM_ASSESS.h"
|
||||
|
||||
#include <QSettings>
|
||||
|
||||
LandslideAssess::LandslideAssess()
|
||||
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);
|
||||
}
|
||||
|
||||
QString LandslideAssess::PannelName()
|
||||
ModelAssessment::~ModelAssessment()
|
||||
{
|
||||
return QString::fromLocal8Bit("地质模块");
|
||||
|
||||
}
|
||||
|
||||
QString LandslideAssess::CategoryName()
|
||||
QString ModelAssessment::PannelName()
|
||||
{
|
||||
return QString::fromLocal8Bit("地质模块");
|
||||
return QString::fromLocal8Bit("");
|
||||
}
|
||||
|
||||
QString LandslideAssess::EnglishName()
|
||||
QString ModelAssessment::CategoryName()
|
||||
{
|
||||
return QString::fromLocal8Bit("LandslideAssess");
|
||||
return QString::fromLocal8Bit("DEM模块");
|
||||
}
|
||||
|
||||
QString LandslideAssess::ChineseName()
|
||||
QString ModelAssessment::EnglishName()
|
||||
{
|
||||
return QString::fromLocal8Bit("DEM_Module");
|
||||
}
|
||||
|
||||
QString ModelAssessment::ChineseName()
|
||||
{
|
||||
return QString::fromLocal8Bit("结果评估");
|
||||
}
|
||||
|
||||
QString LandslideAssess::Information()
|
||||
QString ModelAssessment::Information()
|
||||
{
|
||||
return QString::fromLocal8Bit("结果评估");
|
||||
return "结果评估";
|
||||
}
|
||||
|
||||
QString LandslideAssess::IconPath()
|
||||
QString ModelAssessment::IconPath()
|
||||
{
|
||||
return QString(":/LandslideAssess/resources/assessment.svg");
|
||||
return ":/DEM_ASSESS/resources/assessment.svg";
|
||||
}
|
||||
|
||||
QWidget* LandslideAssess::CenterWidget()
|
||||
QWidget* ModelAssessment::CenterWidget()
|
||||
{
|
||||
QString gdal_path = qApp->applicationDirPath().toLocal8Bit() + "/share/gdal";
|
||||
QString pro_lib_path = qApp->applicationDirPath().toLocal8Bit() + "/share/proj";
|
||||
@@ -63,17 +126,17 @@ QWidget* LandslideAssess::CenterWidget()
|
||||
|
||||
myWidget->setWindowTitle(QString::fromLocal8Bit("结果评估"));
|
||||
myWidget->setWindowFlags(Qt::CustomizeWindowHint | Qt::WindowCloseButtonHint);
|
||||
myWidget->setWindowIcon(QIcon(":/LandslideAssess/resources/assessment.svg"));
|
||||
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() << "----Landslide assess window close----";
|
||||
qDebug() << "----DEM assess window close----";
|
||||
|
||||
QDir pluginsDir = QDir(qApp->applicationDirPath());
|
||||
if (pluginsDir.cd("srsplugins\\SldModel"))
|
||||
if (pluginsDir.cd("srsplugins\\DemModel"))
|
||||
{
|
||||
QString strConfigPath = pluginsDir.absoluteFilePath("sld_config.ini");
|
||||
QString strConfigPath = pluginsDir.absoluteFilePath("dem_config.ini");
|
||||
QFile f(strConfigPath);
|
||||
if (f.exists())
|
||||
{
|
||||
@@ -84,6 +147,10 @@ QWidget* LandslideAssess::CenterWidget()
|
||||
|
||||
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信号对应的槽函数,执行完成后再往下走
|
||||
@@ -95,21 +162,19 @@ QWidget* LandslideAssess::CenterWidget()
|
||||
myWidget->close();
|
||||
myWidget = nullptr;
|
||||
});
|
||||
connect(ui.pbtInDataset, &QPushButton::clicked, this, &LandslideAssess::choosePredictPath);
|
||||
connect(ui.pbtInLabel, &QPushButton::clicked, this, &LandslideAssess::chooseLabelPath);
|
||||
connect(ui.pbtIndex, &QPushButton::clicked, this, &LandslideAssess::chooseAssessFile);
|
||||
connect(ui.pbtInModel, &QPushButton::clicked, this, &LandslideAssess::chooseModelFile);
|
||||
connect(ui.pbtResult, &QPushButton::clicked, this, &LandslideAssess::chooseResultPath);
|
||||
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::clicked, this, &LandslideAssess::readAndStart);
|
||||
connect(ui.pushButton_cancel, &QPushButton::clicked, this, &LandslideAssess::pbCancel);
|
||||
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);
|
||||
|
||||
ui.pbtInModel->setFocus();
|
||||
|
||||
QFile qssFile(":/LandslideAssess/LandslideAssess.qss");
|
||||
QFile qssFile(":/DEM_ASSESS/DEM_ASSESS.qss");
|
||||
qssFile.open(QFile::ReadOnly); //以只读方式打开
|
||||
if (qssFile.isOpen())
|
||||
{
|
||||
@@ -118,12 +183,12 @@ QWidget* LandslideAssess::CenterWidget()
|
||||
qssFile.close();
|
||||
}
|
||||
else
|
||||
qDebug() << "no qssFile";
|
||||
qDebug() << "无法打开文件";
|
||||
|
||||
QDir pluginsDir = QDir(qApp->applicationDirPath());
|
||||
if (pluginsDir.cd("srsplugins\\SldModel"))
|
||||
if (pluginsDir.cd("srsplugins\\DemModel"))
|
||||
{
|
||||
QString strConfigPath = pluginsDir.absoluteFilePath("sld_config.ini");
|
||||
QString strConfigPath = pluginsDir.absoluteFilePath("dem_config.ini");
|
||||
QFile f(strConfigPath);
|
||||
if (f.exists())
|
||||
{
|
||||
@@ -138,22 +203,22 @@ QWidget* LandslideAssess::CenterWidget()
|
||||
return myWidget;
|
||||
}
|
||||
|
||||
void LandslideAssess::startWorkThread()
|
||||
void ModelAssessment::startWorkThread()
|
||||
{
|
||||
if (mWorker != nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
mWorkThread = new QThread();
|
||||
mWorker = new WorkObject();
|
||||
mWorker = new WorkThreadObject();
|
||||
mWorker->moveToThread(mWorkThread);
|
||||
connect(mWorkThread, &QThread::finished, mWorkThread, &QObject::deleteLater);
|
||||
connect(mWorkThread, &QThread::finished, mWorker, &QObject::deleteLater);
|
||||
connect(mWorker, &WorkObject::progress, myWidget, [=](int value) {
|
||||
connect(mWorker, &WorkThreadObject::process, myWidget, [=](int value) {
|
||||
ui.progressBar->setValue(value);
|
||||
if (value == 100)
|
||||
{
|
||||
QString txtDir = ui.lineResult->text() + "/assessment.txt";
|
||||
QString txtDir = ui.lineOutResult->text() + "/assessment.txt";
|
||||
QFile file(txtDir);
|
||||
QString outLines = "";
|
||||
if (file.open(QIODevice::ReadOnly))
|
||||
@@ -200,23 +265,56 @@ void LandslideAssess::startWorkThread()
|
||||
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, &LandslideAssess::startPreAssessment, mWorker, &WorkObject::runAssessWork);
|
||||
connect(this, &ModelAssessment::startPreAssessment, mWorker, &WorkThreadObject::runAssessWork);
|
||||
|
||||
mWorkThread->start();
|
||||
}
|
||||
|
||||
void LandslideAssess::ReadConfigHistoryPaths(QString strPath)
|
||||
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("SldTrain");
|
||||
configIni.beginGroup("DemTrain");
|
||||
|
||||
QString strDemTrainResult = configIni.value("TrainResult").toString();
|
||||
QDir srcDir = QDir(strDemTrainResult);
|
||||
@@ -226,7 +324,7 @@ void LandslideAssess::ReadConfigHistoryPaths(QString strPath)
|
||||
//更新输入Images
|
||||
srcDir = QDir(strDemTrainResult);
|
||||
if (srcDir.cd("Images"))
|
||||
ui.lineInDataset->setText(srcDir.absolutePath());
|
||||
ui.lineInPredict->setText(srcDir.absolutePath());
|
||||
//更新输入Labels
|
||||
srcDir = QDir(strDemTrainResult);
|
||||
if (srcDir.cd("Labels"))
|
||||
@@ -235,35 +333,35 @@ void LandslideAssess::ReadConfigHistoryPaths(QString strPath)
|
||||
configIni.endGroup();//关闭组
|
||||
|
||||
//打开标题为:[DemAssess] 的组,读取AssessResult字段
|
||||
configIni.beginGroup("SldAssess");
|
||||
configIni.beginGroup("DemAssess");
|
||||
//更新评价结果输出
|
||||
ui.lineResult->setText(configIni.value("AssessResult").toString());
|
||||
ui.lineOutResult->setText(configIni.value("AssessResult").toString());
|
||||
|
||||
configIni.endGroup();//关闭组
|
||||
}
|
||||
|
||||
void LandslideAssess::WriteConfigPaths(QString strPath)
|
||||
void ModelAssessment::WriteConfigPaths(QString strPath)
|
||||
{
|
||||
QSettings configIni(strPath, QSettings::IniFormat);
|
||||
configIni.setIniCodec("utf-8");
|
||||
//打开标题为:[DemAssess] 的组
|
||||
configIni.beginGroup("SldAssess");
|
||||
configIni.beginGroup("DemAssess");
|
||||
|
||||
//更新输入模型路径
|
||||
QString temp = ui.lineResult->text();
|
||||
QString temp = ui.lineOutResult->text();
|
||||
if (temp != "")
|
||||
configIni.setValue("AssessResult", temp);
|
||||
|
||||
configIni.endGroup();//关闭组
|
||||
}
|
||||
|
||||
void LandslideAssess::readAndStart()
|
||||
void ModelAssessment::readAndStart()
|
||||
{
|
||||
QString dirModel = ui.lineInModel->text();
|
||||
QString dirModel = ui.lineModel->text();
|
||||
QString dirIndex = ui.lineIndex->text();
|
||||
QString dirLabel = ui.lineInLabel->text();
|
||||
QString dirPredict = ui.lineInDataset->text();
|
||||
QString dirResult = ui.lineResult->text();
|
||||
QString dirPredict = ui.lineInPredict->text();
|
||||
QString dirResult = ui.lineOutResult->text();
|
||||
|
||||
ui.progressBar->setValue(0);
|
||||
|
||||
@@ -282,97 +380,7 @@ void LandslideAssess::readAndStart()
|
||||
emit startPreAssessment(dirModel, dirPredict, dirLabel, dirIndex, dirResult);
|
||||
}
|
||||
|
||||
void LandslideAssess::pbCancel()
|
||||
void ModelAssessment::pbCancel()
|
||||
{
|
||||
qDebug() << "--pbtCancel";
|
||||
delete myWidget;//调起&QDialog::destroyed
|
||||
}
|
||||
|
||||
void LandslideAssess::choosePredictPath()
|
||||
{
|
||||
QString dirInDataset = QFileDialog::getExistingDirectory(ui.pbtInDataset, QString::fromLocal8Bit("选择输入评价文件路径"), "");
|
||||
if (dirInDataset != "")
|
||||
ui.lineInDataset->setText(dirInDataset);
|
||||
}
|
||||
|
||||
void LandslideAssess::chooseLabelPath()
|
||||
{
|
||||
QString dirDom = QFileDialog::getExistingDirectory(ui.pbtInLabel, QString::fromLocal8Bit("选择输入标签文件路径"), "");
|
||||
if (dirDom != "")
|
||||
ui.lineInLabel->setText(dirDom);
|
||||
}
|
||||
|
||||
void LandslideAssess::chooseAssessFile()
|
||||
{
|
||||
QString dirDom = QFileDialog::getOpenFileName(ui.pbtIndex, QString::fromLocal8Bit("选择输入评估文件索引"), "", "*.txt");
|
||||
if (dirDom != "")
|
||||
ui.lineIndex->setText(dirDom);
|
||||
}
|
||||
|
||||
void LandslideAssess::chooseModelFile()
|
||||
{
|
||||
QString fileModel = QFileDialog::getOpenFileName(ui.pbtInModel, QString::fromLocal8Bit("选择输入模型文件"), "", "*.pth");
|
||||
if (fileModel != "")
|
||||
ui.lineInModel->setText(fileModel);
|
||||
}
|
||||
|
||||
void LandslideAssess::chooseResultPath()
|
||||
{
|
||||
QString dirResult = QFileDialog::getExistingDirectory(ui.pbtResult, QString::fromLocal8Bit("选择评估结果输出路径"), "");
|
||||
if (dirResult != "")
|
||||
ui.lineResult->setText(dirResult);
|
||||
}
|
||||
|
||||
void WorkObject::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());
|
||||
qDebug() << "----" << pluginsDir.currentPath();
|
||||
if (!pluginsDir.cd("models\\envs"))
|
||||
{
|
||||
qDebug() << "no folder models\\envs";
|
||||
return;
|
||||
}
|
||||
QString exeDirName = pluginsDir.absoluteFilePath("miou_landslide.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 progress(2);
|
||||
}
|
||||
|
||||
void WorkObject::writeAssessTxt()
|
||||
{
|
||||
mProcess = (QProcess*)sender();
|
||||
QString output = QString::fromLocal8Bit(mProcess->readAllStandardOutput());
|
||||
output.chop(2);
|
||||
if (output.toFloat() != 0)
|
||||
{
|
||||
qDebug() << "process:" << output.toFloat();
|
||||
emit progress(output.toFloat());
|
||||
}
|
||||
else
|
||||
qDebug() << "unsolved exe out:" << output;
|
||||
}
|
||||
|
||||
void WorkObject::on_cancel()
|
||||
{
|
||||
if (mProcess == nullptr)
|
||||
qDebug() << "--mProces null";
|
||||
else
|
||||
{
|
||||
QString KillStr = "taskkill /f /im miou_landslide.exe";
|
||||
mProcess->startDetached(KillStr);
|
||||
qDebug() << "--kill Proces";
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include <QtWidgets>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include "ui_LandslideAssess.h"
|
||||
|
||||
#include <QProcess>
|
||||
#include <QThread>
|
||||
#include <QFile>
|
||||
#include <QIcon>
|
||||
#include <QDebug>
|
||||
#include <QMessageBox>
|
||||
#include <QFileDialog>
|
||||
#include <QStringList>
|
||||
|
||||
#include "ui_DEM_ASSESS.h"
|
||||
#include "SrsMainPluginInterFace.h"
|
||||
|
||||
|
||||
class WorkObject :public QObject
|
||||
class WorkThreadObject :public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -23,25 +17,26 @@ public:
|
||||
void on_cancel();
|
||||
|
||||
signals:
|
||||
void progress(int value);
|
||||
void process(int value);
|
||||
|
||||
public slots:
|
||||
void runAssessWork(QString model, QString PRE, QString label, QString index, QString result);
|
||||
void writeAssessTxt();
|
||||
|
||||
private:
|
||||
QProcess* mProcess = nullptr;
|
||||
QProcess* mProces = nullptr;
|
||||
QString assess_txt_path;
|
||||
};
|
||||
|
||||
class LandslideAssess : public SrsMainInterface
|
||||
class ModelAssessment : public SrsMainInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(SrsMainInterface)
|
||||
Q_PLUGIN_METADATA(IID MainInterface_iid)
|
||||
|
||||
public:
|
||||
LandslideAssess();
|
||||
ModelAssessment();
|
||||
~ModelAssessment();
|
||||
|
||||
virtual QString PannelName() override;
|
||||
virtual QString CategoryName() override;
|
||||
@@ -52,18 +47,18 @@ public:
|
||||
virtual QString IconPath() override;
|
||||
virtual QWidget* CenterWidget() override;
|
||||
|
||||
void startWorkThread();
|
||||
|
||||
//读json文件,获取历史存储的路径
|
||||
void ReadConfigHistoryPaths(QString strPath);
|
||||
//保存本次打开的路径到json文件
|
||||
void WriteConfigPaths(QString strPath);
|
||||
|
||||
void startWorkThread();
|
||||
|
||||
signals:
|
||||
void startPreAssessment(QString model, QString prefile, QString label, QString index, QString result);
|
||||
void startPreAssessment(QString model, QString PRE, QString label, QString index, QString result);
|
||||
|
||||
public slots:
|
||||
//pushbutton_OK
|
||||
void readAndStart();
|
||||
void pbCancel();
|
||||
|
||||
@@ -74,11 +69,11 @@ public slots:
|
||||
void chooseResultPath();
|
||||
|
||||
private:
|
||||
Ui::LandslideAssessClass ui;
|
||||
Ui::DEM_ASSESSClass ui;
|
||||
|
||||
QDialog* myWidget = nullptr;
|
||||
|
||||
WorkObject* mWorker = nullptr;
|
||||
WorkThreadObject* mWorker = nullptr;
|
||||
QThread* mWorkThread = nullptr;
|
||||
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
<RCC>
|
||||
<qresource prefix="/DEM_ASSESS">
|
||||
<file>DEM_ASSESS.qss</file>
|
||||
<file>resources/assessment.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -22,7 +22,7 @@ QLabel{
|
||||
}
|
||||
|
||||
/*----QPushButtonÑùʽ±í*/
|
||||
#pushButton_ok, #pushButton_cancel, #pbtInDataset, #pbtInLabel, #pbtInModel, #pbtIndex,#pbtResult{
|
||||
#pushButton_ok, #pushButton_cancel, #pbtInPredict, #pbtInLabel, #pbtModel, #pbtIndex,#pbtOutResult{
|
||||
font-family:'Microsoft YaHei';
|
||||
font-size:12px;
|
||||
background-color: #ffffff;
|
||||
@@ -34,35 +34,35 @@ QLabel{
|
||||
#pushButton_ok, #pushButton_cancel{
|
||||
min-width:36px;
|
||||
}
|
||||
#pushButton_ok:hover, #pushButton_cancel:hover, #pbtInDataset:hover, #pbtInLabel:hover, #pbtInModel:hover, #pbtIndex:hover,#pbtResult:hover{
|
||||
#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, #pbtInDataset:pressed, #pbtInLabel:pressed, #pbtInModel:pressed, #pbtIndex:pressed,#pbtResult:pressed{
|
||||
#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, #pbtInDataset:checked, #pbtInLabel:checked, #pbtInModel:checked, #pbtIndex:checked,#pbtResult:checked{
|
||||
#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, #pbtInDataset:focus, #pbtInLabel:focus, #pbtInModel:focus, #pbtIndex:focus,#pbtResult:focus{
|
||||
#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Ñùʽ*/
|
||||
#lineInDataset, #lineInLabel, #lineInModel, #lineIndex, #lineResult{
|
||||
#lineInPredict, #lineInLabel, #lineModel, #lineIndex, #lineOutResult{
|
||||
border:0px;
|
||||
border-bottom: 1px solid #B3B3B3;
|
||||
font-family:'Microsoft YaHei';
|
||||
font-size:12px;
|
||||
background-color:transparent;
|
||||
}
|
||||
#lineInDataset:hover, #lineInLabel:hover, #lineInModel:hover, #lineIndex:hover, #lineResult:hover{
|
||||
#lineInPredict:hover, #lineInLabel:hover, #lineModel:hover, #lineIndex:hover, #lineOutResult:hover{
|
||||
border-bottom: 2px solid #66A3FF;
|
||||
}
|
||||
#lineInDataset:focus, #lineInLabel:focus, #lineInModel:focus, #lineIndex:focus, #lineResult:focus{
|
||||
#lineInPredict:focus, #lineInLabel:focus, #lineModel:focus, #lineIndex:focus, #lineOutResult:focus{
|
||||
border-bottom: 2px solid #7666FF;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>LandslideAssessClass</class>
|
||||
<widget class="QDialog" name="LandslideAssessClass">
|
||||
<class>DEM_ASSESSClass</class>
|
||||
<widget class="QDialog" name="DEM_ASSESSClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@@ -10,100 +10,131 @@
|
||||
<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>LandslideAssess</string>
|
||||
<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="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<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="0" column="1">
|
||||
<widget class="QLineEdit" name="lineInModel"/>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pbtInModel">
|
||||
<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="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<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="1" column="1">
|
||||
<widget class="QLineEdit" name="lineIndex"/>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pbtIndex">
|
||||
<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="2" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<widget class="QLabel" name="label_mask_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<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="lineInDataset"/>
|
||||
<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="pbtInDataset">
|
||||
<widget class="QPushButton" name="pbtInPredict">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>75</width>
|
||||
@@ -121,21 +152,44 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="lineInLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<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>
|
||||
<string>输入验证文件索引</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="lineInLabel"/>
|
||||
<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">
|
||||
@@ -157,7 +211,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
@@ -170,10 +224,10 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="lineResult"/>
|
||||
<widget class="QLineEdit" name="lineOutResult"/>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QPushButton" name="pbtResult">
|
||||
<widget class="QPushButton" name="pbtOutResult">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>75</width>
|
||||
@@ -196,13 +250,13 @@
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>133</width>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
@@ -210,13 +264,19 @@
|
||||
</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>
|
||||
<string>确定</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@@ -225,7 +285,7 @@
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<width>13</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
@@ -250,22 +310,8 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<tabstops>
|
||||
<tabstop>lineInModel</tabstop>
|
||||
<tabstop>pbtInModel</tabstop>
|
||||
<tabstop>lineIndex</tabstop>
|
||||
<tabstop>pbtIndex</tabstop>
|
||||
<tabstop>lineInDataset</tabstop>
|
||||
<tabstop>pbtInDataset</tabstop>
|
||||
<tabstop>lineInLabel</tabstop>
|
||||
<tabstop>pbtInLabel</tabstop>
|
||||
<tabstop>lineResult</tabstop>
|
||||
<tabstop>pbtResult</tabstop>
|
||||
<tabstop>pushButton_ok</tabstop>
|
||||
<tabstop>pushButton_cancel</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="LandslideAssess.qrc"/>
|
||||
<include location="DEM_ASSESS.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -7,14 +7,14 @@
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{AEAE6E5B-D14B-46CB-BF18-3375936B7CD2}</ProjectGuid>
|
||||
<ProjectGuid>{E901DBCF-219B-4AA9-A34F-BBDDFC06FE11}</ProjectGuid>
|
||||
<Keyword>QtVS_v304</Keyword>
|
||||
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">10.0</WindowsTargetPlatformVersion>
|
||||
<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>DynamicLibrary</ConfigurationType>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
@@ -37,9 +37,7 @@
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<TargetName>landslide2_assess</TargetName>
|
||||
<IncludePath>D:\qgis\osgeo4w\include;D:\qgis\osgeo4w\apps\Qt5\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>D:\qgis\osgeo4w\lib;D:\qgis\osgeo4w\apps\Qt5\lib;$(LibraryPath)</LibraryPath>
|
||||
<TargetName>dem2-$(ProjectName)</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="Configuration">
|
||||
<ClCompile>
|
||||
@@ -48,27 +46,30 @@
|
||||
<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="LandslideAssess.qrc" />
|
||||
<QtUic Include="LandslideAssess.ui" />
|
||||
<QtMoc Include="LandslideAssess.h" />
|
||||
<ClCompile Include="LandslideAssess.cpp" />
|
||||
<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>
|
||||
<ClInclude Include="x64\Release\uic\ui_LandslideAssess.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="LandslideAssess.qss" />
|
||||
<None Include="DEM_ASSESS.qss" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
|
||||
+11
-11
@@ -3,7 +3,7 @@
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>qml;cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
<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>
|
||||
@@ -23,16 +23,16 @@
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtRcc Include="LandslideAssess.qrc">
|
||||
<QtRcc Include="DEM_ASSESS.qrc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</QtRcc>
|
||||
<QtUic Include="LandslideAssess.ui">
|
||||
<QtUic Include="DEM_ASSESS.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
<QtMoc Include="LandslideAssess.h">
|
||||
<QtMoc Include="DEM_ASSESS.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<ClCompile Include="LandslideAssess.cpp">
|
||||
<ClCompile Include="DEM_ASSESS.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
@@ -41,18 +41,18 @@
|
||||
<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>
|
||||
<ClInclude Include="x64\Release\uic\ui_LandslideAssess.h">
|
||||
<Filter>Form Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="LandslideAssess.qss">
|
||||
<None Include="DEM_ASSESS.qss">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
@@ -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();
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
@@ -1,6 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/LandslideAssess">
|
||||
<file>resources/assessment.svg</file>
|
||||
<file>LandslideAssess.qss</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -1,10 +0,0 @@
|
||||
#include "LandslideAssess.h"
|
||||
#include <QtWidgets/QApplication>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
LandslideAssess w;
|
||||
w.CenterWidget()->show();
|
||||
return a.exec();
|
||||
}
|
||||
Reference in New Issue
Block a user