Metadata QML Type
Provides additional properties for downloads. More...
Import Statement: | import Lomiri.DownloadManager 1.2 |
Properties
- custom : array
- extract : bool
- showInIndicator : bool
- title : string
Detailed Description
Metadata provides the ability to set a number of special properties on a SingleDownload, e.g. to display a download in the transfer indicator, or automatically extract a download of a zip file upon completion.
Example usage:
import QtQuick 2.0 import Lomiri.Components 1.2 import Lomiri.DownloadManager 1.2 Rectangle { width: units.gu(100) height: units.gu(20) TextField { id: text placeholderText: "File URL to download..." height: 50 anchors { left: parent.left right: button.left rightMargin: units.gu(2) } } Button { id: button text: "Download" height: 50 anchors.right: parent.right onClicked: { single.download(text.text); } } ProgressBar { minimumValue: 0 maximumValue: 100 value: single.progress anchors { left: parent.left right: parent.right bottom: parent.bottom } SingleDownload { id: single metadata: Metadata { showInIndicator: true title: "Example download" } } } }
See also DownloadManager.
Property Documentation
Metadata specific to your application that you wish to associate with this download. This metadata will persist across application restarts.
When set to True the download manager will attempt to automatically extract zip files when the download finishes. This property defaults to False.
Specifies whether this download should be displayed in the transfers indicator, defaults to False.
This sets the name to display in the transfer indicator for this download, this property is only used if showInIndicator is True.