/* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ #ifndef COPYWORKER_H #define COPYWORKER_H #include #include #include #include #include #include class CopyWorker : public QThread { Q_OBJECT public: CopyWorker(QObject *parent = 0); void enqueue(const QString &source, const QString &destination); void appendData(const QString &source, const QVariant &data); const QHash > data() const { return mData; } void clear(); qint64 max() const { return mMax; } virtual void run(); signals: void success(QString); void bytesRead(int); void processint(QString); void error(QString); void file(QString); private: QList > mFiles; QHash > mData; QMutex mSourceMx; int mMax; }; #endif // COPYWORKER_H