93 lines
1.8 KiB
C++
93 lines
1.8 KiB
C++
#pragma once
|
||
|
||
#include <QtWidgets/QDialog>
|
||
#include <QProcess>
|
||
#include <QThread>
|
||
#include <QFile>
|
||
#include <QDebug>
|
||
#include <QMessageBox>
|
||
#include <QFileDialog>
|
||
#include <QStringList>
|
||
#include <QIntValidator>
|
||
#include <QRegExpValidator>
|
||
|
||
#include "SrsMainPluginInterFace.h"
|
||
|
||
#include "ui_DEM_Fill.h"
|
||
|
||
#include <string>
|
||
#include <iostream>
|
||
|
||
using namespace std;
|
||
|
||
class WorkThreadObject :public QObject
|
||
{
|
||
Q_OBJECT
|
||
|
||
public:
|
||
int run_cmd(const char* cmd);
|
||
|
||
signals:
|
||
void process(int value);
|
||
void sendMaskedTiff(QStringList maskedData);
|
||
|
||
public slots:
|
||
void runFillingWork(QString in_masked, QString out_filled, QString scale, QString size);
|
||
void readProcessStandardOutput();
|
||
|
||
private:
|
||
QProcess* mProcess = nullptr;
|
||
|
||
QString outTiffPath, tifflinear, tiffcubic;
|
||
};
|
||
|
||
class DataFilling : public SrsMainInterface
|
||
{
|
||
Q_OBJECT
|
||
Q_INTERFACES(SrsMainInterface)
|
||
Q_PLUGIN_METADATA(IID MainInterface_iid)
|
||
|
||
public:
|
||
DataFilling();
|
||
|
||
virtual QString PannelName() override;
|
||
virtual QString CategoryName() override;
|
||
|
||
virtual QString EnglishName() override;
|
||
virtual QString ChineseName() override;
|
||
virtual QString Information() override;
|
||
virtual QString IconPath() override;
|
||
virtual QWidget* CenterWidget() override;
|
||
|
||
void startWorkThread();
|
||
|
||
//读json文件,获取历史存储的路径
|
||
void ReadConfigHistoryPaths(QString strPath);
|
||
//保存本次打开的路径到json文件
|
||
void WriteConfigPaths(QString strPath);
|
||
|
||
|
||
public slots:
|
||
//pushbutton_OK
|
||
void readAndStart();
|
||
void pbCancel();
|
||
|
||
void chooseMaskedSlope();
|
||
void chooseOutFill();
|
||
|
||
void openResultData(QStringList string_list);
|
||
|
||
signals:
|
||
void startDataFill(QString in_masked, QString out_filled, QString scale, QString size);
|
||
|
||
private:
|
||
Ui::DEM_FillClass ui;
|
||
|
||
QDialog* myWidget = nullptr;
|
||
|
||
QThread* mWorkThread = nullptr;
|
||
WorkThreadObject* mWorker = nullptr;
|
||
|
||
QString outPath;
|
||
};
|