Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwaylandpointergestures.cpp
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
8
10
11namespace QtWaylandClient {
12
17
25
31
37
42
47
49 struct ::wl_surface *surface,
51{
52#ifndef QT_NO_GESTURES
54 if (!mFocus) {
55 return;
56 }
59
60 const auto* pointer = mParent->pointer();
61
62 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_swipe_v1_begin @ "
63 << pointer->mSurfacePos << "fingers" << fingers;
64
67 QPointF());
68
70#endif
71}
72
75{
76#ifndef QT_NO_GESTURES
77 if (!mFocus) {
78 return;
79 }
80 const auto* pointer = mParent->pointer();
81
83 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_swipe_v1_update @ "
84 << pointer->mSurfacePos << "delta" << delta;
85
88
90#endif
91}
92
95{
96#ifndef QT_NO_GESTURES
97 if (!mFocus) {
98 return;
99 }
101 const auto* pointer = mParent->pointer();
102
103 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_swipe_v1_end @ "
104 << pointer->mSurfacePos << (cancelled ? "CANCELED" : "");
105
107
110 QPointF());
111
113
114 mFocus.clear();
115 mFingers = 0;
116#endif
117}
118
123
128
130 struct ::wl_surface *surface,
132{
133#ifndef QT_NO_GESTURES
135 if (!mFocus) {
136 return;
137 }
140 mLastScale = 1;
141 const auto* pointer = mParent->pointer();
142
143 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_pinch_v1_begin @ "
144 << pointer->mSurfacePos << "fingers" << fingers;
145
148 QPointF(), 0, 0);
149
151#endif
152}
153
158{
159#ifndef QT_NO_GESTURES
160 if (!mFocus) {
161 return;
162 }
163 const auto* pointer = mParent->pointer();
164
168 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_pinch_v1_update @ "
169 << pointer->mSurfacePos << "delta" << delta
170 << "scale" << mLastScale << "->" << rscale
171 << "delta" << rscale - mLastScale << "rot" << rot;
172
176
178
180#endif
181}
182
185{
186#ifndef QT_NO_GESTURES
187 if (!mFocus) {
188 return;
189 }
191 const auto* pointer = mParent->pointer();
192
193 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_swipe_v1_end @ "
194 << pointer->mSurfacePos << (cancelled ? "CANCELED" : "");
195
197
200 QPointF(), 0, 0);
201
203
204 mFocus.clear();
205 mFingers = 0;
206 mLastScale = 1;
207#endif
208}
209
210} // namespace QtWaylandClient
211
212QT_END_NAMESPACE
Combined button and popup list for selecting options.