anetwork.h 983 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef NETWORK_H
  2. #define NETWORK_H
  3. #include <QUrl>
  4. #include <QNetworkAccessManager>
  5. #include <QtNetwork/QNetworkReply>
  6. #include <QProgressBar>
  7. #include <QFile>
  8. #include <QObject>
  9. class MainWindow;
  10. class ANetwork : public QObject {
  11. Q_OBJECT
  12. public:
  13. explicit ANetwork(QObject *parent = nullptr);
  14. ANetwork( const ANetwork&) = delete;
  15. ANetwork& operator=( ANetwork& ) = delete;
  16. QNetworkReply* currentDownload;
  17. QFile output;
  18. void getUrl();
  19. QString getCoupon();
  20. void UpdatePatches();
  21. QString getServers();
  22. QString getFootMessage();
  23. QString getMicroPath(int timestamp);
  24. QString query(QUrl url);
  25. QByteArray query_binary(QUrl url);
  26. QString micropatch;
  27. signals:
  28. void changePatchStatus(QString patch_name, QString new_status);
  29. void changeHint(QString header, QString hint);
  30. private slots:
  31. // void downloadProgress(qint64 bytesReceived, qint64 bytesTotal);
  32. // void downloadFinished();
  33. };
  34. #endif // NETWORK_H