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
|
|
|
|
|
2017-03-05 21:23:36 +01:00
|
|
|
|
class QStringList;
|
|
|
|
|
|
|
2019-07-13 08:45:32 +02:00
|
|
|
|
class QLabel;
|
|
|
|
|
|
class QPushButton;
|
|
|
|
|
|
class QTabWidget;
|
|
|
|
|
|
class QVBoxLayout;
|
|
|
|
|
|
class QHBoxLayout;
|
|
|
|
|
|
class QComboBox;
|
|
|
|
|
|
class QSpinBox;
|
|
|
|
|
|
class QCheckBox;
|
|
|
|
|
|
class QPlainTextEdit;
|
|
|
|
|
|
class QLineEdit;
|
|
|
|
|
|
class QFormLayout;
|
|
|
|
|
|
|
|
|
|
|
|
|
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);
|
2019-07-13 08:45:32 +02:00
|
|
|
|
void retranslateUi();
|
2017-02-01 18:01:02 +01:00
|
|
|
|
private:
|
2019-07-13 08:45:32 +02:00
|
|
|
|
|
2017-03-05 21:23:36 +01:00
|
|
|
|
QProcess *m_process = nullptr;
|
|
|
|
|
|
ConnectionConfig m_config;
|
|
|
|
|
|
|
2019-07-13 08:45:32 +02:00
|
|
|
|
QPushButton *btnStart;
|
|
|
|
|
|
QTabWidget *tabWidget;
|
|
|
|
|
|
QWidget *tab;
|
|
|
|
|
|
QVBoxLayout *verticalLayout;
|
|
|
|
|
|
QFormLayout *formLayout;
|
|
|
|
|
|
QWidget *widget;
|
|
|
|
|
|
QHBoxLayout *horizontalLayout;
|
|
|
|
|
|
QLineEdit *editFilename;
|
|
|
|
|
|
QPushButton *selectDestination;
|
|
|
|
|
|
QComboBox *backupFormat;
|
|
|
|
|
|
QSpinBox *jobs;
|
|
|
|
|
|
QCheckBox *chkbxVerbose;
|
|
|
|
|
|
QSpinBox *compression;
|
|
|
|
|
|
QCheckBox *chkbxIncludeBlobs;
|
|
|
|
|
|
QCheckBox *chkbxClean;
|
|
|
|
|
|
QCheckBox *chkbxCreate;
|
|
|
|
|
|
QCheckBox *noOwner;
|
|
|
|
|
|
QCheckBox *oids;
|
|
|
|
|
|
QComboBox *what;
|
|
|
|
|
|
QCheckBox *noAcl;
|
|
|
|
|
|
QWidget *tab_2;
|
|
|
|
|
|
QVBoxLayout *verticalLayout_2;
|
|
|
|
|
|
QPlainTextEdit *stdOutput;
|
|
|
|
|
|
QLabel *label;
|
|
|
|
|
|
QLabel *label_2;
|
|
|
|
|
|
QLabel *label_3;
|
|
|
|
|
|
QLabel *label_4;
|
|
|
|
|
|
QLabel *label_5;
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|