Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
update_downloader.h
Go to the documentation of this file.
1
6
7#ifndef COCKATRICE_UPDATEDOWNLOADER_H
8#define COCKATRICE_UPDATEDOWNLOADER_H
9
10#include <QNetworkReply>
11#include <QObject>
12#include <QString>
13#include <QUrl>
14#include <QtGlobal>
15#include <qtmetamacros.h>
16
17class QNetworkAccessManager;
18
19class UpdateDownloader : public QObject
20{
21 Q_OBJECT
22public:
23 explicit UpdateDownloader(QObject *parent);
24 void beginDownload(QUrl url);
25signals:
26 void downloadSuccessful(QUrl filepath);
27 void progressMade(qint64 bytesRead, qint64 totalBytes);
28 void error(QString errorString);
30
31private:
33 QNetworkAccessManager *netMan;
34 QNetworkReply *response;
35private slots:
36 void fileFinished();
37 void downloadProgress(qint64 bytesRead, qint64 totalBytes);
38 void downloadError(QNetworkReply::NetworkError);
39};
40
41#endif // COCKATRICE_UPDATEDOWNLOADER_H
QUrl originalUrl
Definition update_downloader.h:32
void progressMade(qint64 bytesRead, qint64 totalBytes)
void fileFinished()
Definition update_downloader.cpp:40
void error(QString errorString)
void downloadSuccessful(QUrl filepath)
void downloadError(QNetworkReply::NetworkError)
Definition update_downloader.cpp:31
void downloadProgress(qint64 bytesRead, qint64 totalBytes)
Definition update_downloader.cpp:72
UpdateDownloader(QObject *parent)
Definition update_downloader.cpp:13
QNetworkReply * response
Definition update_downloader.h:34
QNetworkAccessManager * netMan
Definition update_downloader.h:33
void beginDownload(QUrl url)
Definition update_downloader.cpp:18