QtBase
v6.3.1
|
The QGesture class represents a gesture, containing properties that describe the corresponding user input. More...
#include <qgesture.h>
Public Types | |
enum | GestureCancelPolicy { CancelNone = 0 , CancelAllInContext } |
Protected Member Functions | |
QGesture (QGesturePrivate &dd, QObject *parent) | |
Protected Member Functions inherited from QObject | |
QObject * | sender () const |
int | senderSignalIndex () const |
int | receivers (const char *signal) const |
bool | isSignalConnected (const QMetaMethod &signal) const |
virtual void | timerEvent (QTimerEvent *event) |
virtual void | childEvent (QChildEvent *event) |
virtual void | customEvent (QEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
QObject (QObjectPrivate &dd, QObject *parent=nullptr) | |
Properties | |
Qt::GestureState | state |
the current state of the gesture More... | |
Qt::GestureType | gestureType |
the type of the gesture More... | |
QGesture::GestureCancelPolicy | gestureCancelPolicy |
the policy for deciding what happens on accepting a gesture More... | |
QPointF | hotSpot |
The point that is used to find the receiver for the gesture event. More... | |
bool | hasHotSpot |
whether the gesture has a hot-spot More... | |
Properties inherited from QObject | |
QString | objectName |
the name of this object More... | |
Friends | |
class | QGestureEvent |
class | QGestureRecognizer |
class | QGestureManager |
class | QGraphicsScenePrivate |
The QGesture class represents a gesture, containing properties that describe the corresponding user input.
\inmodule QtWidgets
Gesture objects are not constructed directly by developers. They are created by the QGestureRecognizer object that is registered with the application; see QGestureRecognizer::registerRecognizer().
For an overview of gesture handling in Qt and information on using gestures in your applications, see the \l{Gestures in Widgets and Graphics View} document.
Definition at line 61 of file qgesture.h.
This enum describes how accepting a gesture can cancel other gestures automatically.
\value CancelNone On accepting this gesture no other gestures will be affected.
\value CancelAllInContext On accepting this gesture all gestures that are active in the context (respecting the Qt::GestureFlag that were specified when subscribed to the gesture) will be cancelled.
Enumerator | |
---|---|
CancelNone | |
CancelAllInContext |
Definition at line 86 of file qgesture.h.
Constructs a new gesture object with the given parent.
QGesture objects are created by gesture recognizers in the QGestureRecognizer::create() function.
Definition at line 104 of file qgesture.cpp.
QGesture::~QGesture | ( | ) |
Destroys the gesture object.
Definition at line 121 of file qgesture.cpp.
|
protected |
Definition at line 113 of file qgesture.cpp.
QGesture::GestureCancelPolicy QGesture::gestureCancelPolicy | ( | ) | const |
Definition at line 214 of file qgesture.cpp.
Qt::GestureType QGesture::gestureType | ( | ) | const |
Definition at line 153 of file qgesture.cpp.
bool QGesture::hasHotSpot | ( | ) | const |
Definition at line 175 of file qgesture.cpp.
QPointF QGesture::hotSpot | ( | ) | const |
Definition at line 163 of file qgesture.cpp.
void QGesture::setGestureCancelPolicy | ( | GestureCancelPolicy | policy | ) |
Qt::GestureState QGesture::state | ( | ) | const |
Definition at line 158 of file qgesture.cpp.
void QGesture::unsetHotSpot | ( | ) |
Definition at line 180 of file qgesture.cpp.
|
friend |
Definition at line 98 of file qgesture.h.
|
friend |
Definition at line 100 of file qgesture.h.
|
friend |
Definition at line 99 of file qgesture.h.
|
friend |
Definition at line 101 of file qgesture.h.
|
readwrite |
the policy for deciding what happens on accepting a gesture
On accepting one gesture Qt can automatically cancel other gestures that belong to other targets. The policy is normally set to not cancel any other gestures and can be set to cancel all active gestures in the context. For example for all child widgets.
Definition at line 324 of file qgesture.h.
|
read |
the type of the gesture
Definition at line 324 of file qgesture.h.
|
read |
whether the gesture has a hot-spot
Definition at line 324 of file qgesture.h.
|
readwrite |
The point that is used to find the receiver for the gesture event.
The hot-spot is a point in the global coordinate system, use QWidget::mapFromGlobal() or QGestureEvent::mapToGraphicsScene() to get a local hot-spot.
The hot-spot should be set by the gesture recognizer to allow gesture event delivery to a QGraphicsObject.
Definition at line 324 of file qgesture.h.
|
read |
the current state of the gesture
Definition at line 324 of file qgesture.h.