111 lines
3.3 KiB
C++
111 lines
3.3 KiB
C++
#include "QSimulationLookTableDialog.h"
|
|
#include "ui_QSimulationLookTableDialog.h"
|
|
#include <QFileDialog>
|
|
#include <QMessageBox>
|
|
#include "LookTableComputerClass.h"
|
|
|
|
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->isChecked();
|
|
bool checkBoxIncAngle = this->ui->checkBoxIncAngle->isChecked();
|
|
bool BoxDopplerFlag = this->ui->checkBoxDoppler->isChecked();
|
|
QString simulationName = this->ui->lineEditLookName->text();
|
|
LookTableSimualtionMainProcessSpace::LookTableSimualtionMainProcess(
|
|
simulationName,
|
|
orbitpath, SatePath, DEMPath, outDirPath,
|
|
gpuflag, looktableflag, checkBoxIncAngle, BoxDopplerFlag
|
|
);
|
|
|
|
|
|
|
|
|
|
}
|