Kstars

urlfiledownload.h
1 /*
2  SPDX-FileCopyrightText: 2015-2017 Pavel Mraz
3 
4  SPDX-FileCopyrightText: 2017 Jasem Mutlaq
5 
6  SPDX-License-Identifier: GPL-2.0-or-later
7 */
8 
9 #ifndef URLFILEDOWNLOAD_H
10 #define URLFILEDOWNLOAD_H
11 
12 #include "hips.h"
13 
14 #include <QtNetwork>
15 
16 class UrlFileDownload : public QObject
17 {
18  Q_OBJECT
19 public:
20  explicit UrlFileDownload(QObject *parent, QNetworkDiskCache *cache);
21  void begin(const QUrl &url, const pixCacheKey_t &key);
22  void abortAll();
23 
24 signals:
25  void sigDownloadDone(QNetworkReply::NetworkError error, QByteArray &data, pixCacheKey_t &key);
26  void sigAbort();
27 
28 public slots:
29 
30 private slots:
31  void downloadFinished(QNetworkReply *reply);
32 
33 private:
34  QNetworkAccessManager m_manager;
35 };
36 
37 #endif // URLFILEDOWNLOAD_H
Q_OBJECTQ_OBJECT
const QList< QKeySequence > & begin()
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue Aug 9 2022 04:06:07 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.