Warning, file /include/QtWidgets/qgesturerecognizer.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004 #ifndef QGESTURERECOGNIZER_H
0005 #define QGESTURERECOGNIZER_H
0006
0007 #include <QtWidgets/qtwidgetsglobal.h>
0008 #include <QtCore/qnamespace.h>
0009
0010 #ifndef QT_NO_GESTURES
0011
0012 QT_BEGIN_NAMESPACE
0013
0014
0015 class QObject;
0016 class QEvent;
0017 class QGesture;
0018 class Q_WIDGETS_EXPORT QGestureRecognizer
0019 {
0020 public:
0021 enum ResultFlag
0022 {
0023 Ignore = 0x0001,
0024
0025 MayBeGesture = 0x0002,
0026 TriggerGesture = 0x0004,
0027 FinishGesture = 0x0008,
0028 CancelGesture = 0x0010,
0029
0030 ResultState_Mask = 0x00ff,
0031
0032 ConsumeEventHint = 0x0100,
0033
0034
0035
0036
0037 ResultHint_Mask = 0xff00
0038 };
0039 Q_DECLARE_FLAGS(Result, ResultFlag)
0040
0041 QGestureRecognizer();
0042 virtual ~QGestureRecognizer();
0043
0044 virtual QGesture *create(QObject *target);
0045 virtual Result recognize(QGesture *state, QObject *watched,
0046 QEvent *event) = 0;
0047 virtual void reset(QGesture *state);
0048
0049 static Qt::GestureType registerRecognizer(QGestureRecognizer *recognizer);
0050 static void unregisterRecognizer(Qt::GestureType type);
0051 };
0052
0053 Q_DECLARE_OPERATORS_FOR_FLAGS(QGestureRecognizer::Result)
0054
0055 QT_END_NAMESPACE
0056
0057 #endif
0058
0059 #endif