diff options
| author | Arno <arno@disconnect.de> | 2016-12-03 00:00:16 +0100 |
|---|---|---|
| committer | Arno <arno@disconnect.de> | 2016-12-03 00:00:16 +0100 |
| commit | 0432c09d7889009beb9557e0546d0c4f240bb37e (patch) | |
| tree | b401ce1815e4e33e4ef79b9a69727f70a80e6e1b /filewidget.h | |
| parent | c8d8c71460c7e7d403c9dba1addc850a361d3e9c (diff) | |
| download | ShemovCleaner-0432c09d7889009beb9557e0546d0c4f240bb37e.tar.gz ShemovCleaner-0432c09d7889009beb9557e0546d0c4f240bb37e.tar.bz2 ShemovCleaner-0432c09d7889009beb9557e0546d0c4f240bb37e.zip | |
Actually use Copy Files to...
Create a FileCopier and show a custom, non-modal progress dialog when
we're copying files.
Turns out that a QProgressDialog always shows when it's created. This is
by design, so I had to implement one that fits my needs.
Also, a buffer size of 32K (as used in MKVMerger) is way too small to
max out the available bandwidth, so I set it to an (arbitrary) value of
16MB.
Diffstat (limited to 'filewidget.h')
| -rw-r--r-- | filewidget.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/filewidget.h b/filewidget.h index 296944e..6d427ff 100644 --- a/filewidget.h +++ b/filewidget.h @@ -22,6 +22,8 @@ class FileDisplay; class OriginDialog; class QMenu; class QSignalMapper; +class FileCopier; +class ProgressDialog; class FileWidget : public QWidget { Q_OBJECT @@ -63,6 +65,11 @@ class FileWidget : public QWidget { void paste(); void selectFirst(); void addAsOrigin(); + void setupProgress(QString file, qint64 size); + void setCopyProgress(qint64 bytes); + void copyFiles(QString destDir); + void hideCopyProgress(); + void copySuccess(bool success, QString source); protected: virtual void keyPressEvent(QKeyEvent *e); @@ -107,9 +114,11 @@ class FileWidget : public QWidget { QAction *mPasteA; QAction *mDeleteA; QAction *mAddAsOriginA; + ProgressDialog *mCopyProgress; FileDisplay *mFileDisplay; VideoSorter *mProxy; OriginDialog *mOrignDlg; + FileCopier *mFileCopier; int mFileAction; }; |
