[][src]Struct qt_gui::QScrollPrepareEvent

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

The QScrollPrepareEvent class is sent in preparation of scrolling.

C++ class: QScrollPrepareEvent.

C++ documentation:

The QScrollPrepareEvent class is sent in preparation of scrolling.

The scroll prepare event is sent before scrolling (usually by QScroller) is started. The object receiving this event should set viewportSize, maxContentPos and contentPos. It also should accept this event to indicate that scrolling should be started.

It is not guaranteed that a QScrollEvent will be sent after an acceepted QScrollPrepareEvent, e.g. in a case where the maximum content position is (0,0).

Methods

impl QScrollPrepareEvent[src]

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

Returns the current position of the content as set by setContentPos.

Calls C++ function: QPointF QScrollPrepareEvent::contentPos() const.

C++ documentation:

Returns the current position of the content as set by setContentPos.

See also setContentPos().

pub unsafe fn content_pos_range(&self) -> CppBox<QRectF>[src]

Returns the range of coordinates for the content as set by setContentPosRange().

Calls C++ function: QRectF QScrollPrepareEvent::contentPosRange() const.

C++ documentation:

Returns the range of coordinates for the content as set by setContentPosRange().

See also setContentPosRange().

pub unsafe fn copy_from(
    &self,
    other: impl CastInto<Ref<QScrollPrepareEvent>>
) -> Ref<QScrollPrepareEvent>
[src]

The QScrollPrepareEvent class is sent in preparation of scrolling.

Calls C++ function: QScrollPrepareEvent& QScrollPrepareEvent::operator=(const QScrollPrepareEvent& other).

C++ documentation:

The QScrollPrepareEvent class is sent in preparation of scrolling.

The scroll prepare event is sent before scrolling (usually by QScroller) is started. The object receiving this event should set viewportSize, maxContentPos and contentPos. It also should accept this event to indicate that scrolling should be started.

It is not guaranteed that a QScrollEvent will be sent after an acceepted QScrollPrepareEvent, e.g. in a case where the maximum content position is (0,0).

pub unsafe fn new(
    start_pos: impl CastInto<Ref<QPointF>>
) -> CppBox<QScrollPrepareEvent>
[src]

Creates new QScrollPrepareEvent The startPos is the position of a touch or mouse event that started the scrolling.

Calls C++ function: [constructor] void QScrollPrepareEvent::QScrollPrepareEvent(const QPointF& startPos).

C++ documentation:

Creates new QScrollPrepareEvent The startPos is the position of a touch or mouse event that started the scrolling.

pub unsafe fn new_copy(
    other: impl CastInto<Ref<QScrollPrepareEvent>>
) -> CppBox<QScrollPrepareEvent>
[src]

The QScrollPrepareEvent class is sent in preparation of scrolling.

Calls C++ function: [constructor] void QScrollPrepareEvent::QScrollPrepareEvent(const QScrollPrepareEvent& other).

C++ documentation:

The QScrollPrepareEvent class is sent in preparation of scrolling.

The scroll prepare event is sent before scrolling (usually by QScroller) is started. The object receiving this event should set viewportSize, maxContentPos and contentPos. It also should accept this event to indicate that scrolling should be started.

It is not guaranteed that a QScrollEvent will be sent after an acceepted QScrollPrepareEvent, e.g. in a case where the maximum content position is (0,0).

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

Sets the current content position to pos.

Calls C++ function: void QScrollPrepareEvent::setContentPos(const QPointF& pos).

C++ documentation:

Sets the current content position to pos.

See also contentPos().

pub unsafe fn set_content_pos_range(&self, rect: impl CastInto<Ref<QRectF>>)[src]

Sets the range of content coordinates to rect.

Calls C++ function: void QScrollPrepareEvent::setContentPosRange(const QRectF& rect).

C++ documentation:

Sets the range of content coordinates to rect.

See also contentPosRange().

pub unsafe fn set_viewport_size(&self, size: impl CastInto<Ref<QSizeF>>)[src]

Sets the size of the area that is to be scrolled to size.

Calls C++ function: void QScrollPrepareEvent::setViewportSize(const QSizeF& size).

C++ documentation:

Sets the size of the area that is to be scrolled to size.

See also viewportSize().

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

Returns the position of the touch or mouse event that started the scrolling.

Calls C++ function: QPointF QScrollPrepareEvent::startPos() const.

C++ documentation:

Returns the position of the touch or mouse event that started the scrolling.

pub unsafe fn viewport_size(&self) -> CppBox<QSizeF>[src]

Returns size of the area that is to be scrolled as set by setViewportSize

Calls C++ function: QSizeF QScrollPrepareEvent::viewportSize() const.

C++ documentation:

Returns size of the area that is to be scrolled as set by setViewportSize

See also setViewportSize().

Trait Implementations

impl CppDeletable for QScrollPrepareEvent[src]

unsafe fn delete(&self)[src]

Destroys QScrollEvent.

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

C++ documentation:

Destroys QScrollEvent.

impl Deref for QScrollPrepareEvent[src]

type Target = QEvent

The resulting type after dereferencing.

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

Calls C++ function: QEvent* static_cast<QEvent*>(QScrollPrepareEvent* ptr).

impl DynamicCast<QScrollPrepareEvent> for QEvent[src]

unsafe fn dynamic_cast(ptr: Ptr<QEvent>) -> Ptr<QScrollPrepareEvent>[src]

Calls C++ function: QScrollPrepareEvent* dynamic_cast<QScrollPrepareEvent*>(QEvent* ptr).

impl StaticDowncast<QScrollPrepareEvent> for QEvent[src]

unsafe fn static_downcast(ptr: Ptr<QEvent>) -> Ptr<QScrollPrepareEvent>[src]

Calls C++ function: QScrollPrepareEvent* static_cast<QScrollPrepareEvent*>(QEvent* ptr).

impl StaticUpcast<QEvent> for QScrollPrepareEvent[src]

unsafe fn static_upcast(ptr: Ptr<QScrollPrepareEvent>) -> Ptr<QEvent>[src]

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