Debian Codegraph @

modules/Lomiri/Components/Extras/qml5/PhotoEditor/BusyIndicator.qml

raw
1 /*
2 * Copyright (C) 2015 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17 import QtQuick 2.9
18 import Lomiri.Components 1.3
19
20 Item {
21 id: busy
22 property alias text: label.text
23 property alias running: spinner.running
24 property bool longOperation: false
25
26 visible: running
27
28 LomiriShape {
29 id: busyLomiriShape
30 objectName: "busyLomiriShape"
31 backgroundColor: theme.palette.normal.background
32 anchors.centerIn: parent
33 width: parent.width + units.gu(4)
34 height: parent.height + units.gu(4)
35 opacity: longOperation ? 0.75 : 0
36 }
37
38 Column {
39 id: busyColumn
40 objectName: "busyColumn"
41 anchors.centerIn: parent
42 spacing: units.gu(2)
43
44 ActivityIndicator {
45 id: spinner
46 anchors.horizontalCenter: parent.horizontalCenter
47 }
48
49 Label {
50 id: label
51 objectName: "busyLabel"
52 anchors.horizontalCenter: parent.horizontalCenter
53 horizontalAlignment: Text.AlignHCenter
54 visible: longOperation
55 }
56 }
57 }