From 9f2eb2d577d25c071604ecbab52f32a667e4a649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=A2=9E=E8=BE=89?= <3045316072@qq.com> Date: Mon, 17 Feb 2025 15:03:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BA=86=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E7=8E=B0=E5=9C=A8=E5=8F=AF=E4=BB=A5=E6=89=93=E5=8D=B0=E5=88=B0?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GF3_Simulation_model.xml | 81 +++-- LAMPDataProcessEXE/main.cpp | 85 ++++- .../RasterMainWidget/RasterMainWidget.cpp | 12 + .../RasterMainWidget/RasterMainWidget.h | 6 +- .../RasterMainWidget/RasterMainWidget.ui | 23 ++ .../RasterMainWidgetGUI.vcxproj | 2 + .../RasterMainWidgetGUI.vcxproj.filters | 6 + .../RasterWidgetMessageShow.cpp | 44 +++ RasterMainWidgetGUI/RasterWidgetMessageShow.h | 35 ++ .../BaseToolbox/QComplex2AmpPhase.cpp | 1 + .../LookTableComputerClass.cpp | 0 .../LookTableComputerClass.h | 3 + .../QSimulationLookTableDialog.cpp | 105 ++++++ .../QSimulationLookTableDialog.h | 32 ++ .../QSimulationLookTableDialog.ui | 342 ++++++++++++++++++ .../QSimulationSARPolynomialOrbitModel.cpp | 4 +- .../SimulationSARTool/SimulationSARTool.cpp | 29 +- Toolbox/SimulationSARTool/SimulationSARTool.h | 13 + .../SimulationSARTool.vcxproj | 7 +- .../SimulationSARTool.vcxproj.filters | 15 + 20 files changed, 779 insertions(+), 66 deletions(-) create mode 100644 RasterMainWidgetGUI/RasterWidgetMessageShow.cpp create mode 100644 RasterMainWidgetGUI/RasterWidgetMessageShow.h create mode 100644 Toolbox/SimulationSARTool/PowerSimulationIncoherent/LookTableComputerClass.cpp create mode 100644 Toolbox/SimulationSARTool/PowerSimulationIncoherent/LookTableComputerClass.h create mode 100644 Toolbox/SimulationSARTool/PowerSimulationIncoherent/QSimulationLookTableDialog.cpp create mode 100644 Toolbox/SimulationSARTool/PowerSimulationIncoherent/QSimulationLookTableDialog.h create mode 100644 Toolbox/SimulationSARTool/PowerSimulationIncoherent/QSimulationLookTableDialog.ui diff --git a/GF3_Simulation_model.xml b/GF3_Simulation_model.xml index 4e33d32..b47f0bf 100644 --- a/GF3_Simulation_model.xml +++ b/GF3_Simulation_model.xml @@ -1,39 +1,42 @@ - - - - 0 - 0 - 0 - -3.87361e-22 - - - 0 - 0 - 0 - 1.02335e-21 - - - 0 - 0 - 0 - 9.98733e-22 - - - 0 - 0 - 0 - 7.26583e-25 - - - 0 - 0 - 0 - -8.25398e-25 - - - 0 - 0 - 0 - 1.1246e-24 - - + + + 1.68716940499955272674560546875000000e+09 + + + -1.86229e+06 + 3495.73 + 0.72946 + -0.000779779 + + + 4.92261e+06 + -3969.57 + -2.9471 + 0.000688281 + + + 4.80358e+06 + 5408.93 + -2.64701 + -0.000989861 + + + 3495.74 + 1.45927 + -0.002344 + -1.59885e-07 + + + -3969.58 + -5.89791 + 0.00207178 + 1.18532e-06 + + + 5408.93 + -5.29707 + -0.00297335 + 9.77621e-07 + + + diff --git a/LAMPDataProcessEXE/main.cpp b/LAMPDataProcessEXE/main.cpp index a6942bb..6d282d8 100644 --- a/LAMPDataProcessEXE/main.cpp +++ b/LAMPDataProcessEXE/main.cpp @@ -6,7 +6,7 @@ #include #include #include "LAMPMainWidgetRunProgram.h" - +#include "RasterWidgetMessageShow.h" #pragma execution_character_set("utf-8") @@ -22,28 +22,77 @@ void customMessageHandler(QtMsgType type, const QMessageLogContext& context, con QFile outFile("application.log"); outFile.open(QIODevice::WriteOnly | QIODevice::Append); QTextStream ts(&outFile); + + RasterMessageShow::RasterWidgetMessageShow* _showIntance = RasterMessageShow::RasterWidgetMessageShow::getInstance(); + + switch (type) { + case QtDebugMsg: + { + QString logMessage = QString("%1 Debug: %2 (%3:%4, %5)\n") + .arg(dateTime) // Assuming dateTime is a QDateTime object and needs to be converted to string + .arg(QString::fromLocal8Bit(localMsg.constData())) + .arg(file) + .arg(context.line) + .arg(function); + ts << logMessage; + _showIntance->ShowMessageInfo(logMessage); + break; + } + case QtInfoMsg: + { + QString logMessage = QString("%1 Info: %2 (%3:%4, %5)\n") + .arg(dateTime) + .arg(QString::fromLocal8Bit(localMsg.constData())) + .arg(file) + .arg(context.line) + .arg(function); + ts << logMessage; + _showIntance->ShowMessageInfo(logMessage); + break; + } + case QtWarningMsg: + { + QString logMessage = QString("%1 Warning: %2 (%3:%4, %5)\n") + .arg(dateTime) + .arg(QString::fromLocal8Bit(localMsg.constData())) + .arg(file) + .arg(context.line) + .arg(function); + ts << logMessage; + break; + } + case QtCriticalMsg: + { + QString logMessage = QString("%1 Critical: %2 (%3:%4, %5)\n") + .arg(dateTime) + .arg(QString::fromLocal8Bit(localMsg.constData())) + .arg(file) + .arg(context.line) + .arg(function); + ts << logMessage; + _showIntance->ShowMessageInfo(logMessage); + break; + } + case QtFatalMsg: + { + QString logMessage = QString("%1 Fatal: %2 (%3:%4, %5)\n") + .arg(dateTime) + .arg(QString::fromLocal8Bit(localMsg.constData())) + .arg(file) + .arg(context.line) + .arg(function); + ts << logMessage; + _showIntance->ShowMessageInfo(logMessage); + abort(); + } + + } - switch (type) { - case QtDebugMsg: - ts << dateTime << " Debug: " << localMsg.constData() << " (" << file << ":" << context.line << ", " << function << ")\n"; - break; - case QtInfoMsg: - ts << dateTime << " Info: " << localMsg.constData() << " (" << file << ":" << context.line << ", " << function << ")\n"; - break; - case QtWarningMsg: - ts << dateTime << " Warning: " << localMsg.constData() << " (" << file << ":" << context.line << ", " << function << ")\n"; - break; - case QtCriticalMsg: - ts << dateTime << " Critical: " << localMsg.constData() << " (" << file << ":" << context.line << ", " << function << ")\n"; - break; - case QtFatalMsg: - ts << dateTime << " Fatal: " << localMsg.constData() << " (" << file << ":" << context.line << ", " << function << ")\n"; - abort(); - } } int main(int argc, char *argv[]) { + qInstallMessageHandler(customMessageHandler); QApplication a(argc, argv); RasterMainWidgetRun(); return a.exec(); diff --git a/RasterMainWidgetGUI/RasterMainWidget/RasterMainWidget.cpp b/RasterMainWidgetGUI/RasterMainWidget/RasterMainWidget.cpp index ac50f5a..eb4f02a 100644 --- a/RasterMainWidgetGUI/RasterMainWidget/RasterMainWidget.cpp +++ b/RasterMainWidgetGUI/RasterMainWidget/RasterMainWidget.cpp @@ -13,6 +13,8 @@ #include "BaseTool.h" #include "FileOperator.h" +#include "RasterWidgetMessageShow.h" + #pragma execution_character_set("utf-8") @@ -55,6 +57,10 @@ RasterMainWidget::RasterMainWidget(QWidget *parent) //mUi->panAction->trigger(); //mUi->layerList->setCurrentItem(mLayerList.first()); + + + + } RasterMainWidget::~RasterMainWidget() { @@ -107,6 +113,12 @@ void RasterMainWidget::setupWindow() { QObject::connect(mUi->layerList, &QListWidget::currentItemChanged, this, &RasterMainWidget::layerChanged); QObject::connect(mUi->leftTopBtn, &QPushButton::clicked, this, &RasterMainWidget::leftTopClickedHandle); QObject::connect(mUi->rightBottomBtn, &QPushButton::clicked, this, &RasterMainWidget::rightBottomClickedHandle); + + + RasterMessageShow::RasterWidgetMessageShow* messageshow = RasterMessageShow::RasterWidgetMessageShow::getInstance(this); + messageshow->bandingTextBrowserMessage(this->mUi->textBrowserMessage); + + } void RasterMainWidget::setupStatusBar() { diff --git a/RasterMainWidgetGUI/RasterMainWidget/RasterMainWidget.h b/RasterMainWidgetGUI/RasterMainWidget/RasterMainWidget.h index cd178b3..9dd2516 100644 --- a/RasterMainWidgetGUI/RasterMainWidget/RasterMainWidget.h +++ b/RasterMainWidgetGUI/RasterMainWidget/RasterMainWidget.h @@ -15,6 +15,11 @@ #include "QApplicationSettingManager.h" #include "ToolBoxWidget.h" + + + + + namespace Ui { class RasterMainWidget; } @@ -75,7 +80,6 @@ namespace LAMPMainWidget { private slots: void on_drawArea_triggered(); - void on_addPlaneaction_triggered(); private: diff --git a/RasterMainWidgetGUI/RasterMainWidget/RasterMainWidget.ui b/RasterMainWidgetGUI/RasterMainWidget/RasterMainWidget.ui index 839020e..dcfe319 100644 --- a/RasterMainWidgetGUI/RasterMainWidget/RasterMainWidget.ui +++ b/RasterMainWidgetGUI/RasterMainWidget/RasterMainWidget.ui @@ -322,6 +322,29 @@ + + + 消息窗口 + + + 8 + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> + + + + + + 使用教程 diff --git a/RasterMainWidgetGUI/RasterMainWidgetGUI.vcxproj b/RasterMainWidgetGUI/RasterMainWidgetGUI.vcxproj index f19a881..b647dd0 100644 --- a/RasterMainWidgetGUI/RasterMainWidgetGUI.vcxproj +++ b/RasterMainWidgetGUI/RasterMainWidgetGUI.vcxproj @@ -127,6 +127,7 @@ + @@ -161,6 +162,7 @@ + diff --git a/RasterMainWidgetGUI/RasterMainWidgetGUI.vcxproj.filters b/RasterMainWidgetGUI/RasterMainWidgetGUI.vcxproj.filters index da23fa3..5add534 100644 --- a/RasterMainWidgetGUI/RasterMainWidgetGUI.vcxproj.filters +++ b/RasterMainWidgetGUI/RasterMainWidgetGUI.vcxproj.filters @@ -115,6 +115,9 @@ Source Files + + Source Files + @@ -224,6 +227,9 @@ Header Files + + Header Files + diff --git a/RasterMainWidgetGUI/RasterWidgetMessageShow.cpp b/RasterMainWidgetGUI/RasterWidgetMessageShow.cpp new file mode 100644 index 0000000..302b90c --- /dev/null +++ b/RasterMainWidgetGUI/RasterWidgetMessageShow.cpp @@ -0,0 +1,44 @@ +#include "RasterWidgetMessageShow.h" + +namespace RasterMessageShow { + + RasterWidgetMessageShow* RasterWidgetMessageShow::_instance = nullptr; + + RasterWidgetMessageShow::RasterWidgetMessageShow(QObject* parant):QObject(parant) + { + QObject::connect(this, SIGNAL(ShowMessage(QString)), this, SLOT(ShowMessageInfo(QString))); + } + + RasterWidgetMessageShow::~RasterWidgetMessageShow() + { + } + + void RasterWidgetMessageShow::bandingTextBrowserMessage(QTextBrowser* intextBrowserMessage) + { + this->textBrowserMessage = intextBrowserMessage; + } + + QTextBrowser* RasterWidgetMessageShow::getTextBrowserMessage() + { + return textBrowserMessage; + } + + void RasterWidgetMessageShow::ShowMessageInfo(QString Message) + { + if (nullptr != this->textBrowserMessage) { + this->textBrowserMessage->append(Message); + } + else {} + } + + RasterWidgetMessageShow* RasterWidgetMessageShow::getInstance(QObject* parant) + { + if (nullptr == RasterWidgetMessageShow::_instance) { + RasterWidgetMessageShow::_instance = new RasterWidgetMessageShow(parant); + } + return RasterWidgetMessageShow::_instance; + } + + + +}; \ No newline at end of file diff --git a/RasterMainWidgetGUI/RasterWidgetMessageShow.h b/RasterMainWidgetGUI/RasterWidgetMessageShow.h new file mode 100644 index 0000000..62b9aac --- /dev/null +++ b/RasterMainWidgetGUI/RasterWidgetMessageShow.h @@ -0,0 +1,35 @@ +#pragma once +#include "RasterMainWidgetGUIAPI.h" +#include +#include + + +namespace RasterMessageShow { + + class RASTERMAINWIDGETGUI_EXPORT RasterWidgetMessageShow:public QObject + { + Q_OBJECT + public: + RasterWidgetMessageShow(QObject* parant=nullptr); + ~RasterWidgetMessageShow(); + + private: + QTextBrowser* textBrowserMessage=nullptr; + public: + void bandingTextBrowserMessage(QTextBrowser* textBrowserMessage); + QTextBrowser* getTextBrowserMessage(); + + + signals: + void ShowMessage(QString Message); + + public slots: + void ShowMessageInfo(QString Message); + + private: + static RasterWidgetMessageShow* _instance; // + public: + static RasterWidgetMessageShow* getInstance(QObject* parant = nullptr); + }; + +} \ No newline at end of file diff --git a/Toolbox/BaseToolbox/BaseToolbox/QComplex2AmpPhase.cpp b/Toolbox/BaseToolbox/BaseToolbox/QComplex2AmpPhase.cpp index 791c206..19bb96a 100644 --- a/Toolbox/BaseToolbox/BaseToolbox/QComplex2AmpPhase.cpp +++ b/Toolbox/BaseToolbox/BaseToolbox/QComplex2AmpPhase.cpp @@ -13,6 +13,7 @@ QComplex2AmpPhase::QComplex2AmpPhase(QWidget *parent) QObject::connect(ui.radioButtonAmp,SIGNAL(toggled(bool)),this,SLOT(radioButtonAmptoggled(bool))); QObject::connect(ui.radioButtonPhase, SIGNAL(toggled(bool)), this, SLOT(radioButtonPhasetoggled(bool))); QObject::connect(ui.radioButtonSigma0, SIGNAL(toggled(bool)), this, SLOT(radioButtonSigma0toggled(bool))); + QObject::connect(ui.buttonBox, SIGNAL(accept()), this, SLOT(accept())); QObject::connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(reject())); //toggled(bool ) } diff --git a/Toolbox/SimulationSARTool/PowerSimulationIncoherent/LookTableComputerClass.cpp b/Toolbox/SimulationSARTool/PowerSimulationIncoherent/LookTableComputerClass.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Toolbox/SimulationSARTool/PowerSimulationIncoherent/LookTableComputerClass.h b/Toolbox/SimulationSARTool/PowerSimulationIncoherent/LookTableComputerClass.h new file mode 100644 index 0000000..45dcbb0 --- /dev/null +++ b/Toolbox/SimulationSARTool/PowerSimulationIncoherent/LookTableComputerClass.h @@ -0,0 +1,3 @@ +#pragma once + + diff --git a/Toolbox/SimulationSARTool/PowerSimulationIncoherent/QSimulationLookTableDialog.cpp b/Toolbox/SimulationSARTool/PowerSimulationIncoherent/QSimulationLookTableDialog.cpp new file mode 100644 index 0000000..6b6cf78 --- /dev/null +++ b/Toolbox/SimulationSARTool/PowerSimulationIncoherent/QSimulationLookTableDialog.cpp @@ -0,0 +1,105 @@ +#include "QSimulationLookTableDialog.h" +#include "ui_QSimulationLookTableDialog.h" +#include +#include + +QSimulationLookTableDialog::QSimulationLookTableDialog(QWidget *parent) + : QDialog(parent),ui(new Ui::QSimulationLookTableDialogClass) +{ + ui->setupUi(this); +} + +QSimulationLookTableDialog::~QSimulationLookTableDialog() +{ + +} + +void QSimulationLookTableDialog::onrejected() +{ + this->close(); +} + +void QSimulationLookTableDialog::onpushButtonOrbitModelClicked(bool) +{ + // ļѡԻѡһ .tif ļ + QString fileName = QFileDialog::getOpenFileName(this, + u8"GPS Orbit Model xml", // Ի + "", // ʼĿ¼Ϊ· + u8"xml Files (*.xml)"); // ļ͹ + + if (!fileName.isEmpty()) { + this->ui->OrbitModelPathLineEdit->setText(fileName); + } + else { + QMessageBox::information(this, u8"ûѡļ", u8"ûѡκļ"); + } +} + +void QSimulationLookTableDialog::onpushButtonSataSettingClicked(bool) +{ + // ļѡԻѡһ .tif ļ + QString fileName = QFileDialog::getOpenFileName(this, + u8"Satellite Params setting xml", // Ի + "", // ʼĿ¼Ϊ· + u8"xml Files (*.xml)"); // ļ͹ + + if (!fileName.isEmpty()) { + this->ui->SateSettingLineEdit->setText(fileName); + } + else { + QMessageBox::information(this, u8"ûѡļ", u8"ûѡκļ"); + } +} + +void QSimulationLookTableDialog::onpushButtonDEMClicked(bool) +{ + // ļѡԻѡһ .tif ļ + QString fileName = QFileDialog::getOpenFileName(this, + u8"DEM Raster Select", // Ի + "", // ʼĿ¼Ϊ· + u8"tiff Files (*.tiff);;tif Files (*.tif);;dat Files (*.dat);;All Files (*.*)"); // ļ͹ + + if (!fileName.isEmpty()) { + this->ui->DEMLineEdit->setText(fileName); + } + else { + QMessageBox::information(this, u8"ûѡļ", u8"ûѡκļ"); + } +} + +void QSimulationLookTableDialog::onpushButtonOutDirClicked(bool) +{ + // ļѡԻѡһ .tif ļ + QString fileName = QFileDialog::getExistingDirectory(this, + u8"DEM Raster Select", // Ի + "" // ʼĿ¼Ϊ· + ); + if (!fileName.isEmpty()) { + this->ui->outDirLineEdit->setText(fileName); + } + else { + QMessageBox::information(this, u8"ûѡļ", u8"ûѡκļ"); + } +} + +void QSimulationLookTableDialog::onaccepted() +{ + QString orbitpath = this->ui->OrbitModelPathLineEdit->text(); + QString SatePath = this->ui->SateSettingLineEdit->text(); + QString DEMPath = this->ui->DEMLineEdit->text(); + QString outDirPath = this->ui->outDirLineEdit->text(); + + double gridX = this->ui->doubleSpinBoxGridX->value(); + double gridY = this->ui->doubleSpinBoxGridY->value(); + + bool gpuflag = this->ui->radioButtonGPU->isChecked(); + bool looktableflag = this->ui->LookTableCheck->checkState(); + bool checkBoxIncAngle = this->ui->checkBoxIncAngle->checkState(); + + + + + + + +} diff --git a/Toolbox/SimulationSARTool/PowerSimulationIncoherent/QSimulationLookTableDialog.h b/Toolbox/SimulationSARTool/PowerSimulationIncoherent/QSimulationLookTableDialog.h new file mode 100644 index 0000000..8049a28 --- /dev/null +++ b/Toolbox/SimulationSARTool/PowerSimulationIncoherent/QSimulationLookTableDialog.h @@ -0,0 +1,32 @@ +#pragma once + +#include + + +namespace Ui { + class QSimulationLookTableDialogClass; +} + +class QSimulationLookTableDialog : public QDialog +{ + Q_OBJECT + +public: + QSimulationLookTableDialog(QWidget *parent = nullptr); + ~QSimulationLookTableDialog(); + +private: + Ui::QSimulationLookTableDialogClass* ui; + + +public slots: + void onaccepted(); + void onrejected(); + + void onpushButtonOrbitModelClicked(bool); + void onpushButtonSataSettingClicked(bool); + void onpushButtonDEMClicked(bool); + void onpushButtonOutDirClicked(bool); + + +}; diff --git a/Toolbox/SimulationSARTool/PowerSimulationIncoherent/QSimulationLookTableDialog.ui b/Toolbox/SimulationSARTool/PowerSimulationIncoherent/QSimulationLookTableDialog.ui new file mode 100644 index 0000000..baf2a85 --- /dev/null +++ b/Toolbox/SimulationSARTool/PowerSimulationIncoherent/QSimulationLookTableDialog.ui @@ -0,0 +1,342 @@ + + + QSimulationLookTableDialogClass + + + + 0 + 0 + 763 + 400 + + + + QSimulationLookTableDialog + + + + + + 产品参数设置 + + + + + + + 0 + 30 + + + + + 50 + 30 + + + + Grid X + + + + + + + + 0 + 30 + + + + Grid Y + + + + + + + + 0 + 30 + + + + 999999999.000000000000000 + + + + + + + + 0 + 30 + + + + + + + + + + + + 0 + 30 + + + + DEM文件 + + + + + + + + 0 + 30 + + + + + + + + + 0 + 30 + + + + D:/Programme/vs2022/RasterMergeTest/simulationData/demdataset/demxyz.bin + + + + + + + + 0 + 30 + + + + 多项式轨道模型参数: + + + + + + + + 0 + 30 + + + + 选择 + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 0 + 30 + + + + 选择 + + + + + + + + 0 + 30 + + + + D:/Programme/vs2022/RasterMergeTest/simulationData/demdataset/demxyz.bin + + + + + + + + 0 + 30 + + + + 选择 + + + + + + + + 0 + 30 + + + + 卫星仿真参数: + + + + + + + + 0 + 30 + + + + 选择 + + + + + + + 计算资源 + + + + + + + 0 + 30 + + + + GPU + + + + + + + + 0 + 30 + + + + CPU + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 0 + 30 + + + + D:/Programme/vs2022/RasterMergeTest/simulationData/demdataset/demxyz.bin + + + + + + + 产品输出类型 + + + + + + + 0 + 30 + + + + 查找表 + + + + + + + + 0 + 30 + + + + 局地入射角 + + + + + + + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + 0 + 30 + + + + 结果文件保存地址: + + + + + + + + + diff --git a/Toolbox/SimulationSARTool/PowerSimulationIncoherent/QSimulationSARPolynomialOrbitModel.cpp b/Toolbox/SimulationSARTool/PowerSimulationIncoherent/QSimulationSARPolynomialOrbitModel.cpp index 421dcf5..3ea251d 100644 --- a/Toolbox/SimulationSARTool/PowerSimulationIncoherent/QSimulationSARPolynomialOrbitModel.cpp +++ b/Toolbox/SimulationSARTool/PowerSimulationIncoherent/QSimulationSARPolynomialOrbitModel.cpp @@ -80,11 +80,13 @@ void QSimulationPolynomialSAROrbitModel::onbtnaccepted() qDebug() << "poly degree " << polynum; ployfitOribtModel->setSatelliteOribtStartTime(startTime); - ErrorCode stateCode = ployfitOribtModel->polyFit(polynum, false); + stateCode = ployfitOribtModel->polyFit(polynum, false); if (stateCode != ErrorCode::SUCCESS) { qDebug() << QString::fromStdString(errorCode2errInfo(stateCode)); return ; } + + ployfitOribtModel->saveToXml(outmodelpath); qDebug() << "PolynomialSAROrbitModel fit finished!!"; QMessageBox::information(this, u8"Ϣ", u8"ģϳɹ"); } diff --git a/Toolbox/SimulationSARTool/SimulationSARTool.cpp b/Toolbox/SimulationSARTool/SimulationSARTool.cpp index 3878fa5..3f41e60 100644 --- a/Toolbox/SimulationSARTool/SimulationSARTool.cpp +++ b/Toolbox/SimulationSARTool/SimulationSARTool.cpp @@ -3,6 +3,7 @@ #include "RasterMainWidget.h" #include "ToolBoxWidget.h" #include "QSimulationSARPolynomialOrbitModel.h" +#include "QSimulationLookTableDialog.h" SARSimlulationRFPCToolButton::SARSimlulationRFPCToolButton(QWidget* parent) { @@ -64,14 +65,30 @@ void QSimulationSAROrbitModelToolButton::excute() void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox) { - SARSimlulationRFPCToolButton* items6 = new SARSimlulationRFPCToolButton(toolbox); - SARSimulationTBPImageToolButton* items7 = new SARSimulationTBPImageToolButton(toolbox); - QSimulationSAROrbitModelToolButton* items8 = new QSimulationSAROrbitModelToolButton(toolbox); + - emit toolbox->addBoxToolItemSIGNAL(items6); - emit toolbox->addBoxToolItemSIGNAL(items7); - emit toolbox->addBoxToolItemSIGNAL(items8); + emit toolbox->addBoxToolItemSIGNAL(new SARSimlulationRFPCToolButton(toolbox)); + emit toolbox->addBoxToolItemSIGNAL(new SARSimulationTBPImageToolButton(toolbox)); + emit toolbox->addBoxToolItemSIGNAL(new QSimulationSAROrbitModelToolButton(toolbox)); + emit toolbox->addBoxToolItemSIGNAL(new LookTableComputerClassToolButton(toolbox)); + +} + +LookTableComputerClassToolButton::LookTableComputerClassToolButton(QWidget* parent) +{ + this->toolPath = QVector(0); + this->toolPath.push_back(u8"湤߿"); + this->toolname = QString(u8"ұ"); +} + +LookTableComputerClassToolButton::~LookTableComputerClassToolButton() +{ +} +void LookTableComputerClassToolButton::excute() +{ + QSimulationLookTableDialog* dialog = new QSimulationLookTableDialog; + dialog->show(); } \ No newline at end of file diff --git a/Toolbox/SimulationSARTool/SimulationSARTool.h b/Toolbox/SimulationSARTool/SimulationSARTool.h index 8b1cca4..6bb7ff1 100644 --- a/Toolbox/SimulationSARTool/SimulationSARTool.h +++ b/Toolbox/SimulationSARTool/SimulationSARTool.h @@ -49,6 +49,19 @@ public slots: }; +class SIMULATIONSARTOOL_EXPORT LookTableComputerClassToolButton : public QToolAbstract { + Q_OBJECT +public: + LookTableComputerClassToolButton(QWidget* parent = nullptr); + ~LookTableComputerClassToolButton(); +public slots: + + virtual void excute() override; + +}; + + + extern "C" SIMULATIONSARTOOL_EXPORT void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox); diff --git a/Toolbox/SimulationSARTool/SimulationSARTool.vcxproj b/Toolbox/SimulationSARTool/SimulationSARTool.vcxproj index 4ac6913..4fdea5b 100644 --- a/Toolbox/SimulationSARTool/SimulationSARTool.vcxproj +++ b/Toolbox/SimulationSARTool/SimulationSARTool.vcxproj @@ -37,7 +37,7 @@ tools_qt5 - core + core;gui;widgets debug @@ -111,7 +111,9 @@ + + @@ -124,7 +126,9 @@ + + @@ -151,6 +155,7 @@ + diff --git a/Toolbox/SimulationSARTool/SimulationSARTool.vcxproj.filters b/Toolbox/SimulationSARTool/SimulationSARTool.vcxproj.filters index 4ed2221..d5b2990 100644 --- a/Toolbox/SimulationSARTool/SimulationSARTool.vcxproj.filters +++ b/Toolbox/SimulationSARTool/SimulationSARTool.vcxproj.filters @@ -59,6 +59,9 @@ PowerSimulationIncoherent + + PowerSimulationIncoherent + @@ -97,6 +100,12 @@ PowerSimulationIncoherent + + PowerSimulationIncoherent + + + PowerSimulationIncoherent + @@ -114,6 +123,9 @@ PowerSimulationIncoherent + + PowerSimulationIncoherent + @@ -134,6 +146,9 @@ PowerSimulationIncoherent + + PowerSimulationIncoherent +