[−][src]Struct qt_widgets::QGesture
The QGesture class represents a gesture, containing properties that describe the corresponding user input.
C++ class: QGesture
.
The QGesture class represents a gesture, containing properties that describe the corresponding user input.
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 Gestures in Widgets and Graphics View document.
Methods
impl QGesture
[src]
pub unsafe fn gesture_cancel_policy(&self) -> GestureCancelPolicy
[src]
This property holds the policy for deciding what happens on accepting a gesture
Calls C++ function: QGesture::GestureCancelPolicy QGesture::gestureCancelPolicy() const
.
This property holds 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.
Access functions:
GestureCancelPolicy | gestureCancelPolicy() const |
void | setGestureCancelPolicy(GestureCancelPolicy policy) |
pub unsafe fn gesture_type(&self) -> GestureType
[src]
This property holds the type of the gesture
Calls C++ function: Qt::GestureType QGesture::gestureType() const
.
This property holds the type of the gesture
Access functions:
Qt::GestureType | gestureType() const |
pub unsafe fn has_hot_spot(&self) -> bool
[src]
This property holds whether the gesture has a hot-spot
Calls C++ function: bool QGesture::hasHotSpot() const
.
This property holds whether the gesture has a hot-spot
Access functions:
bool | hasHotSpot() const |
pub unsafe fn hot_spot(&self) -> CppBox<QPointF>
[src]
This property holds the point that is used to find the receiver for the gesture event.
Calls C++ function: QPointF QGesture::hotSpot() const
.
This property holds 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.
Access functions:
QPointF | hotSpot() const |
void | setHotSpot(const QPointF &value) |
void | unsetHotSpot() |
pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>
[src]
Calls C++ function: virtual const QMetaObject* QGesture::metaObject() const
.
pub unsafe fn new_1a(parent: impl CastInto<MutPtr<QObject>>) -> CppBox<QGesture>
[src]
Constructs a new gesture object with the given parent.
Calls C++ function: [constructor] void QGesture::QGesture(QObject* parent = …)
.
Constructs a new gesture object with the given parent.
QGesture objects are created by gesture recognizers in the QGestureRecognizer::create() function.
pub unsafe fn new_0a() -> CppBox<QGesture>
[src]
The QGesture class represents a gesture, containing properties that describe the corresponding user input.
Calls C++ function: [constructor] void QGesture::QGesture()
.
The QGesture class represents a gesture, containing properties that describe the corresponding user input.
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 Gestures in Widgets and Graphics View document.
pub unsafe fn qt_metacall(
&mut self,
arg1: Call,
arg2: c_int,
arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]
&mut self,
arg1: Call,
arg2: c_int,
arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
Calls C++ function: virtual int QGesture::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3)
.
pub unsafe fn qt_metacast(
&mut self,
arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]
&mut self,
arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
Calls C++ function: virtual void* QGesture::qt_metacast(const char* arg1)
.
pub unsafe fn set_gesture_cancel_policy(&mut self, policy: GestureCancelPolicy)
[src]
This property holds the policy for deciding what happens on accepting a gesture
Calls C++ function: void QGesture::setGestureCancelPolicy(QGesture::GestureCancelPolicy policy)
.
This property holds 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.
Access functions:
GestureCancelPolicy | gestureCancelPolicy() const |
void | setGestureCancelPolicy(GestureCancelPolicy policy) |
pub unsafe fn set_hot_spot(&mut self, value: impl CastInto<Ref<QPointF>>)
[src]
This property holds the point that is used to find the receiver for the gesture event.
Calls C++ function: void QGesture::setHotSpot(const QPointF& value)
.
This property holds 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.
Access functions:
QPointF | hotSpot() const |
void | setHotSpot(const QPointF &value) |
void | unsetHotSpot() |
pub unsafe fn state(&self) -> GestureState
[src]
This property holds the current state of the gesture
Calls C++ function: Qt::GestureState QGesture::state() const
.
This property holds the current state of the gesture
Access functions:
Qt::GestureState | state() const |
pub unsafe fn static_meta_object() -> Ref<QMetaObject>
[src]
Returns a reference to the staticMetaObject
field.
pub unsafe fn tr(
s: impl CastInto<Ptr<c_char>>,
c: impl CastInto<Ptr<c_char>>,
n: c_int
) -> CppBox<QString>
[src]
s: impl CastInto<Ptr<c_char>>,
c: impl CastInto<Ptr<c_char>>,
n: c_int
) -> CppBox<QString>
Calls C++ function: static QString QGesture::tr(const char* s, const char* c, int n)
.
pub unsafe fn tr_utf8(
s: impl CastInto<Ptr<c_char>>,
c: impl CastInto<Ptr<c_char>>,
n: c_int
) -> CppBox<QString>
[src]
s: impl CastInto<Ptr<c_char>>,
c: impl CastInto<Ptr<c_char>>,
n: c_int
) -> CppBox<QString>
Calls C++ function: static QString QGesture::trUtf8(const char* s, const char* c, int n)
.
pub unsafe fn unset_hot_spot(&mut self)
[src]
This property holds the point that is used to find the receiver for the gesture event.
Calls C++ function: void QGesture::unsetHotSpot()
.
This property holds 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.
Access functions:
QPointF | hotSpot() const |
void | setHotSpot(const QPointF &value) |
void | unsetHotSpot() |
Trait Implementations
impl Deref for QGesture
[src]
type Target = QObject
The resulting type after dereferencing.
fn deref(&self) -> &QObject
[src]
Calls C++ function: QObject* static_cast<QObject*>(QGesture* ptr)
.
impl DerefMut for QGesture
[src]
fn deref_mut(&mut self) -> &mut QObject
[src]
Calls C++ function: QObject* static_cast<QObject*>(QGesture* ptr)
.
impl StaticUpcast<QObject> for QGesture
[src]
unsafe fn static_upcast(ptr: Ptr<QGesture>) -> Ptr<QObject>
[src]
Calls C++ function: QObject* static_cast<QObject*>(QGesture* ptr)
.
unsafe fn static_upcast_mut(ptr: MutPtr<QGesture>) -> MutPtr<QObject>
[src]
Calls C++ function: QObject* static_cast<QObject*>(QGesture* ptr)
.
impl StaticUpcast<QGesture> for QPanGesture
[src]
unsafe fn static_upcast(ptr: Ptr<QPanGesture>) -> Ptr<QGesture>
[src]
Calls C++ function: QGesture* static_cast<QGesture*>(QPanGesture* ptr)
.
unsafe fn static_upcast_mut(ptr: MutPtr<QPanGesture>) -> MutPtr<QGesture>
[src]
Calls C++ function: QGesture* static_cast<QGesture*>(QPanGesture* ptr)
.
impl StaticUpcast<QGesture> for QPinchGesture
[src]
unsafe fn static_upcast(ptr: Ptr<QPinchGesture>) -> Ptr<QGesture>
[src]
Calls C++ function: QGesture* static_cast<QGesture*>(QPinchGesture* ptr)
.
unsafe fn static_upcast_mut(ptr: MutPtr<QPinchGesture>) -> MutPtr<QGesture>
[src]
Calls C++ function: QGesture* static_cast<QGesture*>(QPinchGesture* ptr)
.
impl StaticUpcast<QGesture> for QSwipeGesture
[src]
unsafe fn static_upcast(ptr: Ptr<QSwipeGesture>) -> Ptr<QGesture>
[src]
Calls C++ function: QGesture* static_cast<QGesture*>(QSwipeGesture* ptr)
.
unsafe fn static_upcast_mut(ptr: MutPtr<QSwipeGesture>) -> MutPtr<QGesture>
[src]
Calls C++ function: QGesture* static_cast<QGesture*>(QSwipeGesture* ptr)
.
impl StaticUpcast<QGesture> for QTapGesture
[src]
unsafe fn static_upcast(ptr: Ptr<QTapGesture>) -> Ptr<QGesture>
[src]
Calls C++ function: QGesture* static_cast<QGesture*>(QTapGesture* ptr)
.
unsafe fn static_upcast_mut(ptr: MutPtr<QTapGesture>) -> MutPtr<QGesture>
[src]
Calls C++ function: QGesture* static_cast<QGesture*>(QTapGesture* ptr)
.
impl StaticUpcast<QGesture> for QTapAndHoldGesture
[src]
unsafe fn static_upcast(ptr: Ptr<QTapAndHoldGesture>) -> Ptr<QGesture>
[src]
Calls C++ function: QGesture* static_cast<QGesture*>(QTapAndHoldGesture* ptr)
.
unsafe fn static_upcast_mut(ptr: MutPtr<QTapAndHoldGesture>) -> MutPtr<QGesture>
[src]
Calls C++ function: QGesture* static_cast<QGesture*>(QTapAndHoldGesture* ptr)
.
impl StaticDowncast<QGesture> for QObject
[src]
unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QGesture>
[src]
Calls C++ function: QGesture* static_cast<QGesture*>(QObject* ptr)
.
unsafe fn static_downcast_mut(ptr: MutPtr<QObject>) -> MutPtr<QGesture>
[src]
Calls C++ function: QGesture* static_cast<QGesture*>(QObject* ptr)
.
impl StaticDowncast<QPanGesture> for QGesture
[src]
unsafe fn static_downcast(ptr: Ptr<QGesture>) -> Ptr<QPanGesture>
[src]
Calls C++ function: QPanGesture* static_cast<QPanGesture*>(QGesture* ptr)
.
unsafe fn static_downcast_mut(ptr: MutPtr<QGesture>) -> MutPtr<QPanGesture>
[src]
Calls C++ function: QPanGesture* static_cast<QPanGesture*>(QGesture* ptr)
.
impl StaticDowncast<QPinchGesture> for QGesture
[src]
unsafe fn static_downcast(ptr: Ptr<QGesture>) -> Ptr<QPinchGesture>
[src]
Calls C++ function: QPinchGesture* static_cast<QPinchGesture*>(QGesture* ptr)
.
unsafe fn static_downcast_mut(ptr: MutPtr<QGesture>) -> MutPtr<QPinchGesture>
[src]
Calls C++ function: QPinchGesture* static_cast<QPinchGesture*>(QGesture* ptr)
.
impl StaticDowncast<QSwipeGesture> for QGesture
[src]
unsafe fn static_downcast(ptr: Ptr<QGesture>) -> Ptr<QSwipeGesture>
[src]
Calls C++ function: QSwipeGesture* static_cast<QSwipeGesture*>(QGesture* ptr)
.
unsafe fn static_downcast_mut(ptr: MutPtr<QGesture>) -> MutPtr<QSwipeGesture>
[src]
Calls C++ function: QSwipeGesture* static_cast<QSwipeGesture*>(QGesture* ptr)
.
impl StaticDowncast<QTapGesture> for QGesture
[src]
unsafe fn static_downcast(ptr: Ptr<QGesture>) -> Ptr<QTapGesture>
[src]
Calls C++ function: QTapGesture* static_cast<QTapGesture*>(QGesture* ptr)
.
unsafe fn static_downcast_mut(ptr: MutPtr<QGesture>) -> MutPtr<QTapGesture>
[src]
Calls C++ function: QTapGesture* static_cast<QTapGesture*>(QGesture* ptr)
.
impl StaticDowncast<QTapAndHoldGesture> for QGesture
[src]
unsafe fn static_downcast(ptr: Ptr<QGesture>) -> Ptr<QTapAndHoldGesture>
[src]
Calls C++ function: QTapAndHoldGesture* static_cast<QTapAndHoldGesture*>(QGesture* ptr)
.
unsafe fn static_downcast_mut(
ptr: MutPtr<QGesture>
) -> MutPtr<QTapAndHoldGesture>
[src]
ptr: MutPtr<QGesture>
) -> MutPtr<QTapAndHoldGesture>
Calls C++ function: QTapAndHoldGesture* static_cast<QTapAndHoldGesture*>(QGesture* ptr)
.
impl DynamicCast<QGesture> for QObject
[src]
unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QGesture>
[src]
Calls C++ function: QGesture* dynamic_cast<QGesture*>(QObject* ptr)
.
unsafe fn dynamic_cast_mut(ptr: MutPtr<QObject>) -> MutPtr<QGesture>
[src]
Calls C++ function: QGesture* dynamic_cast<QGesture*>(QObject* ptr)
.
impl DynamicCast<QPanGesture> for QGesture
[src]
unsafe fn dynamic_cast(ptr: Ptr<QGesture>) -> Ptr<QPanGesture>
[src]
Calls C++ function: QPanGesture* dynamic_cast<QPanGesture*>(QGesture* ptr)
.
unsafe fn dynamic_cast_mut(ptr: MutPtr<QGesture>) -> MutPtr<QPanGesture>
[src]
Calls C++ function: QPanGesture* dynamic_cast<QPanGesture*>(QGesture* ptr)
.
impl DynamicCast<QPinchGesture> for QGesture
[src]
unsafe fn dynamic_cast(ptr: Ptr<QGesture>) -> Ptr<QPinchGesture>
[src]
Calls C++ function: QPinchGesture* dynamic_cast<QPinchGesture*>(QGesture* ptr)
.
unsafe fn dynamic_cast_mut(ptr: MutPtr<QGesture>) -> MutPtr<QPinchGesture>
[src]
Calls C++ function: QPinchGesture* dynamic_cast<QPinchGesture*>(QGesture* ptr)
.
impl DynamicCast<QSwipeGesture> for QGesture
[src]
unsafe fn dynamic_cast(ptr: Ptr<QGesture>) -> Ptr<QSwipeGesture>
[src]
Calls C++ function: QSwipeGesture* dynamic_cast<QSwipeGesture*>(QGesture* ptr)
.
unsafe fn dynamic_cast_mut(ptr: MutPtr<QGesture>) -> MutPtr<QSwipeGesture>
[src]
Calls C++ function: QSwipeGesture* dynamic_cast<QSwipeGesture*>(QGesture* ptr)
.
impl DynamicCast<QTapGesture> for QGesture
[src]
unsafe fn dynamic_cast(ptr: Ptr<QGesture>) -> Ptr<QTapGesture>
[src]
Calls C++ function: QTapGesture* dynamic_cast<QTapGesture*>(QGesture* ptr)
.
unsafe fn dynamic_cast_mut(ptr: MutPtr<QGesture>) -> MutPtr<QTapGesture>
[src]
Calls C++ function: QTapGesture* dynamic_cast<QTapGesture*>(QGesture* ptr)
.
impl DynamicCast<QTapAndHoldGesture> for QGesture
[src]
unsafe fn dynamic_cast(ptr: Ptr<QGesture>) -> Ptr<QTapAndHoldGesture>
[src]
Calls C++ function: QTapAndHoldGesture* dynamic_cast<QTapAndHoldGesture*>(QGesture* ptr)
.
unsafe fn dynamic_cast_mut(ptr: MutPtr<QGesture>) -> MutPtr<QTapAndHoldGesture>
[src]
Calls C++ function: QTapAndHoldGesture* dynamic_cast<QTapAndHoldGesture*>(QGesture* ptr)
.
impl CppDeletable for QGesture
[src]
Auto Trait Implementations
impl Send for QGesture
impl Unpin for QGesture
impl Sync for QGesture
impl UnwindSafe for QGesture
impl RefUnwindSafe for QGesture
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
unsafe fn static_upcast_mut(ptr: MutPtr<T>) -> MutPtr<T>
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,