File indexing completed on 2024-05-12 09:58:21
0001 /* 0002 SPDX-FileCopyrightText: 2003 Csaba Karai <krusader@users.sourceforge.net> 0003 SPDX-FileCopyrightText: 2004-2022 Krusader Krew <https://krusader.org> 0004 0005 SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #ifndef SYNCHRONIZEDIALOG_H 0009 #define SYNCHRONIZEDIALOG_H 0010 0011 // QtWidgets 0012 #include <QCheckBox> 0013 #include <QDialog> 0014 #include <QLabel> 0015 #include <QProgressBar> 0016 #include <QPushButton> 0017 0018 #include "synchronizer.h" 0019 0020 class SynchronizeDialog : QDialog 0021 { 0022 Q_OBJECT 0023 0024 public: 0025 SynchronizeDialog(QWidget *, Synchronizer *sync, int, KIO::filesize_t, int, KIO::filesize_t, int, KIO::filesize_t, int); 0026 ~SynchronizeDialog() override; 0027 0028 inline bool wasSyncronizationStarted() 0029 { 0030 return syncStarted; 0031 } 0032 0033 public slots: 0034 void startSynchronization(); 0035 void synchronizationFinished(); 0036 void processedSizes(int, KIO::filesize_t, int, KIO::filesize_t, int, KIO::filesize_t); 0037 void pauseOrResume(); 0038 void pauseAccepted(); 0039 0040 private: 0041 QProgressBar *progress; 0042 0043 QCheckBox *cbRightToLeft; 0044 QCheckBox *cbLeftToRight; 0045 QCheckBox *cbDeletable; 0046 0047 QLabel *lbRightToLeft; 0048 QLabel *lbLeftToRight; 0049 QLabel *lbDeletable; 0050 0051 QCheckBox *cbOverwrite; 0052 0053 QPushButton *btnStart; 0054 QPushButton *btnPause; 0055 0056 Synchronizer *synchronizer; 0057 0058 int leftCopyNr; 0059 KIO::filesize_t leftCopySize; 0060 int rightCopyNr; 0061 KIO::filesize_t rightCopySize; 0062 int deleteNr; 0063 KIO::filesize_t deleteSize; 0064 0065 int parallelThreads; 0066 0067 bool isPause; 0068 bool syncStarted; 0069 }; 0070 0071 #endif /* __SYNCHRONIZE_DIALOG__ */