aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/studiowelcome/qml/downloaddialog/mockData/ExampleCheckout/FileDownloader.qml
blob: 2fd4de0c5e861d8c1daed3e7a9880542db9b7910 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0

import QtQuick 2.0

QtObject {
    id: root

    signal downloadFailed

    property bool finished: false

    property bool url

    property int progress: 55
    Behavior on progress { PropertyAnimation {
            duration: 2000
        }
    }

    function start() {
        timer.start()
        root.progress = 100

    }

    property Timer timer: Timer {
        interval: 2000
        repeat: false
        onTriggered: {
            root.finished
            root.progress = 1000
            finished = true
        }

    }
}