[][src]Struct qt_widgets::QPanGesture

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

The QPanGesture class describes a panning gesture made by the user.

C++ class: QPanGesture.

C++ documentation:

The QPanGesture class describes a panning gesture made by the user.

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 QPanGesture[src]

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

This property holds the acceleration in the motion of the touch point for this gesture

Calls C++ function: double QPanGesture::acceleration() const.

C++ documentation:

This property holds the acceleration in the motion of the touch point for this gesture

Access functions:

qreal acceleration() const
void setAcceleration(qreal value)

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

This property holds the offset from the previous input position to the current input

Calls C++ function: QPointF QPanGesture::delta() const.

C++ documentation:

This property holds the offset from the previous input position to the current input

This is essentially the same as the difference between offset() and lastOffset().

Access functions:

QPointF delta() const

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

This property holds the last offset recorded for this gesture

Calls C++ function: QPointF QPanGesture::lastOffset() const.

C++ documentation:

This property holds the last offset recorded for this gesture

The last offset contains the change in position of the user's input as reported in the offset property when a previous gesture event was delivered for 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 a zero size.

Access functions:

QPointF lastOffset() const
void setLastOffset(const QPointF &value)

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

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

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

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

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

The QPanGesture class describes a panning gesture made by the user.

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

C++ documentation:

The QPanGesture class describes a panning gesture made by the user.

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 offset(&self) -> CppBox<QPointF>[src]

This property holds the total offset from the first input position to the current input position

Calls C++ function: QPointF QPanGesture::offset() const.

C++ documentation:

This property holds the total offset from the first input position to the current input position

The offset measures the total change in position of the user's input covered by the gesture on the input device.

Access functions:

QPointF offset() const
void setOffset(const QPointF &value)

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

Calls C++ function: virtual int QPanGesture::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* QPanGesture::qt_metacast(const char* arg1).

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

This property holds the acceleration in the motion of the touch point for this gesture

Calls C++ function: void QPanGesture::setAcceleration(double value).

C++ documentation:

This property holds the acceleration in the motion of the touch point for this gesture

Access functions:

qreal acceleration() const
void setAcceleration(qreal value)

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

This property holds the last offset recorded for this gesture

Calls C++ function: void QPanGesture::setLastOffset(const QPointF& value).

C++ documentation:

This property holds the last offset recorded for this gesture

The last offset contains the change in position of the user's input as reported in the offset property when a previous gesture event was delivered for 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 a zero size.

Access functions:

QPointF lastOffset() const
void setLastOffset(const QPointF &value)

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

This property holds the total offset from the first input position to the current input position

Calls C++ function: void QPanGesture::setOffset(const QPointF& value).

C++ documentation:

This property holds the total offset from the first input position to the current input position

The offset measures the total change in position of the user's input covered by the gesture on the input device.

Access functions:

QPointF offset() const
void setOffset(const QPointF &value)

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

Returns a reference to the staticMetaObject field.

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

Calls C++ function: static QString QPanGesture::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 QPanGesture::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 QPanGesture[src]

unsafe fn delete(&self)[src]

Destructor.

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

C++ documentation:

Destructor.

impl Deref for QPanGesture[src]

type Target = QGesture

The resulting type after dereferencing.

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

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

impl DynamicCast<QPanGesture> for QObject[src]

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

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

impl StaticDowncast<QPanGesture> for QObject[src]

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

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

impl StaticUpcast<QObject> for QPanGesture[src]

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

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