File indexing completed on 2024-05-12 16:23:41
0001 // SPDX-FileCopyrightText: 2020 Jonah BrĂ¼chert <jbb@kaidan.im> 0002 // 0003 // SPDX-License-Identifier: GPL-2.0-or-later 0004 0005 #pragma once 0006 0007 #include <QObject> 0008 0009 // HACK, because QQuickWebEngineDownloadItem is not public API yet 0010 // Teach the compiler that QQuickWebEngineDownloadItem is a QObject subclass, 0011 // Because it can't know due to the forward declaration 0012 class QQuickWebEngineDownloadItem : public QObject 0013 { 0014 public: 0015 enum State { 0016 DownloadRequested, 0017 DownloadInProgress, 0018 DownloadCompleted, 0019 DownloadCancelled, 0020 DownloadInterrupted, 0021 }; 0022 0023 QQuickWebEngineDownloadItem() = delete; // Created by the WebEngine, accessible in AngelfishWebProfile 0024 0025 void accept(); 0026 void cancel(); 0027 void pause(); 0028 void resume(); 0029 0030 QString downloadDirectory() const; 0031 QString downloadFileName() const; 0032 QUrl url() const; 0033 QString mimeType() const; 0034 State state() const; 0035 QString interruptReasonString() const; 0036 };