summaryrefslogtreecommitdiff
path: root/examples/applicationmanager/frame-timer/apps/frame-timer.fish/fish.qml
blob: a18104e4a16d1b7ba024fc8a3c3f8c8271fe8348 (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
// 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 2.4
import QtApplicationManager.Application 2.0

ApplicationManagerWindow {
    id: root
    color: mouseArea.pressed ? "red" : "darkblue"

    Rectangle {
        id: rectangle
        anchors.centerIn: parent
        width: 180; height: 180; radius: width/4
        color: "aqua"

        Image {
            source: ApplicationInterface.icon
            anchors.centerIn: parent
        }

        Timer {
            running: true
            repeat: true
            interval: 1000 / 25 // 25 frames per second
            onTriggered: {
                rectangle.rotation = (rectangle.rotation + 5) % 360;
            }
        }
    }

    MouseArea {
        id: mouseArea
        anchors.fill: parent
    }
}