blob: d7f9968cf4529557f80659717fb79ab5b54e607c (
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
// Copyright (C) 2021 The Qt Company Ltd.
// Copyright (C) 2019 Luxoft Sweden AB
// Copyright (C) 2018 Pelagicore AG
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtApplicationManager.Application
ApplicationManagerWindow {
id: root
color: "lightgrey"
Rectangle {
anchors.centerIn: parent
width: 180; height: 180; radius: width/4
color: "lightsteelblue"
Image {
source: ApplicationInterface.icon
anchors.centerIn: parent
}
RotationAnimation on rotation {
id: rotation
from: 0; to: 360; loops: Animation.Infinite; duration: 4000
}
MouseArea {
anchors.fill: parent
onClicked: {
if (rotation.paused) {
rotation.resume();
} else {
rotation.pause();
root.setWindowProperty("rotation", parent.rotation);
}
}
}
}
ApplicationManagerWindow {
id: popUp
visible: rotation.paused
color: "orangered"
Text {
anchors.centerIn: parent
text: "App1 paused!"
}
Component.onCompleted: setWindowProperty("type", "pop-up");
}
}
|