2025-04-07 13:46:53 +00:00
|
|
|
|
#include "QLookTableResampleFromWGS84ToRange.h"
|
|
|
|
|
#include "BaseConstVariable.h"
|
|
|
|
|
#include "BaseTool.h"
|
|
|
|
|
#include <QMessageBox>
|
|
|
|
|
#include <QFileDialog>
|
|
|
|
|
#include "ui_QLookTableResampleFromWGS84ToRange.h"
|
|
|
|
|
#include "ImageNetOperator.h"
|
|
|
|
|
|
|
|
|
|
QLookTableResampleFromWGS84ToRange::QLookTableResampleFromWGS84ToRange(QWidget *parent)
|
|
|
|
|
: QDialog(parent)
|
|
|
|
|
,ui(new Ui::QLookTableResampleFromWGS84ToRangeClass)
|
|
|
|
|
{
|
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
|
|
|
|
|
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(onaccepted()));
|
|
|
|
|
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(onrejected()));
|
|
|
|
|
connect(ui->pushButtonLookTableWGS84Select, SIGNAL(clicked(bool)), this, SLOT(onpushButtonLookTableWGS84SelectClicked(bool)));
|
|
|
|
|
connect(ui->pushButtonLookTableRangeSelect, SIGNAL(clicked(bool)), this, SLOT(onpushButtonLookTableRangeSelectClicked(bool)));
|
|
|
|
|
connect(ui->pushButtonLookTableCountSelect, SIGNAL(clicked(bool)), this, SLOT(onpushButtonLookTableCountSelectClicked(bool)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QLookTableResampleFromWGS84ToRange::~QLookTableResampleFromWGS84ToRange()
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
void QLookTableResampleFromWGS84ToRange::onaccepted()
|
|
|
|
|
{
|
|
|
|
|
QString looktableWGS84Ptah = ui->lineEditLookTableWGS84Path->text();
|
|
|
|
|
QString looktableRangePtah = ui->lineEditLookTableRangePath->text();
|
|
|
|
|
QString looktableCountPtah = ui->lineEditLookTableCountPath->text();
|
|
|
|
|
|
|
|
|
|
long Oriheight = ui->spinBoxRowCount->value();
|
|
|
|
|
long OriWidth = ui->spinBoxColCount->value();
|
|
|
|
|
|
|
|
|
|
ReflectTable_WGS2Range(looktableWGS84Ptah, looktableRangePtah, looktableCountPtah, Oriheight, OriWidth);
|
|
|
|
|
QMessageBox::information(nullptr, u8"<EFBFBD><EFBFBD>ʾ", u8"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void QLookTableResampleFromWGS84ToRange::onrejected()
|
|
|
|
|
{
|
|
|
|
|
this->close();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void QLookTableResampleFromWGS84ToRange::onpushButtonLookTableWGS84SelectClicked(bool)
|
|
|
|
|
{
|
|
|
|
|
QString fileNames = QFileDialog::getOpenFileName(
|
|
|
|
|
this,
|
2025-04-07 15:15:18 +00:00
|
|
|
|
tr(u8"ѡ<EFBFBD><EFBFBD>WGS84<EFBFBD>ļ<EFBFBD>"),
|
2025-04-07 13:46:53 +00:00
|
|
|
|
QString(),
|
|
|
|
|
tr(ENVI_FILE_FORMAT_FILTER)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if (!fileNames.isEmpty()) {
|
|
|
|
|
QString message = "ѡ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>\n";
|
|
|
|
|
this->ui->lineEditLookTableWGS84Path->setText(fileNames);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
QMessageBox::information(this, tr(u8"<EFBFBD><EFBFBD>ʾ"), tr(u8"û<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void QLookTableResampleFromWGS84ToRange::onpushButtonLookTableRangeSelectClicked(bool)
|
|
|
|
|
{
|
2025-04-07 15:15:18 +00:00
|
|
|
|
QString fileNames = QFileDialog::getSaveFileName(
|
2025-04-07 13:46:53 +00:00
|
|
|
|
this,
|
2025-04-07 15:15:18 +00:00
|
|
|
|
tr(u8"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"),
|
2025-04-07 13:46:53 +00:00
|
|
|
|
QString(),
|
|
|
|
|
tr(ENVI_FILE_FORMAT_FILTER)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if (!fileNames.isEmpty()) {
|
|
|
|
|
QString message = "ѡ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>\n";
|
|
|
|
|
this->ui->lineEditLookTableRangePath->setText(fileNames);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
QMessageBox::information(this, tr(u8"<EFBFBD><EFBFBD>ʾ"), tr(u8"û<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void QLookTableResampleFromWGS84ToRange::onpushButtonLookTableCountSelectClicked(bool)
|
|
|
|
|
{
|
2025-04-07 15:15:18 +00:00
|
|
|
|
QString fileNames = QFileDialog::getSaveFileName(
|
2025-04-07 13:46:53 +00:00
|
|
|
|
this,
|
2025-04-07 15:15:18 +00:00
|
|
|
|
tr(u8"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD>Ʋ<EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"),
|
2025-04-07 13:46:53 +00:00
|
|
|
|
QString(),
|
|
|
|
|
tr(ENVI_FILE_FORMAT_FILTER)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if (!fileNames.isEmpty()) {
|
|
|
|
|
QString message = "ѡ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>\n";
|
|
|
|
|
this->ui->lineEditLookTableCountPath->setText(fileNames);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
QMessageBox::information(this, tr(u8"<EFBFBD><EFBFBD>ʾ"), tr(u8"û<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"));
|
|
|
|
|
}
|
|
|
|
|
}
|