Warning, /sdk/selenium-webdriver-at-spi/autotests/pointerinput.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0002 // SPDX-FileCopyrightText: 2024 Fushan Wen <qydwhotmail@gmail.com> 0003 0004 import QtQuick 2.15 0005 import QtQuick.Window 2.15 0006 0007 Item { 0008 width: Screen.width 0009 height: Screen.height 0010 0011 TextInput { 0012 id: result 0013 Accessible.name: "result" 0014 } 0015 0016 TapHandler { 0017 acceptedButtons: Qt.LeftButton 0018 acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad 0019 onTapped: result.text = "mouse left" 0020 } 0021 0022 TapHandler { 0023 acceptedButtons: Qt.RightButton 0024 acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad 0025 onTapped: result.text = "mouse right" 0026 } 0027 0028 TapHandler { 0029 acceptedButtons: Qt.MiddleButton 0030 acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad 0031 onTapped: result.text = "mouse middle" 0032 } 0033 0034 TapHandler { 0035 acceptedDevices: PointerDevice.TouchScreen 0036 onTapped: result.text = "touchscreen" 0037 onLongPressed: result.text = "touchscreen longpressed" 0038 } 0039 0040 TapHandler { 0041 acceptedDevices: PointerDevice.Stylus 0042 onTapped: result.text = "stylus" 0043 } 0044 0045 DragHandler { 0046 target: result 0047 onActiveChanged: if (active) result.text = "dragged" 0048 } 0049 0050 WheelHandler { 0051 onWheel: wheel => result.text = `wheel ${wheel.angleDelta.x} ${wheel.angleDelta.y}` 0052 } 0053 }