Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
119
126
141
150{
151 if (gesture) {
152 QGesturePrivate *d = gesture->d_func();
154 d->hotSpot = QPointF();
155 d->sceneHotSpot = QPointF();
156 d->isHotSpotSet = false;
157 }
158}
159
188{
189 return QGestureManager::instance()->registerGestureRecognizer(recognizer);
190}
191
198{
199 auto qAppPriv = QApplicationPrivate::instance();
200 if (!qAppPriv)
201 return;
202 if (!qAppPriv->gestureManager)
203 return;
204 QGestureManager::instance()->unregisterGestureRecognizer(type);
205}
206
208
209#endif // QT_NO_GESTURES
static QApplicationPrivate * instance()
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
Qt::GestureState state
the current state of the gesture
Definition qgesture.h:33
\inmodule QtCore
Definition qobject.h:103
\inmodule QtCore\reentrant
Definition qpoint.h:217
Combined button and popup list for selecting options.
@ NoGesture
GestureType
GLenum type
GLenum target
#define Q_UNUSED(x)