Albert
Loading...
Searching...
No Matches
filedownloader.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2025 Manuel Schneider
2// SPDX-License-Identifier: MIT
3
4#pragma once
5#include <QObject>
6#include <QString>
7#include <QUrl>
8#include <albert/export.h>
9class QNetworkReply;
10
11namespace albert::util
12{
13
14class ALBERT_EXPORT FileDownloader : public QObject
15{
16 Q_OBJECT
17public:
18
19 FileDownloader(const QUrl &url, const QString &path, QObject *parent = nullptr);
20
21 void start();
22
23 const QUrl url;
24 const QString path;
25
26signals:
27
28 void finished(bool success, const QString &path_or_error);
29
30private:
31
32 Q_INVOKABLE void _start();
33 QNetworkReply *reply;
34
35};
36
37}
Definition filedownloader.h:15
const QString path
Definition filedownloader.h:24
const QUrl url
Definition filedownloader.h:23
FileDownloader(const QUrl &url, const QString &path, QObject *parent=nullptr)
void finished(bool success, const QString &path_or_error)
Definition backgroundexecutor.h:12