2017-03-05 21:23:36 +01:00
|
|
|
|
#ifndef BACKUPDIALOG_H
|
2017-02-01 18:01:02 +01:00
|
|
|
|
#define BACKUPDIALOG_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <QDialog>
|
2017-03-05 21:23:36 +01:00
|
|
|
|
#include "ConnectionConfig.h"
|
|
|
|
|
|
#include <QProcess>
|
2017-02-01 18:01:02 +01:00
|
|
|
|
|
|
|
|
|
|
namespace Ui {
|
2017-03-05 21:23:36 +01:00
|
|
|
|
class BackupDialog;
|
2017-02-01 18:01:02 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2017-03-05 21:23:36 +01:00
|
|
|
|
class QStringList;
|
|
|
|
|
|
|
2017-02-01 18:01:02 +01:00
|
|
|
|
class BackupDialog : public QDialog
|
|
|
|
|
|
{
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
2018-11-04 11:26:20 +01:00
|
|
|
|
explicit BackupDialog(QWidget *parent = nullptr);
|
2017-02-01 18:01:02 +01:00
|
|
|
|
~BackupDialog();
|
|
|
|
|
|
|
2017-03-05 21:23:36 +01:00
|
|
|
|
void ConnectTo(QProcess *process);
|
|
|
|
|
|
|
|
|
|
|
|
void disconnectCurrentProcess();
|
|
|
|
|
|
void setConfig(const ConnectionConfig &cfg);
|
2017-02-01 18:01:02 +01:00
|
|
|
|
private:
|
|
|
|
|
|
Ui::BackupDialog *ui;
|
2017-03-05 21:23:36 +01:00
|
|
|
|
QProcess *m_process = nullptr;
|
|
|
|
|
|
ConnectionConfig m_config;
|
|
|
|
|
|
|
2018-12-09 21:10:35 +01:00
|
|
|
|
void writeOutput(const QString &s);
|
2017-03-05 21:23:36 +01:00
|
|
|
|
|
|
|
|
|
|
void setParams(QStringList &args);
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
|
|
|
|
void on_process_readyRead();
|
|
|
|
|
|
void on_process_errorOccurred(QProcess::ProcessError error);
|
|
|
|
|
|
void on_process_finished(int exitCode, QProcess::ExitStatus exitStatus);
|
|
|
|
|
|
void on_btnStart_clicked();
|
|
|
|
|
|
void on_backupFormat_currentIndexChanged(int index);
|
|
|
|
|
|
void on_selectDestination_clicked();
|
2017-02-01 18:01:02 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // BACKUPDIALOG_H
|