diff --git a/LandslideAssess.sln b/LandslideAssess.sln new file mode 100644 index 0000000..5a29e07 --- /dev/null +++ b/LandslideAssess.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.32630.194 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LandslideAssess", "LandslideAssess\LandslideAssess.vcxproj", "{AEAE6E5B-D14B-46CB-BF18-3375936B7CD2}" +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 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B31E7462-C1A4-4BA3-97F3-704180A5CDB6} + EndGlobalSection +EndGlobal diff --git a/LandslideAssess/LandslideAssess.cpp b/LandslideAssess/LandslideAssess.cpp new file mode 100644 index 0000000..264c1c3 --- /dev/null +++ b/LandslideAssess/LandslideAssess.cpp @@ -0,0 +1,378 @@ +#include "LandslideAssess.h" + +#include + +LandslideAssess::LandslideAssess() +{ + //ui.setupUi(this); +} + +QString LandslideAssess::PannelName() +{ + return QString::fromLocal8Bit("ģ"); +} + +QString LandslideAssess::CategoryName() +{ + return QString::fromLocal8Bit("ģ"); +} + +QString LandslideAssess::EnglishName() +{ + return QString::fromLocal8Bit("LandslideAssess"); +} + +QString LandslideAssess::ChineseName() +{ + return QString::fromLocal8Bit(""); +} + +QString LandslideAssess::Information() +{ + return QString::fromLocal8Bit(""); +} + +QString LandslideAssess::IconPath() +{ + return QString(":/LandslideAssess/resources/assessment.svg"); +} + +QWidget* LandslideAssess::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(":/LandslideAssess/resources/assessment.svg")); + myWidget->setAttribute(Qt::WA_QuitOnClose, false); + + myWidget->setAttribute(Qt::WA_DeleteOnClose); + connect(myWidget, &QDialog::destroyed, this, [=] { + qDebug() << "----Landslide assess window close----"; + + QDir pluginsDir = QDir(qApp->applicationDirPath()); + if (pluginsDir.cd("srsplugins\\SldModel")) + { + QString strConfigPath = pluginsDir.absoluteFilePath("sld_config.ini"); + QFile f(strConfigPath); + if (f.exists()) + { + WriteConfigPaths(strConfigPath); + f.close(); + } + } + + if (mWorkThread != nullptr) + { + mWorkThread->requestInterruption();//߳ж + mWorkThread->quit(); + mWorkThread->wait();//waitȵfinishedźŶӦIJۺִɺ + 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.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.pushButton_ok, &QPushButton::clicked, this, &LandslideAssess::readAndStart); + connect(ui.pushButton_cancel, &QPushButton::clicked, this, &LandslideAssess::pbCancel); + + ui.progressBar->setTextVisible(true); + ui.progressBar->setRange(0, 100); + + ui.pbtInModel->setFocus(); + + QFile qssFile(":/LandslideAssess/LandslideAssess.qss"); + qssFile.open(QFile::ReadOnly); //ֻʽ + if (qssFile.isOpen()) + { + QString qss = QLatin1String(qssFile.readAll()); + myWidget->setStyleSheet(qss); + qssFile.close(); + } + else + qDebug() << "no qssFile"; + + QDir pluginsDir = QDir(qApp->applicationDirPath()); + if (pluginsDir.cd("srsplugins\\SldModel")) + { + QString strConfigPath = pluginsDir.absoluteFilePath("sld_config.ini"); + QFile f(strConfigPath); + if (f.exists()) + { + ReadConfigHistoryPaths(strConfigPath); + f.close(); + } + } + + if (showWin) + myWidget->show(); + + return myWidget; +} + +void LandslideAssess::startWorkThread() +{ + if (mWorker != nullptr) + { + return; + } + mWorkThread = new QThread(); + mWorker = new WorkObject(); + mWorker->moveToThread(mWorkThread); + connect(mWorkThread, &QThread::finished, mWorkThread, &QObject::deleteLater); + connect(mWorkThread, &QThread::finished, mWorker, &QObject::deleteLater); + connect(mWorker, &WorkObject::progress, myWidget, [=](int value) { + ui.progressBar->setValue(value); + if (value == 100) + { + QString txtDir = ui.lineResult->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("F1f1_score")); + outLines = outLines + line; + } + } + file.close(); + } + + QMessageBox mess(QMessageBox::Information, + QString::fromLocal8Bit(""), + QString::fromLocal8Bit("۽:\n") + txtDir + "\n" + + outLines); + mess.setWindowFlags(Qt::Drawer); + mess.setStandardButtons(QMessageBox::Yes); + mess.button(QMessageBox::StandardButton::Yes)->setText(QString::fromLocal8Bit("ȷ")); + int result = mess.exec(); + pbCancel(); + } + }); + connect(this, &LandslideAssess::startPreAssessment, mWorker, &WorkObject::runAssessWork); + + mWorkThread->start(); +} + +void LandslideAssess::ReadConfigHistoryPaths(QString strPath) +{ + QSettings configIni(strPath, QSettings::IniFormat); + + //򿪱Ϊ[DemTrain] 飬ȡDemTrainTrainResultֶ + configIni.beginGroup("SldTrain"); + + 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.lineInDataset->setText(srcDir.absolutePath()); + //Labels + srcDir = QDir(strDemTrainResult); + if (srcDir.cd("Labels")) + ui.lineInLabel->setText(srcDir.absolutePath()); + + configIni.endGroup();//ر + + //򿪱Ϊ[DemAssess] 飬ȡAssessResultֶ + configIni.beginGroup("SldAssess"); + //۽ + ui.lineResult->setText(configIni.value("AssessResult").toString()); + + configIni.endGroup();//ر +} + +void LandslideAssess::WriteConfigPaths(QString strPath) +{ + QSettings configIni(strPath, QSettings::IniFormat); + configIni.setIniCodec("utf-8"); + //򿪱Ϊ[DemAssess] + configIni.beginGroup("SldAssess"); + + //ģ· + QString temp = ui.lineResult->text(); + if (temp != "") + configIni.setValue("AssessResult", temp); + + configIni.endGroup();//ر +} + +void LandslideAssess::readAndStart() +{ + QString dirModel = ui.lineInModel->text(); + QString dirIndex = ui.lineIndex->text(); + QString dirLabel = ui.lineInLabel->text(); + QString dirPredict = ui.lineInDataset->text(); + QString dirResult = ui.lineResult->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 LandslideAssess::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"; + } +} diff --git a/LandslideAssess/LandslideAssess.h b/LandslideAssess/LandslideAssess.h new file mode 100644 index 0000000..86bcebf --- /dev/null +++ b/LandslideAssess/LandslideAssess.h @@ -0,0 +1,84 @@ +#pragma once + +#include +#include "ui_LandslideAssess.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "SrsMainPluginInterFace.h" + + +class WorkObject :public QObject +{ + Q_OBJECT + +public: + void on_cancel(); + +signals: + void progress(int value); + +public slots: + void runAssessWork(QString model, QString PRE, QString label, QString index, QString result); + void writeAssessTxt(); + +private: + QProcess* mProcess = nullptr; + QString assess_txt_path; +}; + +class LandslideAssess : public SrsMainInterface +{ + Q_OBJECT + Q_INTERFACES(SrsMainInterface) + Q_PLUGIN_METADATA(IID MainInterface_iid) + +public: + LandslideAssess(); + + 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; + + void startWorkThread(); + + //jsonļȡʷ洢· + void ReadConfigHistoryPaths(QString strPath); + //汾δ򿪵·jsonļ + void WriteConfigPaths(QString strPath); + + +signals: + void startPreAssessment(QString model, QString prefile, QString label, QString index, QString result); + +public slots: + void readAndStart(); + void pbCancel(); + + void choosePredictPath(); + void chooseLabelPath(); + void chooseAssessFile(); + void chooseModelFile(); + void chooseResultPath(); + +private: + Ui::LandslideAssessClass ui; + + QDialog* myWidget = nullptr; + + WorkObject* mWorker = nullptr; + QThread* mWorkThread = nullptr; + +}; diff --git a/LandslideAssess/LandslideAssess.qrc b/LandslideAssess/LandslideAssess.qrc new file mode 100644 index 0000000..b860c8c --- /dev/null +++ b/LandslideAssess/LandslideAssess.qrc @@ -0,0 +1,6 @@ + + + resources/assessment.svg + LandslideAssess.qss + + diff --git a/LandslideAssess/LandslideAssess.qss b/LandslideAssess/LandslideAssess.qss new file mode 100644 index 0000000..5e8e8b4 --- /dev/null +++ b/LandslideAssess/LandslideAssess.qss @@ -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, #pbtInDataset, #pbtInLabel, #pbtInModel, #pbtIndex,#pbtResult{ + 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, #pbtInDataset:hover, #pbtInLabel:hover, #pbtInModel:hover, #pbtIndex:hover,#pbtResult:hover{ + background-color: #ecf5ff; + color: #409eff; +} +#pushButton_ok:pressed, #pushButton_cancel:pressed, #pbtInDataset:pressed, #pbtInLabel:pressed, #pbtInModel:pressed, #pbtIndex:pressed,#pbtResult:pressed{ + border: 1px solid #3a8ee6; + color: #409eff; +} +#pushButton_ok:checked, #pushButton_cancel:checked, #pbtInDataset:checked, #pbtInLabel:checked, #pbtInModel:checked, #pbtIndex:checked,#pbtResult:checked{ + border: 1px solid #3a8ee6; + color: #409eff; +} +#pushButton_ok:focus, #pushButton_cancel:focus, #pbtInDataset:focus, #pbtInLabel:focus, #pbtInModel:focus, #pbtIndex:focus,#pbtResult:focus{ + border: 1px solid #3a8ee6; + color: #409eff; + outline: none; +} + +/*----QLineEditʽ*/ +#lineInDataset, #lineInLabel, #lineInModel, #lineIndex, #lineResult{ + 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{ + border-bottom: 2px solid #66A3FF; +} +#lineInDataset:focus, #lineInLabel:focus, #lineInModel:focus, #lineIndex:focus, #lineResult:focus{ + border-bottom: 2px solid #7666FF; +} diff --git a/LandslideAssess/LandslideAssess.ui b/LandslideAssess/LandslideAssess.ui new file mode 100644 index 0000000..56df302 --- /dev/null +++ b/LandslideAssess/LandslideAssess.ui @@ -0,0 +1,271 @@ + + + LandslideAssessClass + + + + 0 + 0 + 500 + 300 + + + + LandslideAssess + + + + + + + + + 0 + 0 + + + + 输入模型文件路径 + + + + + + + + + + + 75 + 0 + + + + + 75 + 16777215 + + + + 选择文件 + + + + + + + + 0 + 0 + + + + 输入验证文件索引 + + + + + + + + + + + 75 + 0 + + + + + 75 + 16777215 + + + + 选择文件 + + + + + + + + 0 + 0 + + + + 输入验证文件路径 + + + + + + + + + + + 75 + 0 + + + + + 75 + 16777215 + + + + 选择文件夹 + + + + + + + + 0 + 0 + + + + 输入标签文件路径 + + + + + + + + + + + 75 + 0 + + + + + 75 + 16777215 + + + + 选择文件夹 + + + + + + + + 0 + 0 + + + + 评估结果输出路径 + + + + + + + + + + + 75 + 0 + + + + + 75 + 16777215 + + + + 选择文件夹 + + + + + + + + + + + Qt::Horizontal + + + + 133 + 20 + + + + + + + + 确认 + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 20 + + + + + + + + 取消 + + + + + + + + + 0 + + + + + + + + lineInModel + pbtInModel + lineIndex + pbtIndex + lineInDataset + pbtInDataset + lineInLabel + pbtInLabel + lineResult + pbtResult + pushButton_ok + pushButton_cancel + + + + + + diff --git a/LandslideAssess/LandslideAssess.vcxproj b/LandslideAssess/LandslideAssess.vcxproj new file mode 100644 index 0000000..29ed479 --- /dev/null +++ b/LandslideAssess/LandslideAssess.vcxproj @@ -0,0 +1,79 @@ + + + + + Release + x64 + + + + {AEAE6E5B-D14B-46CB-BF18-3375936B7CD2} + QtVS_v304 + 10.0 + $(MSBuildProjectDirectory)\QtMsBuild + + + + DynamicLibrary + v142 + + + + + + + QtQgis + core;gui;widgets + release + + + + + + + + + + + + + landslide2_assess + D:\qgis\osgeo4w\include;D:\qgis\osgeo4w\apps\Qt5\include;$(IncludePath) + D:\qgis\osgeo4w\lib;D:\qgis\osgeo4w\apps\Qt5\lib;$(LibraryPath) + + + + true + true + EditAndContinue + Disabled + MultiThreadedDLL + + + Console + true + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/LandslideAssess/LandslideAssess.vcxproj.filters b/LandslideAssess/LandslideAssess.vcxproj.filters new file mode 100644 index 0000000..9a2fd3f --- /dev/null +++ b/LandslideAssess/LandslideAssess.vcxproj.filters @@ -0,0 +1,59 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + qml;cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {99349809-55BA-4b9d-BF79-8FDBB0286EB3} + ui + + + {639EADAA-A684-42e4-A9AD-28FC9BCB8F7C} + ts + + + + + Resource Files + + + Form Files + + + Header Files + + + Source Files + + + + + Source Files + + + + + Header Files + + + + + Form Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/LandslideAssess/SrsMainPluginInterFace.h b/LandslideAssess/SrsMainPluginInterFace.h new file mode 100644 index 0000000..9130479 --- /dev/null +++ b/LandslideAssess/SrsMainPluginInterFace.h @@ -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 +#include +#include +#include + +struct SPluginMetaData +{ + QVector qvsReturnFilePaths; + QVector qvsSendFilePaths; + bool isAdd2Map; + +}; +class SrsMainInterface : public QObject +{ + Q_OBJECT +public: + virtual ~SrsMainInterface() {} + + /// + /// pannel + /// + virtual QString PannelName() = 0; + + /// + /// Category + /// + /// + virtual QString CategoryName() = 0; + + /// + /// زӢ + /// + /// + virtual QString EnglishName() = 0; + /// + /// ز + /// + /// + 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) diff --git a/LandslideAssess/main.cpp b/LandslideAssess/main.cpp new file mode 100644 index 0000000..b91c6e8 --- /dev/null +++ b/LandslideAssess/main.cpp @@ -0,0 +1,10 @@ +#include "LandslideAssess.h" +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + LandslideAssess w; + w.CenterWidget()->show(); + return a.exec(); +} diff --git a/LandslideAssess/resources/assessment.svg b/LandslideAssess/resources/assessment.svg new file mode 100644 index 0000000..a445d43 --- /dev/null +++ b/LandslideAssess/resources/assessment.svg @@ -0,0 +1,2 @@ + \ No newline at end of file