[][src]Struct qt_widgets::QGraphicsSceneWheelEvent

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

The QGraphicsSceneWheelEvent class provides wheel events in the graphics view framework.

C++ class: QGraphicsSceneWheelEvent.

C++ documentation:

The QGraphicsSceneWheelEvent class provides wheel events in the graphics view framework.

The QGraphicsSceneWheelEvent class provides wheel events in the graphics view framework.

QWheelEvents received by a QGraphicsView are translated into QGraphicsSceneWheelEvents; it translates the QWheelEvent::globalPos() into item, scene, and screen coordinates (pos(), scenePos(), and screenPos()).

Methods

impl QGraphicsSceneWheelEvent[src]

pub unsafe fn buttons(&self) -> QFlags<MouseButton>[src]

Returns the mouse buttons that were pressed when the wheel event occurred.

Calls C++ function: QFlags<Qt::MouseButton> QGraphicsSceneWheelEvent::buttons() const.

C++ documentation:

Returns the mouse buttons that were pressed when the wheel event occurred.

See also modifiers().

pub unsafe fn delta(&self) -> c_int[src]

Returns the distance that the wheel is rotated, in eighths (1/8s) of a degree. A positive value indicates that the wheel was rotated forwards away from the user; a negative value indicates that the wheel was rotated backwards toward the user.

Calls C++ function: int QGraphicsSceneWheelEvent::delta() const.

C++ documentation:

Returns the distance that the wheel is rotated, in eighths (1/8s) of a degree. A positive value indicates that the wheel was rotated forwards away from the user; a negative value indicates that the wheel was rotated backwards toward the user.

Most mouse types work in steps of 15 degrees, in which case the delta value is a multiple of 120 (== 15 * 8).

pub unsafe fn modifiers(&self) -> QFlags<KeyboardModifier>[src]

Returns the keyboard modifiers that were active when the wheel event occurred.

Calls C++ function: QFlags<Qt::KeyboardModifier> QGraphicsSceneWheelEvent::modifiers() const.

C++ documentation:

Returns the keyboard modifiers that were active when the wheel event occurred.

See also buttons().

pub unsafe fn new_1a(type_: Type) -> CppBox<QGraphicsSceneWheelEvent>[src]

Calls C++ function: [constructor] void QGraphicsSceneWheelEvent::QGraphicsSceneWheelEvent(QEvent::Type type = …).

pub unsafe fn new_0a() -> CppBox<QGraphicsSceneWheelEvent>[src]

The QGraphicsSceneWheelEvent class provides wheel events in the graphics view framework.

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

C++ documentation:

The QGraphicsSceneWheelEvent class provides wheel events in the graphics view framework.

The QGraphicsSceneWheelEvent class provides wheel events in the graphics view framework.

QWheelEvents received by a QGraphicsView are translated into QGraphicsSceneWheelEvents; it translates the QWheelEvent::globalPos() into item, scene, and screen coordinates (pos(), scenePos(), and screenPos()).

pub unsafe fn orientation(&self) -> Orientation[src]

Returns the wheel orientation.

Calls C++ function: Qt::Orientation QGraphicsSceneWheelEvent::orientation() const.

C++ documentation:

Returns the wheel orientation.

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

Returns the position of the cursor in item coordinates when the wheel event occurred.

Calls C++ function: QPointF QGraphicsSceneWheelEvent::pos() const.

C++ documentation:

Returns the position of the cursor in item coordinates when the wheel event occurred.

See also scenePos() and screenPos().

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

Returns the position of the cursor in scene coordinates when the wheel event occurred.

Calls C++ function: QPointF QGraphicsSceneWheelEvent::scenePos() const.

C++ documentation:

Returns the position of the cursor in scene coordinates when the wheel event occurred.

See also pos() and screenPos().

pub unsafe fn screen_pos(&self) -> CppBox<QPoint>[src]

Returns the position of the cursor in screen coordinates when the wheel event occurred.

Calls C++ function: QPoint QGraphicsSceneWheelEvent::screenPos() const.

C++ documentation:

Returns the position of the cursor in screen coordinates when the wheel event occurred.

See also pos() and scenePos().

pub unsafe fn set_buttons(&self, buttons: QFlags<MouseButton>)[src]

Calls C++ function: void QGraphicsSceneWheelEvent::setButtons(QFlags<Qt::MouseButton> buttons).

pub unsafe fn set_delta(&self, delta: c_int)[src]

Calls C++ function: void QGraphicsSceneWheelEvent::setDelta(int delta).

pub unsafe fn set_modifiers(&self, modifiers: QFlags<KeyboardModifier>)[src]

Calls C++ function: void QGraphicsSceneWheelEvent::setModifiers(QFlags<Qt::KeyboardModifier> modifiers).

pub unsafe fn set_orientation(&self, orientation: Orientation)[src]

Calls C++ function: void QGraphicsSceneWheelEvent::setOrientation(Qt::Orientation orientation).

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

Calls C++ function: void QGraphicsSceneWheelEvent::setPos(const QPointF& pos).

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

Calls C++ function: void QGraphicsSceneWheelEvent::setScenePos(const QPointF& pos).

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

Calls C++ function: void QGraphicsSceneWheelEvent::setScreenPos(const QPoint& pos).

Methods from Deref<Target = QGraphicsSceneEvent>

pub unsafe fn set_widget(&self, widget: impl CastInto<Ptr<QWidget>>)[src]

Calls C++ function: void QGraphicsSceneEvent::setWidget(QWidget* widget).

pub unsafe fn widget(&self) -> QPtr<QWidget>[src]

Returns the widget where the event originated, or 0 if the event originates from another application.

Calls C++ function: QWidget* QGraphicsSceneEvent::widget() const.

C++ documentation:

Returns the widget where the event originated, or 0 if the event originates from another application.

Trait Implementations

impl CppDeletable for QGraphicsSceneWheelEvent[src]

unsafe fn delete(&self)[src]

Destroys the QGraphicsSceneWheelEvent.

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

C++ documentation:

impl Deref for QGraphicsSceneWheelEvent[src]

type Target = QGraphicsSceneEvent

The resulting type after dereferencing.

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

Calls C++ function: QGraphicsSceneEvent* static_cast<QGraphicsSceneEvent*>(QGraphicsSceneWheelEvent* ptr).

impl DynamicCast<QGraphicsSceneWheelEvent> for QGraphicsSceneEvent[src]

unsafe fn dynamic_cast(
    ptr: Ptr<QGraphicsSceneEvent>
) -> Ptr<QGraphicsSceneWheelEvent>
[src]

Calls C++ function: QGraphicsSceneWheelEvent* dynamic_cast<QGraphicsSceneWheelEvent*>(QGraphicsSceneEvent* ptr).

impl DynamicCast<QGraphicsSceneWheelEvent> for QEvent[src]

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

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

impl StaticDowncast<QGraphicsSceneWheelEvent> for QGraphicsSceneEvent[src]

unsafe fn static_downcast(
    ptr: Ptr<QGraphicsSceneEvent>
) -> Ptr<QGraphicsSceneWheelEvent>
[src]

Calls C++ function: QGraphicsSceneWheelEvent* static_cast<QGraphicsSceneWheelEvent*>(QGraphicsSceneEvent* ptr).

impl StaticDowncast<QGraphicsSceneWheelEvent> for QEvent[src]

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

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

impl StaticUpcast<QEvent> for QGraphicsSceneWheelEvent[src]

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

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

impl StaticUpcast<QGraphicsSceneEvent> for QGraphicsSceneWheelEvent[src]

unsafe fn static_upcast(
    ptr: Ptr<QGraphicsSceneWheelEvent>
) -> Ptr<QGraphicsSceneEvent>
[src]

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