summaryrefslogtreecommitdiffstats
path: root/tests/manual/quick/touchbrowser/MockTouchPoint.qml
blob: 895e12e70a6d41d2e4023c70da97c808944cb8c4 (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
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
import QtQuick

Item {
    id: mockTouchPoint

    property bool pressed: false
    property int pointId: 0

    Image {
        source: "qrc:/touchpoint.png"
        x: -(width / 2)
        y: -(height / 2)
        opacity: mockTouchPoint.pressed ? 0.6 : 0.0

        Behavior on opacity {
            NumberAnimation { duration: 200 }
        }

        Text {
            text: mockTouchPoint.pointId
            anchors.centerIn: parent
        }
    }
}