Document filetransferpseudojob
This commit is contained in:
committed by
Carl Schwan
parent
8e566e7326
commit
5567f94535
@@ -6,6 +6,13 @@
|
|||||||
#include <KJob>
|
#include <KJob>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @class FileTransferPseudoJob
|
||||||
|
*
|
||||||
|
* A class inherited from KJob to track a file download.
|
||||||
|
*
|
||||||
|
* @sa KJob
|
||||||
|
*/
|
||||||
class FileTransferPseudoJob : public KJob
|
class FileTransferPseudoJob : public KJob
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -15,10 +22,25 @@ public:
|
|||||||
};
|
};
|
||||||
Q_ENUM(Operation);
|
Q_ENUM(Operation);
|
||||||
FileTransferPseudoJob(Operation operation, const QString &srcDest, const QString &path);
|
FileTransferPseudoJob(Operation operation, const QString &srcDest, const QString &path);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set the current number of bytes transferred.
|
||||||
|
*/
|
||||||
void fileTransferProgress(QString id, qint64 progress, qint64 total);
|
void fileTransferProgress(QString id, qint64 progress, qint64 total);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set the file transfer as complete.
|
||||||
|
*/
|
||||||
void fileTransferCompleted(QString id, QUrl localFile);
|
void fileTransferCompleted(QString id, QUrl localFile);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set the file transfer as failed.
|
||||||
|
*/
|
||||||
void fileTransferFailed(QString id, QString errorMessage = {});
|
void fileTransferFailed(QString id, QString errorMessage = {});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Start the file transfer.
|
||||||
|
*/
|
||||||
void start() override;
|
void start() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user