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
qmacgesturerecognizer_p.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 QMACSWIPEGESTURERECOGNIZER_MAC_P_H
5#define QMACSWIPEGESTURERECOGNIZER_MAC_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of other Qt classes. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtWidgets/private/qtwidgetsglobal_p.h>
19#include "qpoint.h"
21#include <QtCore/qbasictimer.h>
22#include <QtCore/qobject.h>
23#include <QtCore/qpointer.h>
24
25#ifndef QT_NO_GESTURES
26
27QT_BEGIN_NAMESPACE
28
29class QMacSwipeGestureRecognizer : public QGestureRecognizer
30{
31public:
32 QMacSwipeGestureRecognizer();
33
34 QGesture *create(QObject *target) override;
35 QGestureRecognizer::Result recognize(QGesture *gesture, QObject *watched, QEvent *event) override;
36 void reset(QGesture *gesture) override;
37};
38
40{
41public:
43
44 QGesture *create(QObject *target) override;
46 void reset(QGesture *gesture) override;
47};
48
50{
52public:
54
55 QGesture *create(QObject *target) override;
57 void reset(QGesture *gesture) override;
58protected:
59 void timerEvent(QTimerEvent *ev) override;
60private:
61 QPointF _startPos;
62 QBasicTimer _panTimer;
63 bool _panCanceled;
64 QPointer<QObject> _target;
65};
66
67QT_END_NAMESPACE
68
69#endif // QT_NO_GESTURES
70
71#endif // QMACSWIPEGESTURERECOGNIZER_MAC_P_H
void reset(QGesture *gesture) override
This function is called by the framework to reset a given gesture.
QGesture * create(QObject *target) override
This function is called by Qt to create a new QGesture object for the given target (QWidget or QGraph...
void timerEvent(QTimerEvent *ev) override
This event handler can be reimplemented in a subclass to receive timer events for the object.
void reset(QGesture *gesture) override
This function is called by the framework to reset a given gesture.
QGesture * create(QObject *target) override
This function is called by Qt to create a new QGesture object for the given target (QWidget or QGraph...
\inmodule QtCore\reentrant
Definition qpoint.h:217
Combined button and popup list for selecting options.