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
7
9
10namespace QtWaylandClient {
11
16
24
30
36
41
46
48 struct ::wl_surface *surface,
50{
51#ifndef QT_NO_GESTURES
53 if (!mFocus) {
54 return;
55 }
58
59 const auto* pointer = mParent->pointer();
60
61 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_swipe_v1_begin @ "
62 << pointer->mSurfacePos << "fingers" << fingers;
63
66 QPointF());
67
69#endif
70}
71
74{
75#ifndef QT_NO_GESTURES
76 if (!mFocus) {
77 return;
78 }
79 const auto* pointer = mParent->pointer();
80
82 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_swipe_v1_update @ "
83 << pointer->mSurfacePos << "delta" << delta;
84
87
89#endif
90}
91
94{
95#ifndef QT_NO_GESTURES
96 if (!mFocus) {
97 return;
98 }
100 const auto* pointer = mParent->pointer();
101
102 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_swipe_v1_end @ "
103 << pointer->mSurfacePos << (cancelled ? "CANCELED" : "");
104
106
109 QPointF());
110
112
113 mFocus.clear();
114 mFingers = 0;
115#endif
116}
117
122
127
129 struct ::wl_surface *surface,
131{
132#ifndef QT_NO_GESTURES
134 if (!mFocus) {
135 return;
136 }
139 mLastScale = 1;
140 const auto* pointer = mParent->pointer();
141
142 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_pinch_v1_begin @ "
143 << pointer->mSurfacePos << "fingers" << fingers;
144
147 QPointF(), 0, 0);
148
150#endif
151}
152
157{
158#ifndef QT_NO_GESTURES
159 if (!mFocus) {
160 return;
161 }
162 const auto* pointer = mParent->pointer();
163
167 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_pinch_v1_update @ "
168 << pointer->mSurfacePos << "delta" << delta
169 << "scale" << mLastScale << "->" << rscale
170 << "delta" << rscale - mLastScale << "rot" << rot;
171
175
177
179#endif
180}
181
184{
185#ifndef QT_NO_GESTURES
186 if (!mFocus) {
187 return;
188 }
190 const auto* pointer = mParent->pointer();
191
192 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_swipe_v1_end @ "
193 << pointer->mSurfacePos << (cancelled ? "CANCELED" : "");
194
196
199 QPointF(), 0, 0);
200
202
203 mFocus.clear();
204 mFingers = 0;
205 mLastScale = 1;
206#endif
207}
208
209} // namespace QtWaylandClient
210
211QT_END_NAMESPACE
Combined button and popup list for selecting options.