From 0432c09d7889009beb9557e0546d0c4f240bb37e Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 3 Dec 2016 00:00:16 +0100 Subject: 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. --- progressdialog.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 progressdialog.h (limited to 'progressdialog.h') diff --git a/progressdialog.h b/progressdialog.h new file mode 100644 index 0000000..6aee406 --- /dev/null +++ b/progressdialog.h @@ -0,0 +1,27 @@ +#ifndef PROGRESSDIALOG_H +#define PROGRESSDIALOG_H + +#include +#include +#include + +class ProgressDialog : public QDialog { + Q_OBJECT + public: + ProgressDialog(QWidget *parent = 0, Qt::WindowFlags f = 0); + void setLabelText(const QString &text) { mLabel->setText(text); } + void setMaximum(int max) { mProgress->setMaximum(max); } + + public slots: + void setValue(int val); + + signals: + void cancelled(); + + private: + QLabel *mLabel; + QProgressBar *mProgress; + +}; + +#endif // PROGRESSDIALOG_H -- cgit v1.2.3-70-g09d2