Kirigami-addons

DownloadAction.qml
1// SPDX-FileCopyrightText: 2023 James Graham <james.h.graham@protonmail.com>
2// SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
3
4import QtQuick 2.15
5import QtQuick.Controls 2.15 as QQC2
6
7import org.kde.kirigami 2.15 as Kirigami
8
9/**
10 * @brief An action for with bindings for managing the download of a piece of media.
11 *
12 * The action provides properties to help track progress but is up to the action
13 * representation to respond to them. The onTriggered() signal should be used to
14 * perform the download action itself.
15 *
16 * The most common use case for this is where a custom URI scheme is used that a
17 * QML media component can't handle on it's own.
18 */
19Kirigami.Action {
20 id: root
22 /**
23 * @brief The download progress between 0% and 100%.
24 */
25 property real progress: -1
27 /**
28 * @brief Whether the download has started.
29 */
30 readonly property bool started: progress > 0.0
32 /**
33 * @brief Whether the download has completed.
34 */
35 readonly property bool completed: progress >= 100.0
36
37 text: i18nd("kirigami-addons6", "Download")
38 icon.name: "download"
39}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:12:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.