101 lines
3.2 KiB
C++
101 lines
3.2 KiB
C++
#include "QSARSimulationComplexEchoDataDialog.h"
|
|
#include "ui_QSARSimulationComplexEchoDataDialog.h"
|
|
#include <QFileDialog>
|
|
#include <QMessageBox>
|
|
#include "BaseConstVariable.h"
|
|
#include "BaseTool.h"
|
|
#include "ImageNetOperator.h"
|
|
#include <QDebug>
|
|
|
|
|
|
QSARSimulationComplexEchoDataDialog::QSARSimulationComplexEchoDataDialog(QWidget *parent)
|
|
: QDialog(parent)
|
|
, ui(new Ui::QSARSimulationComplexEchoDataDialogClass)
|
|
{
|
|
ui->setupUi(this);
|
|
|
|
|
|
connect(ui->pushButtonEchoDataSelect, SIGNAL(clicked()), this, SLOT(onpushButtonEchoDataSelect_clicked()));
|
|
connect(ui->pushButtonLookTableSelect, SIGNAL(clicked()), this, SLOT(onpushButtonLookTableSelect_clicked()));
|
|
connect(ui->pushButtonL1AEchoDataSelect, SIGNAL(clicked()), this, SLOT(onpushButtonL1AEchoDataSelect_clicked()));
|
|
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(onbuttonBox_accepted()));
|
|
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(onbuttonBox_rejected()));
|
|
|
|
}
|
|
|
|
QSARSimulationComplexEchoDataDialog::~QSARSimulationComplexEchoDataDialog()
|
|
{
|
|
|
|
|
|
}
|
|
|
|
void QSARSimulationComplexEchoDataDialog::onpushButtonEchoDataSelect_clicked()
|
|
{
|
|
QString fileNames = QFileDialog::getOpenFileName(
|
|
this, // 父窗口
|
|
tr(u8"选择L1A回波数据文件"), // 标题
|
|
QString(), // 默认路径
|
|
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
|
|
);
|
|
// 如果用户选择了文件
|
|
if (!fileNames.isEmpty()) {
|
|
QString message = "选择的文件有:\n";
|
|
this->ui->lineEditEchoDataPath->setText(fileNames);
|
|
}
|
|
else {
|
|
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
|
}
|
|
}
|
|
|
|
void QSARSimulationComplexEchoDataDialog::onpushButtonLookTableSelect_clicked()
|
|
{
|
|
QString fileNames = QFileDialog::getOpenFileName(
|
|
this, // 父窗口
|
|
tr(u8"选择查找表回波数据文件"), // 标题
|
|
QString(), // 默认路径
|
|
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
|
|
);
|
|
// 如果用户选择了文件
|
|
if (!fileNames.isEmpty()) {
|
|
QString message = "选择的文件有:\n";
|
|
this->ui->lineEditLookTablePath->setText(fileNames);
|
|
}
|
|
else {
|
|
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
|
}
|
|
}
|
|
|
|
void QSARSimulationComplexEchoDataDialog::onpushButtonL1AEchoDataSelect_clicked()
|
|
{
|
|
QString fileNames = QFileDialog::getSaveFileName(
|
|
this, // 父窗口
|
|
tr(u8"选择L1A回波数据文件"), // 标题
|
|
QString(), // 默认路径
|
|
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
|
|
);
|
|
// 如果用户选择了文件
|
|
if (!fileNames.isEmpty()) {
|
|
QString message = "选择的文件有:\n";
|
|
this->ui->lineEditL1AEchoDataPath->setText(fileNames);
|
|
}
|
|
else {
|
|
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
|
}
|
|
}
|
|
|
|
void QSARSimulationComplexEchoDataDialog::onbuttonBox_accepted()
|
|
{
|
|
QString echoDataPath = this->ui->lineEditEchoDataPath->text().trimmed();
|
|
QString RangelookTablePath = this->ui->lineEditLookTablePath->text().trimmed();
|
|
QString l1AEchoDataPath = this->ui->lineEditL1AEchoDataPath->text().trimmed();
|
|
|
|
|
|
ResampleEChoDataFromGeoEcho(echoDataPath, RangelookTablePath, l1AEchoDataPath);
|
|
QMessageBox::information(this, tr(u8"提示"), tr(u8"没有选择任何文件。"));
|
|
}
|
|
|
|
void QSARSimulationComplexEchoDataDialog::onbuttonBox_rejected()
|
|
{
|
|
this->close();
|
|
}
|