DianLi/DEM_Fill/DEM_Fill.h

93 lines
1.8 KiB
C
Raw Normal View History

2023-03-13 16:22:02 +08:00
#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();
//<2F><>json<6F>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1>ʷ<EFBFBD><EFBFBD><E6B4A2>·<EFBFBD><C2B7>
void ReadConfigHistoryPaths(QString strPath);
//<2F><><EFBFBD><EFBFBD>δ򿪵<CEB4>·<EFBFBD><C2B7><EFBFBD><EFBFBD>json<6F>ļ<EFBFBD>
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;
};