Changeset View
Changeset View
Standalone View
Standalone View
krusader/Synchronizer/synchronizedialog.h
Show All 16 Lines | |||||
17 | * You should have received a copy of the GNU General Public License * | 17 | * You should have received a copy of the GNU General Public License * | ||
18 | * along with Krusader. If not, see [http://www.gnu.org/licenses/]. * | 18 | * along with Krusader. If not, see [http://www.gnu.org/licenses/]. * | ||
19 | *****************************************************************************/ | 19 | *****************************************************************************/ | ||
20 | 20 | | |||
21 | #ifndef SYNCHRONIZEDIALOG_H | 21 | #ifndef SYNCHRONIZEDIALOG_H | ||
22 | #define SYNCHRONIZEDIALOG_H | 22 | #define SYNCHRONIZEDIALOG_H | ||
23 | 23 | | |||
24 | // QtWidgets | 24 | // QtWidgets | ||
25 | #include <QDialog> | | |||
26 | #include <QCheckBox> | 25 | #include <QCheckBox> | ||
26 | #include <QDialog> | ||||
27 | #include <QLabel> | 27 | #include <QLabel> | ||
28 | #include <QProgressBar> | 28 | #include <QProgressBar> | ||
29 | #include <QPushButton> | 29 | #include <QPushButton> | ||
30 | 30 | | |||
31 | #include "synchronizer.h" | 31 | #include "synchronizer.h" | ||
32 | 32 | | |||
33 | class SynchronizeDialog : QDialog | 33 | class SynchronizeDialog : QDialog | ||
34 | { | 34 | { | ||
35 | Q_OBJECT | 35 | Q_OBJECT | ||
36 | 36 | | |||
37 | public: | 37 | public: | ||
38 | SynchronizeDialog(QWidget*, Synchronizer *sync, | 38 | SynchronizeDialog(QWidget *, Synchronizer *sync, int, KIO::filesize_t, int, KIO::filesize_t, | ||
39 | int, KIO::filesize_t, int, KIO::filesize_t, int, KIO::filesize_t, int); | 39 | int, KIO::filesize_t, int); | ||
40 | ~SynchronizeDialog(); | 40 | ~SynchronizeDialog(); | ||
41 | 41 | | |||
42 | inline bool wasSyncronizationStarted() { | 42 | inline bool wasSyncronizationStarted() { return syncStarted; } | ||
43 | return syncStarted; | | |||
44 | } | | |||
45 | 43 | | |||
46 | public slots: | 44 | public slots: | ||
47 | void startSynchronization(); | 45 | void startSynchronization(); | ||
48 | void synchronizationFinished(); | 46 | void synchronizationFinished(); | ||
49 | void processedSizes(int, KIO::filesize_t, int, KIO::filesize_t, int, KIO::filesize_t); | 47 | void processedSizes(int, KIO::filesize_t, int, KIO::filesize_t, int, KIO::filesize_t); | ||
50 | void pauseOrResume(); | 48 | void pauseOrResume(); | ||
51 | void pauseAccepted(); | 49 | void pauseAccepted(); | ||
52 | 50 | | |||
53 | private: | 51 | private: | ||
54 | QProgressBar *progress; | 52 | QProgressBar *progress; | ||
55 | 53 | | |||
56 | QCheckBox *cbRightToLeft; | 54 | QCheckBox *cbRightToLeft; | ||
57 | QCheckBox *cbLeftToRight; | 55 | QCheckBox *cbLeftToRight; | ||
58 | QCheckBox *cbDeletable; | 56 | QCheckBox *cbDeletable; | ||
59 | 57 | | |||
60 | QLabel *lbRightToLeft; | 58 | QLabel *lbRightToLeft; | ||
61 | QLabel *lbLeftToRight; | 59 | QLabel *lbLeftToRight; | ||
62 | QLabel *lbDeletable; | 60 | QLabel *lbDeletable; | ||
63 | 61 | | |||
64 | QCheckBox *cbOverwrite; | 62 | QCheckBox *cbOverwrite; | ||
65 | 63 | | |||
66 | QPushButton *btnStart; | 64 | QPushButton *btnStart; | ||
67 | QPushButton *btnPause; | 65 | QPushButton *btnPause; | ||
68 | 66 | | |||
69 | Synchronizer *synchronizer; | 67 | Synchronizer *synchronizer; | ||
70 | 68 | | |||
71 | int leftCopyNr; | 69 | int leftCopyNr; | ||
72 | KIO::filesize_t leftCopySize; | 70 | KIO::filesize_t leftCopySize; | ||
73 | int rightCopyNr; | 71 | int rightCopyNr; | ||
74 | KIO::filesize_t rightCopySize; | 72 | KIO::filesize_t rightCopySize; | ||
75 | int deleteNr; | 73 | int deleteNr; | ||
76 | KIO::filesize_t deleteSize; | 74 | KIO::filesize_t deleteSize; | ||
77 | 75 | | |||
78 | int parallelThreads; | 76 | int parallelThreads; | ||
79 | 77 | | |||
80 | bool isPause; | 78 | bool isPause; | ||
81 | bool syncStarted; | 79 | bool syncStarted; | ||
82 | }; | 80 | }; | ||
83 | 81 | | |||
84 | #endif /* __SYNCHRONIZE_DIALOG__ */ | 82 | #endif /* __SYNCHRONIZE_DIALOG__ */ |