File indexing completed on 2025-01-19 04:22:54
0001 // SPDX-FileCopyrightText: 2020 Jonah BrĂ¼chert <jbb@kaidan.im> 0002 // 0003 // SPDX-License-Identifier: GPL-2.0-or-later 0004 0005 #include "qquickwebenginedownloaditem.h" 0006 0007 #include <QMetaObject> 0008 #include <QUrl> 0009 #include <QVariant> 0010 0011 void QQuickWebEngineDownloadItem::accept() 0012 { 0013 QMetaObject::invokeMethod(this, "accept"); 0014 } 0015 0016 void QQuickWebEngineDownloadItem::cancel() 0017 { 0018 QMetaObject::invokeMethod(this, "cancel"); 0019 } 0020 0021 void QQuickWebEngineDownloadItem::pause() 0022 { 0023 QMetaObject::invokeMethod(this, "pause"); 0024 } 0025 0026 void QQuickWebEngineDownloadItem::resume() 0027 { 0028 QMetaObject::invokeMethod(this, "resume"); 0029 } 0030 0031 QString QQuickWebEngineDownloadItem::downloadDirectory() const 0032 { 0033 return property("downloadDirectory").value<QString>(); 0034 } 0035 0036 QString QQuickWebEngineDownloadItem::downloadFileName() const 0037 { 0038 return property("downloadFileName").value<QString>(); 0039 } 0040 0041 QUrl QQuickWebEngineDownloadItem::url() const 0042 { 0043 return property("url").value<QUrl>(); 0044 } 0045 0046 QString QQuickWebEngineDownloadItem::mimeType() const 0047 { 0048 return property("mimeType").value<QString>(); 0049 } 0050 0051 QQuickWebEngineDownloadItem::State QQuickWebEngineDownloadItem::state() const 0052 { 0053 return static_cast<State>(property("state").value<int>()); 0054 } 0055 0056 QString QQuickWebEngineDownloadItem::interruptReasonString() const 0057 { 0058 return property("interruptReasonString").toString(); 0059 }