ifndef FILEUPLOADER_H define FILEUPLOADER_H include QObject include up

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef FILEUPLOADER_H
#define FILEUPLOADER_H
#include <QObject>
#include "uploadrequest.h"
#include "progresswidget.h"
#include "medialistmodel.h"
class FileUploader : public QObject
{
Q_OBJECT
public:
FileUploader(ProgressWidget*, MediaListModel*);
private:
ProgressWidget *progress;
MediaListModel *medias;
UploadRequest *request;
int donecount;
int filecount;
Media *current;
QVector<QPair<Media*,QString> > results;
bool failed;
void process();
private slots:
void progressReceiver(int value);
void statusReceiver(int value);
void resultReceiver(QString value);
signals:
void status(int); // 0 - begin, 1 - done, 2 - error
}
#endif // FILEUPLOADER_H