blob: 9e3cb6f4658434d722412c992935fef01b1f6ecf (
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
|
// Copyright (C) 2023 Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//![0]
import QtQuick
Item {
id: feedbackPane
width: 480; height: 320
PointHandler {
id: control
acceptedModifiers: Qt.ControlModifier
cursorShape: Qt.PointingHandCursor
target: Rectangle {
parent: feedbackPane
color: control.active ? "indianred" : "khaki"
x: control.point.position.x - width / 2
y: control.point.position.y - height / 2
width: 20; height: width; radius: width / 2
}
}
PointHandler {
id: shift
acceptedModifiers: Qt.ShiftModifier | Qt.MetaModifier
cursorShape: Qt.CrossCursor
target: Rectangle {
parent: feedbackPane
color: shift.active ? "darkslateblue" : "lightseagreen"
x: shift.point.position.x - width / 2
y: shift.point.position.y - height / 2
width: 30; height: width; radius: width / 2
}
}
}
//![0]
|