98 lines
2.9 KiB
C++
98 lines
2.9 KiB
C++
|
#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,
|
|||
|
tr(u8"ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"),
|
|||
|
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)
|
|||
|
{
|
|||
|
QString fileNames = QFileDialog::getOpenFileName(
|
|||
|
this,
|
|||
|
tr(u8"ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"),
|
|||
|
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)
|
|||
|
{
|
|||
|
QString fileNames = QFileDialog::getOpenFileName(
|
|||
|
this,
|
|||
|
tr(u8"ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"),
|
|||
|
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>"));
|
|||
|
}
|
|||
|
}
|