DianLi/DEM_Fill/DEM_Fill.h
2023-03-13 16:22:02 +08:00

93 lines
1.8 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#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;
};