This commit is contained in:
Bertrand Songis
2015-08-17 13:37:26 +02:00
parent 23c985ffd6
commit f5f1a052ca
7 changed files with 148 additions and 122 deletions
+18 -14
View File
@@ -1,7 +1,6 @@
#ifndef SYNCPROCESS_H_
#define SYNCPROCESS_H_
#include <QObject>
#include <QString>
#include <QStringList>
@@ -10,21 +9,26 @@ class ProgressWidget;
class SyncProcess : public QObject
{
Q_OBJECT
Q_OBJECT
public:
SyncProcess(const QString &folder1, const QString &folder2, ProgressWidget *progress);
void run();
public:
SyncProcess(const QString & folder1, const QString & folder2, ProgressWidget * progress);
bool run();
protected:
bool synchronize();
QStringList updateDir(const QDir &source, const QDir &destination);
QString folder1;
QString folder2;
ProgressWidget *progress;
QStringList errors;
bool simulation;
int index;
protected slots:
void onClosed();
protected:
int getFilesCount(const QString & directory);
QStringList updateDir(const QString & source, const QString & destination);
QString updateEntry(const QString & path, const QDir & source, const QDir & destination);
QString folder1;
QString folder2;
ProgressWidget * progress;
QStringList errors;
int index;
int count;
bool closed;
};
#endif /* SYNCPROCESS_H_ */