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
16class UrlFileDownload : public QObject
17{
19public:
20 explicit UrlFileDownload(QObject *parent, QNetworkDiskCache *cache);
21 void begin(const QUrl &url, const pixCacheKey_t &key);
22 void abortAll();
23
24signals:
25 void sigDownloadDone(QNetworkReply::NetworkError error, QByteArray &data, pixCacheKey_t &key);
26 void sigAbort();
27
28public slots:
29
30private slots:
31 void downloadFinished(QNetworkReply *reply);
32
33private:
34 QNetworkAccessManager m_manager;
35};
36
37#endif // URLFILEDOWNLOAD_H
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:41 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.