[][src]Struct qt_gui::QScrollEvent

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

The QScrollEvent class is sent when scrolling.

C++ class: QScrollEvent.

C++ documentation:

The QScrollEvent class is sent when scrolling.

The scroll event is sent to indicate that the receiver should be scrolled. Usually the receiver should be something visual like QWidget or QGraphicsObject.

Some care should be taken that no conflicting QScrollEvents are sent from two sources. Using QScroller::scrollTo is save however.

Methods

impl QScrollEvent[src]

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

Returns the new scroll position.

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

C++ documentation:

Returns the new scroll position.

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

The QScrollEvent class is sent when scrolling.

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

C++ documentation:

The QScrollEvent class is sent when scrolling.

The scroll event is sent to indicate that the receiver should be scrolled. Usually the receiver should be something visual like QWidget or QGraphicsObject.

Some care should be taken that no conflicting QScrollEvents are sent from two sources. Using QScroller::scrollTo is save however.

pub unsafe fn new(
    content_pos: impl CastInto<Ref<QPointF>>,
    overshoot: impl CastInto<Ref<QPointF>>,
    scroll_state: ScrollState
) -> CppBox<QScrollEvent>
[src]

Creates a new QScrollEvent contentPos is the new content position, overshootDistance is the new overshoot distance while scrollState indicates if this scroll event is the first one, the last one or some event in between.

Calls C++ function: [constructor] void QScrollEvent::QScrollEvent(const QPointF& contentPos, const QPointF& overshoot, QScrollEvent::ScrollState scrollState).

C++ documentation:

Creates a new QScrollEvent contentPos is the new content position, overshootDistance is the new overshoot distance while scrollState indicates if this scroll event is the first one, the last one or some event in between.

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

The QScrollEvent class is sent when scrolling.

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

C++ documentation:

The QScrollEvent class is sent when scrolling.

The scroll event is sent to indicate that the receiver should be scrolled. Usually the receiver should be something visual like QWidget or QGraphicsObject.

Some care should be taken that no conflicting QScrollEvents are sent from two sources. Using QScroller::scrollTo is save however.

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

Returns the new overshoot distance. See QScroller for an explanation of the term overshoot.

Calls C++ function: QPointF QScrollEvent::overshootDistance() const.

C++ documentation:

Returns the new overshoot distance. See QScroller for an explanation of the term overshoot.

See also QScroller.

pub unsafe fn scroll_state(&self) -> ScrollState[src]

Returns the current scroll state as a combination of ScrollStateFlag values. ScrollStarted (or ScrollFinished) will be set, if this scroll event is the first (or last) event in a scrolling activity. Please note that both values can be set at the same time, if the activity consists of a single QScrollEvent. All other scroll events in between will have their state set to ScrollUpdated.

Calls C++ function: QScrollEvent::ScrollState QScrollEvent::scrollState() const.

C++ documentation:

Returns the current scroll state as a combination of ScrollStateFlag values. ScrollStarted (or ScrollFinished) will be set, if this scroll event is the first (or last) event in a scrolling activity. Please note that both values can be set at the same time, if the activity consists of a single QScrollEvent. All other scroll events in between will have their state set to ScrollUpdated.

A widget could for example revert selections when scrolling is started and stopped.

Trait Implementations

impl CppDeletable for QScrollEvent[src]

unsafe fn delete(&mut self)[src]

Destroys QScrollEvent.

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

C++ documentation:

Destroys QScrollEvent.

impl Deref for QScrollEvent[src]

type Target = QEvent

The resulting type after dereferencing.

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

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

impl DerefMut for QScrollEvent[src]

fn deref_mut(&mut self) -> &mut QEvent[src]

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

impl DynamicCast<QScrollEvent> for QEvent[src]

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

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

unsafe fn dynamic_cast_mut(ptr: MutPtr<QEvent>) -> MutPtr<QScrollEvent>[src]

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

impl StaticDowncast<QScrollEvent> for QEvent[src]

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

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

unsafe fn static_downcast_mut(ptr: MutPtr<QEvent>) -> MutPtr<QScrollEvent>[src]

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

impl StaticUpcast<QEvent> for QScrollEvent[src]

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

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

unsafe fn static_upcast_mut(ptr: MutPtr<QScrollEvent>) -> MutPtr<QEvent>[src]

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