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.h
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
4#ifndef QGESTURERECOGNIZER_H
5#define QGESTURERECOGNIZER_H
6
7#include <QtWidgets/qtwidgetsglobal.h>
8#include <QtCore/qnamespace.h>
9
10#ifndef QT_NO_GESTURES
11
13
14
15class QObject;
16class QEvent;
17class QGesture;
18class Q_WIDGETS_EXPORT QGestureRecognizer
19{
20public:
22 {
23 Ignore = 0x0001,
24
25 MayBeGesture = 0x0002,
26 TriggerGesture = 0x0004,
27 FinishGesture = 0x0008,
28 CancelGesture = 0x0010,
29
30 ResultState_Mask = 0x00ff,
31
32 ConsumeEventHint = 0x0100,
33 // StoreEventHint = 0x0200,
34 // ReplayStoredEventsHint = 0x0400,
35 // DiscardStoredEventsHint = 0x0800,
36
37 ResultHint_Mask = 0xff00
38 };
39 Q_DECLARE_FLAGS(Result, ResultFlag)
40
42 virtual ~QGestureRecognizer();
43
44 virtual QGesture *create(QObject *target);
45 virtual Result recognize(QGesture *state, QObject *watched,
46 QEvent *event) = 0;
47 virtual void reset(QGesture *state);
48
49 static Qt::GestureType registerRecognizer(QGestureRecognizer *recognizer);
50 static void unregisterRecognizer(Qt::GestureType type);
51};
52
53Q_DECLARE_OPERATORS_FOR_FLAGS(QGestureRecognizer::Result)
54
56
57#endif // QT_NO_GESTURES
58
59#endif // QGESTURERECOGNIZER_H
\inmodule QtCore
Definition qcoreevent.h:45
The QGestureRecognizer class provides the infrastructure for gesture recognition.\inmodule QtWidgets.
ResultFlag
This enum describes the result of the current event filtering step in a gesture recognizer state mach...
virtual Result recognize(QGesture *state, QObject *watched, QEvent *event)=0
Handles the given event for the watched object, updating the state of the gesture object as required,...
The QGesture class represents a gesture, containing properties that describe the corresponding user i...
Definition qgesture.h:29
\inmodule QtCore
Definition qobject.h:103
else opt state
[0]
Combined button and popup list for selecting options.
GestureType
#define Q_DECLARE_FLAGS(Flags, Enum)
Definition qflags.h:174
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
Definition qflags.h:194
GLenum type
GLenum target
struct _cl_event * event
GLboolean reset
view create()