2014-05-17 07:10:16 +00:00
|
|
|
/*
|
|
|
|
The MIT License (MIT)
|
|
|
|
|
|
|
|
Copyright (c) 2013 The ioquake Group
|
|
|
|
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
|
|
this software and associated documentation files (the "Software"), to deal in
|
|
|
|
the Software without restriction, including without limitation the rights to
|
|
|
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
|
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
|
|
subject to the following conditions:
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included in all
|
|
|
|
copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
|
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
|
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
|
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
*/
|
2014-05-14 12:33:47 +00:00
|
|
|
#ifndef INSTALLWIZARD_COPY_H
|
|
|
|
#define INSTALLWIZARD_COPY_H
|
|
|
|
|
|
|
|
#include <QThread>
|
2014-05-15 04:20:50 +00:00
|
|
|
#include "installwizard.h"
|
2014-05-14 12:33:47 +00:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class InstallWizard_Copy;
|
|
|
|
}
|
|
|
|
|
2014-05-16 11:33:57 +00:00
|
|
|
class FileCopyWorker;
|
2014-05-14 12:33:47 +00:00
|
|
|
|
|
|
|
class InstallWizard_Copy : public QWizardPage
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit InstallWizard_Copy(QWidget *parent = 0);
|
|
|
|
~InstallWizard_Copy();
|
|
|
|
virtual void initializePage();
|
|
|
|
virtual bool isComplete() const;
|
2014-05-15 06:40:17 +00:00
|
|
|
virtual int nextId() const;
|
2014-05-14 12:33:47 +00:00
|
|
|
void cancel();
|
|
|
|
|
|
|
|
private slots:
|
2014-05-15 09:42:42 +00:00
|
|
|
void setCopyFilename(const QString &filename);
|
2014-05-14 12:33:47 +00:00
|
|
|
void setCopyProgress(qint64 bytesWritten, qint64 bytesTotal);
|
|
|
|
void setCopyErrorMessage(const QString &message);
|
2014-05-16 12:41:57 +00:00
|
|
|
void finishCopy(QList<FileOperation> renameOperations);
|
2014-05-14 12:33:47 +00:00
|
|
|
|
|
|
|
signals:
|
2014-05-15 04:20:50 +00:00
|
|
|
void copy();
|
2014-05-14 12:33:47 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::InstallWizard_Copy *ui;
|
2014-05-16 11:33:57 +00:00
|
|
|
FileCopyWorker *copyWorker;
|
2014-05-14 12:33:47 +00:00
|
|
|
QThread copyThread;
|
|
|
|
bool isCopyFinished;
|
2014-05-15 09:42:42 +00:00
|
|
|
|
|
|
|
// The name of the file currently being copied.
|
|
|
|
QString copyFilename;
|
2014-05-14 12:33:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // INSTALLWIZARD_COPY_H
|