[][src]Struct qt_widgets::QPinchGesture

#[repr(C)]pub struct QPinchGesture { /* fields omitted */ }

The QPinchGesture class describes a pinch gesture made by the user.

C++ class: QPinchGesture.

C++ documentation:

The QPinchGesture class describes a pinch gesture made by the user.

A pinch gesture is a form of touch user input in which the user typically touches two points on the input device with a thumb and finger, before moving them closer together or further apart to change the scale factor, zoom, or level of detail of the user interface.

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.

Instead of repeatedly applying the same pinching gesture, the user may continue to touch the input device in one place, and apply a second touch to a new point, continuing the gesture. When this occurs, gesture events will continue to be delivered to the target object, containing an instance of QPinchGesture in the Qt::GestureUpdated state.

Methods

impl QPinchGesture[src]

pub unsafe fn center_point(&self) -> CppBox<QPointF>[src]

This property holds the current center point

Calls C++ function: QPointF QPinchGesture::centerPoint() const.

C++ documentation:

This property holds the current center point

The center point is the midpoint between the two input points in the gesture.

Access functions:

QPointF centerPoint() const
void setCenterPoint(const QPointF &value)

See also startCenterPoint and lastCenterPoint.

pub unsafe fn change_flags(&self) -> QFlags<ChangeFlag>[src]

This property holds the property of the gesture that has changed in the current step

Calls C++ function: QFlags<QPinchGesture::ChangeFlag> QPinchGesture::changeFlags() const.

C++ documentation:

This property holds the property of the gesture that has changed in the current step

This property indicates which of the other properties has changed since the previous gesture event included information about this gesture. You can use this information to determine which aspect of your user interface needs to be updated.

Access functions:

ChangeFlags changeFlags() const
void setChangeFlags(ChangeFlags value)

See also totalChangeFlags, scaleFactor, rotationAngle, and centerPoint.

pub unsafe fn last_center_point(&self) -> CppBox<QPointF>[src]

This property holds the last position of the center point recorded for this gesture

Calls C++ function: QPointF QPinchGesture::lastCenterPoint() const.

C++ documentation:

This property holds the last position of the center point recorded for this gesture

Access functions:

QPointF lastCenterPoint() const
void setLastCenterPoint(const QPointF &value)

See also centerPoint and startCenterPoint.

pub unsafe fn last_rotation_angle(&self) -> c_double[src]

This property holds the last reported angle covered by the gesture motion

Calls C++ function: double QPinchGesture::lastRotationAngle() const.

C++ documentation:

This property holds the last reported angle covered by the gesture motion

The last rotation angle is the angle as reported in the rotationAngle property when a previous gesture event was delivered for this gesture.

Access functions:

qreal lastRotationAngle() const
void setLastRotationAngle(qreal value)

See also rotationAngle and totalRotationAngle.

pub unsafe fn last_scale_factor(&self) -> c_double[src]

This property holds the last scale factor recorded for this gesture

Calls C++ function: double QPinchGesture::lastScaleFactor() const.

C++ documentation:

This property holds the last scale factor recorded for this gesture

The last scale factor contains the scale factor reported in the scaleFactor property when a previous gesture event included information about this gesture.

If no previous event was delivered with information about this gesture (i.e., this gesture object contains information about the first movement in the gesture) then this property contains zero.

Access functions:

qreal lastScaleFactor() const
void setLastScaleFactor(qreal value)

See also scaleFactor and totalScaleFactor.

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QPinchGesture::metaObject() const.

pub unsafe fn new_1a(parent: impl CastInto<Ptr<QObject>>) -> QBox<QPinchGesture>[src]

Calls C++ function: [constructor] void QPinchGesture::QPinchGesture(QObject* parent = …).

pub unsafe fn new_0a() -> QBox<QPinchGesture>[src]

The QPinchGesture class describes a pinch gesture made by the user.

Calls C++ function: [constructor] void QPinchGesture::QPinchGesture().

C++ documentation:

The QPinchGesture class describes a pinch gesture made by the user.

A pinch gesture is a form of touch user input in which the user typically touches two points on the input device with a thumb and finger, before moving them closer together or further apart to change the scale factor, zoom, or level of detail of the user interface.

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.

Instead of repeatedly applying the same pinching gesture, the user may continue to touch the input device in one place, and apply a second touch to a new point, continuing the gesture. When this occurs, gesture events will continue to be delivered to the target object, containing an instance of QPinchGesture in the Qt::GestureUpdated state.

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QPinchGesture::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* QPinchGesture::qt_metacast(const char* arg1).

pub unsafe fn rotation_angle(&self) -> c_double[src]

This property holds the angle covered by the gesture motion

Calls C++ function: double QPinchGesture::rotationAngle() const.

C++ documentation:

This property holds the angle covered by the gesture motion

Access functions:

qreal rotationAngle() const
void setRotationAngle(qreal value)

See also totalRotationAngle and lastRotationAngle.

pub unsafe fn scale_factor(&self) -> c_double[src]

This property holds the current scale factor

Calls C++ function: double QPinchGesture::scaleFactor() const.

C++ documentation:

This property holds the current scale factor

The scale factor measures the scale factor associated with the distance between two of the user's inputs on a touch device.

Access functions:

qreal scaleFactor() const
void setScaleFactor(qreal value)

See also totalScaleFactor and lastScaleFactor.

pub unsafe fn set_center_point(&self, value: impl CastInto<Ref<QPointF>>)[src]

This property holds the current center point

Calls C++ function: void QPinchGesture::setCenterPoint(const QPointF& value).

C++ documentation:

This property holds the current center point

The center point is the midpoint between the two input points in the gesture.

Access functions:

QPointF centerPoint() const
void setCenterPoint(const QPointF &value)

See also startCenterPoint and lastCenterPoint.

pub unsafe fn set_change_flags(&self, value: QFlags<ChangeFlag>)[src]

This property holds the property of the gesture that has changed in the current step

Calls C++ function: void QPinchGesture::setChangeFlags(QFlags<QPinchGesture::ChangeFlag> value).

C++ documentation:

This property holds the property of the gesture that has changed in the current step

This property indicates which of the other properties has changed since the previous gesture event included information about this gesture. You can use this information to determine which aspect of your user interface needs to be updated.

Access functions:

ChangeFlags changeFlags() const
void setChangeFlags(ChangeFlags value)

See also totalChangeFlags, scaleFactor, rotationAngle, and centerPoint.

pub unsafe fn set_last_center_point(&self, value: impl CastInto<Ref<QPointF>>)[src]

This property holds the last position of the center point recorded for this gesture

Calls C++ function: void QPinchGesture::setLastCenterPoint(const QPointF& value).

C++ documentation:

This property holds the last position of the center point recorded for this gesture

Access functions:

QPointF lastCenterPoint() const
void setLastCenterPoint(const QPointF &value)

See also centerPoint and startCenterPoint.

pub unsafe fn set_last_rotation_angle(&self, value: c_double)[src]

This property holds the last reported angle covered by the gesture motion

Calls C++ function: void QPinchGesture::setLastRotationAngle(double value).

C++ documentation:

This property holds the last reported angle covered by the gesture motion

The last rotation angle is the angle as reported in the rotationAngle property when a previous gesture event was delivered for this gesture.

Access functions:

qreal lastRotationAngle() const
void setLastRotationAngle(qreal value)

See also rotationAngle and totalRotationAngle.

pub unsafe fn set_last_scale_factor(&self, value: c_double)[src]

This property holds the last scale factor recorded for this gesture

Calls C++ function: void QPinchGesture::setLastScaleFactor(double value).

C++ documentation:

This property holds the last scale factor recorded for this gesture

The last scale factor contains the scale factor reported in the scaleFactor property when a previous gesture event included information about this gesture.

If no previous event was delivered with information about this gesture (i.e., this gesture object contains information about the first movement in the gesture) then this property contains zero.

Access functions:

qreal lastScaleFactor() const
void setLastScaleFactor(qreal value)

See also scaleFactor and totalScaleFactor.

pub unsafe fn set_rotation_angle(&self, value: c_double)[src]

This property holds the angle covered by the gesture motion

Calls C++ function: void QPinchGesture::setRotationAngle(double value).

C++ documentation:

This property holds the angle covered by the gesture motion

Access functions:

qreal rotationAngle() const
void setRotationAngle(qreal value)

See also totalRotationAngle and lastRotationAngle.

pub unsafe fn set_scale_factor(&self, value: c_double)[src]

This property holds the current scale factor

Calls C++ function: void QPinchGesture::setScaleFactor(double value).

C++ documentation:

This property holds the current scale factor

The scale factor measures the scale factor associated with the distance between two of the user's inputs on a touch device.

Access functions:

qreal scaleFactor() const
void setScaleFactor(qreal value)

See also totalScaleFactor and lastScaleFactor.

pub unsafe fn set_start_center_point(&self, value: impl CastInto<Ref<QPointF>>)[src]

This property holds the starting position of the center point

Calls C++ function: void QPinchGesture::setStartCenterPoint(const QPointF& value).

C++ documentation:

This property holds the starting position of the center point

Access functions:

QPointF startCenterPoint() const
void setStartCenterPoint(const QPointF &value)

See also centerPoint and lastCenterPoint.

pub unsafe fn set_total_change_flags(&self, value: QFlags<ChangeFlag>)[src]

This property holds the property of the gesture that has change

Calls C++ function: void QPinchGesture::setTotalChangeFlags(QFlags<QPinchGesture::ChangeFlag> value).

C++ documentation:

This property holds the property of the gesture that has change

This property indicates which of the other properties has changed since the gesture has started. You can use this information to determine which aspect of your user interface needs to be updated.

Access functions:

ChangeFlags totalChangeFlags() const
void setTotalChangeFlags(ChangeFlags value)

See also changeFlags, scaleFactor, rotationAngle, and centerPoint.

pub unsafe fn set_total_rotation_angle(&self, value: c_double)[src]

This property holds the total angle covered by the gesture

Calls C++ function: void QPinchGesture::setTotalRotationAngle(double value).

C++ documentation:

This property holds the total angle covered by the gesture

This total angle measures the complete angle covered by the gesture. Usually, this is equal to the value held by the rotationAngle property, except in the case where the user performs multiple rotations by removing and repositioning one of the touch points, as described above. In this case, the total angle will be the sum of the rotation angles for the multiple stages of the gesture.

Access functions:

qreal totalRotationAngle() const
void setTotalRotationAngle(qreal value)

See also rotationAngle and lastRotationAngle.

pub unsafe fn set_total_scale_factor(&self, value: c_double)[src]

This property holds the total scale factor

Calls C++ function: void QPinchGesture::setTotalScaleFactor(double value).

C++ documentation:

This property holds the total scale factor

The total scale factor measures the total change in scale factor from the original value to the current scale factor.

Access functions:

qreal totalScaleFactor() const
void setTotalScaleFactor(qreal value)

See also scaleFactor and lastScaleFactor.

pub unsafe fn start_center_point(&self) -> CppBox<QPointF>[src]

This property holds the starting position of the center point

Calls C++ function: QPointF QPinchGesture::startCenterPoint() const.

C++ documentation:

This property holds the starting position of the center point

Access functions:

QPointF startCenterPoint() const
void setStartCenterPoint(const QPointF &value)

See also centerPoint and lastCenterPoint.

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn total_change_flags(&self) -> QFlags<ChangeFlag>[src]

This property holds the property of the gesture that has change

Calls C++ function: QFlags<QPinchGesture::ChangeFlag> QPinchGesture::totalChangeFlags() const.

C++ documentation:

This property holds the property of the gesture that has change

This property indicates which of the other properties has changed since the gesture has started. You can use this information to determine which aspect of your user interface needs to be updated.

Access functions:

ChangeFlags totalChangeFlags() const
void setTotalChangeFlags(ChangeFlags value)

See also changeFlags, scaleFactor, rotationAngle, and centerPoint.

pub unsafe fn total_rotation_angle(&self) -> c_double[src]

This property holds the total angle covered by the gesture

Calls C++ function: double QPinchGesture::totalRotationAngle() const.

C++ documentation:

This property holds the total angle covered by the gesture

This total angle measures the complete angle covered by the gesture. Usually, this is equal to the value held by the rotationAngle property, except in the case where the user performs multiple rotations by removing and repositioning one of the touch points, as described above. In this case, the total angle will be the sum of the rotation angles for the multiple stages of the gesture.

Access functions:

qreal totalRotationAngle() const
void setTotalRotationAngle(qreal value)

See also rotationAngle and lastRotationAngle.

pub unsafe fn total_scale_factor(&self) -> c_double[src]

This property holds the total scale factor

Calls C++ function: double QPinchGesture::totalScaleFactor() const.

C++ documentation:

This property holds the total scale factor

The total scale factor measures the total change in scale factor from the original value to the current scale factor.

Access functions:

qreal totalScaleFactor() const
void setTotalScaleFactor(qreal value)

See also scaleFactor and lastScaleFactor.

pub unsafe fn tr(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QPinchGesture::tr(const char* s, const char* c, int n).

pub unsafe fn tr_utf8(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QPinchGesture::trUtf8(const char* s, const char* c, int n).

Methods from Deref<Target = QGesture>

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.

C++ documentation:

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.

C++ documentation:

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.

C++ documentation:

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.

C++ documentation:

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 qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QGesture::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* QGesture::qt_metacast(const char* arg1).

pub unsafe fn set_gesture_cancel_policy(&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).

C++ documentation:

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(&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).

C++ documentation:

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.

C++ documentation:

This property holds the current state of the gesture

Access functions:

Qt::GestureState state() const

pub unsafe fn unset_hot_spot(&self)[src]

This property holds the point that is used to find the receiver for the gesture event.

Calls C++ function: void QGesture::unsetHotSpot().

C++ documentation:

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 CppDeletable for QPinchGesture[src]

unsafe fn delete(&self)[src]

Destructor.

Calls C++ function: virtual [destructor] void QPinchGesture::~QPinchGesture().

C++ documentation:

Destructor.

impl Deref for QPinchGesture[src]

type Target = QGesture

The resulting type after dereferencing.

fn deref(&self) -> &QGesture[src]

Calls C++ function: QGesture* static_cast<QGesture*>(QPinchGesture* 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).

impl DynamicCast<QPinchGesture> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QPinchGesture>[src]

Calls C++ function: QPinchGesture* dynamic_cast<QPinchGesture*>(QObject* 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).

impl StaticDowncast<QPinchGesture> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QPinchGesture>[src]

Calls C++ function: QPinchGesture* static_cast<QPinchGesture*>(QObject* 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).

impl StaticUpcast<QObject> for QPinchGesture[src]

unsafe fn static_upcast(ptr: Ptr<QPinchGesture>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QPinchGesture* ptr).

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.