Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qgesturerecognizer.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 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
5
6#include "private/qgesture_p.h"
7#include "private/qgesturemanager_p.h"
8#include "private/qapplication_p.h"
9
10#ifndef QT_NO_GESTURES
11
13
117{
118}
119
124{
125}
126
137{
139 return new QGesture;
140}
141
150{
151 if (gesture) {
152 QGesturePrivate *d = gesture->d_func();
153 d->state = Qt::NoGesture;
154 d->hotSpot = QPointF();
155 d->sceneHotSpot = QPointF();
156 d->isHotSpotSet = false;
157 }
158}
159
188{
190}
191
198{
199 auto qAppPriv = QApplicationPrivate::instance();
200 if (!qAppPriv)
201 return;
202 if (!qAppPriv->gestureManager)
203 return;
205}
206
208
209#endif // QT_NO_GESTURES
static QApplicationPrivate * instance()
Qt::GestureType registerGestureRecognizer(QGestureRecognizer *recognizer)
void unregisterGestureRecognizer(Qt::GestureType type)
static QGestureManager * instance(InstanceCreation ic=ForceCreation)
The QGestureRecognizer class provides the infrastructure for gesture recognition.\inmodule QtWidgets.
static void unregisterRecognizer(Qt::GestureType type)
Unregisters all gesture recognizers of the specified type.
virtual void reset(QGesture *state)
This function is called by the framework to reset a given gesture.
QGestureRecognizer()
Constructs a new gesture recognizer object.
static Qt::GestureType registerRecognizer(QGestureRecognizer *recognizer)
Registers the given recognizer in the gesture framework and returns a gesture ID for it.
virtual QGesture * create(QObject *target)
This function is called by Qt to create a new QGesture object for the given target (QWidget or QGraph...
virtual ~QGestureRecognizer()
Destroys the gesture recognizer.
The QGesture class represents a gesture, containing properties that describe the corresponding user i...
Definition qgesture.h:29
\inmodule QtCore
Definition qobject.h:90
\inmodule QtCore\reentrant
Definition qpoint.h:214
Combined button and popup list for selecting options.
@ NoGesture
GestureType
GLenum type
GLenum target
#define Q_UNUSED(x)