-
Notifications
You must be signed in to change notification settings - Fork 0
/
autofilebackup.h
97 lines (68 loc) · 2.44 KB
/
autofilebackup.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#ifndef AUTOFILEBACKUP_H
#define AUTOFILEBACKUP_H
#include <QWidget>
#include <QAbstractButton>
#include <QMimeData>
#include <filecopysettings.h>
#include <QSystemTrayIcon>
#include <QCloseEvent>
#include <QFileSystemWatcher>
#include <projectconfiguration.h>
namespace Ui {
class AutoFileBackup;
}
class AutoFileBackup : public QWidget
{
Q_OBJECT
public:
explicit AutoFileBackup(QWidget *parent = 0);
~AutoFileBackup();
bool createConnection();
private slots:
void on_addNewFileButton_clicked();
void on_removeFileButton_clicked();
void directoryChanged(const QString &);
void delayedDirectoryChanged();
void fileChanged(const QString & path);
void delayedFileChanged();
// void on_saveToDiffDirCheckBox_stateChanged(int arg1);
void on_suffixDateTimeCheckBox_stateChanged(int arg1);
void on_destinationDirBrowseButton_clicked();
// void on_fileCopyButtonBox_clicked(QAbstractButton *button);
void on_watchedFilesTableWidget_dropped(const QMimeData *mimeData);
void on_saveProjectButton_clicked();
void on_openProjectButton_clicked();
void trayIconClicked(QSystemTrayIcon::ActivationReason);
void showHideWindow();
void on_createDateFolderCheckBox_stateChanged(int arg1);
void on_saveProjectAsButton_clicked();
void on_isSavingToDifferentFolderRadioButton_toggled(bool checked);
void on_clearLogButton_clicked();
private:
Ui::AutoFileBackup *ui;
void addLog(QString statusText, QString value);
bool addNewWatchFile(QString file);
bool copyFileAsBackup(QString sourceFile, QString destinationDir, QString prefixString, QString suffixString, bool suffixDate, QString suffixDateFormat, QString suffixAfterDateTime);
void resetFileCopySettings();
FileCopySettings getFileCopySettings();
void setFileCopySettings(FileCopySettings fcSettings);
void insertToWatchTable(QString file);
void setDropOverlay();
void clearFileMonitorTable();
// // Tray Icon Functions
void createTrayActions();
void createTrayIcon();
void setTrayIcon();
void closeEvent(QCloseEvent *event);
void changeEvent(QEvent *);
QSystemTrayIcon *trayIcon;
QMenu *trayIconMenu;
QAction *showHideTray;
QAction *closeTray;
QFileSystemWatcher *folderMonitor;
QFileSystemWatcher *fileMonitor;
QList<QString> watchedFiles;
QStringList changedFileQueue;
ProjectConfiguration projectConfg;
};
#endif // AUTOFILEBACKUP_H