#[repr(C)]pub struct QGraphicsSceneWheelEvent { /* private fields */ }
Expand description
The QGraphicsSceneWheelEvent class provides wheel events in the graphics view framework.
C++ class: QGraphicsSceneWheelEvent
.
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()).
Implementations§
Source§impl QGraphicsSceneWheelEvent
impl QGraphicsSceneWheelEvent
Returns the mouse buttons that were pressed when the wheel event occurred.
Calls C++ function: QFlags<Qt::MouseButton> QGraphicsSceneWheelEvent::buttons() const
.
Returns the mouse buttons that were pressed when the wheel event occurred.
See also modifiers().
Sourcepub unsafe fn delta(&self) -> c_int
pub unsafe fn delta(&self) -> c_int
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
.
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).
Sourcepub unsafe fn modifiers(&self) -> QFlags<KeyboardModifier>
pub unsafe fn modifiers(&self) -> QFlags<KeyboardModifier>
Returns the keyboard modifiers that were active when the wheel event occurred.
Calls C++ function: QFlags<Qt::KeyboardModifier> QGraphicsSceneWheelEvent::modifiers() const
.
Returns the keyboard modifiers that were active when the wheel event occurred.
See also buttons().
Sourcepub unsafe fn new_1a(type_: Type) -> CppBox<QGraphicsSceneWheelEvent>
pub unsafe fn new_1a(type_: Type) -> CppBox<QGraphicsSceneWheelEvent>
Calls C++ function: [constructor] void QGraphicsSceneWheelEvent::QGraphicsSceneWheelEvent(QEvent::Type type = …)
.
Sourcepub unsafe fn new_0a() -> CppBox<QGraphicsSceneWheelEvent>
pub unsafe fn new_0a() -> CppBox<QGraphicsSceneWheelEvent>
The QGraphicsSceneWheelEvent class provides wheel events in the graphics view framework.
Calls C++ function: [constructor] void QGraphicsSceneWheelEvent::QGraphicsSceneWheelEvent()
.
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()).
Sourcepub unsafe fn orientation(&self) -> Orientation
pub unsafe fn orientation(&self) -> Orientation
Returns the wheel orientation.
Calls C++ function: Qt::Orientation QGraphicsSceneWheelEvent::orientation() const
.
Returns the wheel orientation.
Sourcepub unsafe fn pos(&self) -> CppBox<QPointF>
pub unsafe fn pos(&self) -> CppBox<QPointF>
Returns the position of the cursor in item coordinates when the wheel event occurred.
Calls C++ function: QPointF QGraphicsSceneWheelEvent::pos() const
.
Sourcepub unsafe fn scene_pos(&self) -> CppBox<QPointF>
pub unsafe fn scene_pos(&self) -> CppBox<QPointF>
Returns the position of the cursor in scene coordinates when the wheel event occurred.
Calls C++ function: QPointF QGraphicsSceneWheelEvent::scenePos() const
.
Sourcepub unsafe fn screen_pos(&self) -> CppBox<QPoint>
pub unsafe fn screen_pos(&self) -> CppBox<QPoint>
Returns the position of the cursor in screen coordinates when the wheel event occurred.
Calls C++ function: QPoint QGraphicsSceneWheelEvent::screenPos() const
.
Calls C++ function: void QGraphicsSceneWheelEvent::setButtons(QFlags<Qt::MouseButton> buttons)
.
Sourcepub unsafe fn set_delta(&self, delta: c_int)
pub unsafe fn set_delta(&self, delta: c_int)
Calls C++ function: void QGraphicsSceneWheelEvent::setDelta(int delta)
.
Sourcepub unsafe fn set_modifiers(&self, modifiers: QFlags<KeyboardModifier>)
pub unsafe fn set_modifiers(&self, modifiers: QFlags<KeyboardModifier>)
Calls C++ function: void QGraphicsSceneWheelEvent::setModifiers(QFlags<Qt::KeyboardModifier> modifiers)
.
Sourcepub unsafe fn set_orientation(&self, orientation: Orientation)
pub unsafe fn set_orientation(&self, orientation: Orientation)
Calls C++ function: void QGraphicsSceneWheelEvent::setOrientation(Qt::Orientation orientation)
.
Sourcepub unsafe fn set_pos(&self, pos: impl CastInto<Ref<QPointF>>)
pub unsafe fn set_pos(&self, pos: impl CastInto<Ref<QPointF>>)
Calls C++ function: void QGraphicsSceneWheelEvent::setPos(const QPointF& pos)
.
Sourcepub unsafe fn set_scene_pos(&self, pos: impl CastInto<Ref<QPointF>>)
pub unsafe fn set_scene_pos(&self, pos: impl CastInto<Ref<QPointF>>)
Calls C++ function: void QGraphicsSceneWheelEvent::setScenePos(const QPointF& pos)
.
Sourcepub unsafe fn set_screen_pos(&self, pos: impl CastInto<Ref<QPoint>>)
pub unsafe fn set_screen_pos(&self, pos: impl CastInto<Ref<QPoint>>)
Calls C++ function: void QGraphicsSceneWheelEvent::setScreenPos(const QPoint& pos)
.
Methods from Deref<Target = QGraphicsSceneEvent>§
Sourcepub unsafe fn set_widget(&self, widget: impl CastInto<Ptr<QWidget>>)
pub unsafe fn set_widget(&self, widget: impl CastInto<Ptr<QWidget>>)
Calls C++ function: void QGraphicsSceneEvent::setWidget(QWidget* widget)
.
Sourcepub unsafe fn widget(&self) -> QPtr<QWidget>
pub unsafe fn widget(&self) -> QPtr<QWidget>
Returns the widget where the event originated, or 0 if the event originates from another application.
Calls C++ function: QWidget* QGraphicsSceneEvent::widget() const
.
Returns the widget where the event originated, or 0 if the event originates from another application.
Methods from Deref<Target = QEvent>§
Sourcepub unsafe fn accept(&self)
pub unsafe fn accept(&self)
Sets the accept flag of the event object, the equivalent of calling setAccepted(true).
Calls C++ function: void QEvent::accept()
.
Sets the accept flag of the event object, the equivalent of calling setAccepted(true).
Setting the accept parameter indicates that the event receiver wants the event. Unwanted events might be propagated to the parent widget.
See also ignore().
Sourcepub unsafe fn copy_from(&self, other: impl CastInto<Ref<QEvent>>) -> Ref<QEvent>
pub unsafe fn copy_from(&self, other: impl CastInto<Ref<QEvent>>) -> Ref<QEvent>
Calls C++ function: QEvent& QEvent::operator=(const QEvent& other)
.
Sourcepub unsafe fn ignore(&self)
pub unsafe fn ignore(&self)
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false).
Calls C++ function: void QEvent::ignore()
.
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false).
Clearing the accept parameter indicates that the event receiver does not want the event. Unwanted events might be propagated to the parent widget.
See also accept().
Sourcepub unsafe fn is_accepted(&self) -> bool
pub unsafe fn is_accepted(&self) -> bool
the accept flag of the event object
Calls C++ function: bool QEvent::isAccepted() const
.
the accept flag of the event object
Setting the accept parameter indicates that the event receiver wants the event. Unwanted events might be propagated to the parent widget. By default, isAccepted() is set to true, but don't rely on this as subclasses may choose to clear it in their constructor.
For convenience, the accept flag can also be set with accept(), and cleared with ignore().
Access functions:
bool | isAccepted() const |
void | setAccepted(bool accepted) |
Sourcepub unsafe fn set_accepted(&self, accepted: bool)
pub unsafe fn set_accepted(&self, accepted: bool)
the accept flag of the event object
Calls C++ function: void QEvent::setAccepted(bool accepted)
.
the accept flag of the event object
Setting the accept parameter indicates that the event receiver wants the event. Unwanted events might be propagated to the parent widget. By default, isAccepted() is set to true, but don't rely on this as subclasses may choose to clear it in their constructor.
For convenience, the accept flag can also be set with accept(), and cleared with ignore().
Access functions:
bool | isAccepted() const |
void | setAccepted(bool accepted) |
Sourcepub unsafe fn spontaneous(&self) -> bool
pub unsafe fn spontaneous(&self) -> bool
Returns true
if the event originated outside the application (a system event); otherwise returns false
.
Calls C++ function: bool QEvent::spontaneous() const
.
Returns true
if the event originated outside the application (a system event); otherwise returns false
.
The return value of this function is not defined for paint events.
Trait Implementations§
Source§impl CppDeletable for QGraphicsSceneWheelEvent
impl CppDeletable for QGraphicsSceneWheelEvent
Source§unsafe fn delete(&self)
unsafe fn delete(&self)
Destroys the QGraphicsSceneWheelEvent.
Calls C++ function: virtual [destructor] void QGraphicsSceneWheelEvent::~QGraphicsSceneWheelEvent()
.
Destroys the QGraphicsSceneWheelEvent.
Source§impl Deref for QGraphicsSceneWheelEvent
impl Deref for QGraphicsSceneWheelEvent
Source§fn deref(&self) -> &QGraphicsSceneEvent
fn deref(&self) -> &QGraphicsSceneEvent
Calls C++ function: QGraphicsSceneEvent* static_cast<QGraphicsSceneEvent*>(QGraphicsSceneWheelEvent* ptr)
.
Source§type Target = QGraphicsSceneEvent
type Target = QGraphicsSceneEvent
Source§impl DynamicCast<QGraphicsSceneWheelEvent> for QEvent
impl DynamicCast<QGraphicsSceneWheelEvent> for QEvent
Source§unsafe fn dynamic_cast(ptr: Ptr<QEvent>) -> Ptr<QGraphicsSceneWheelEvent>
unsafe fn dynamic_cast(ptr: Ptr<QEvent>) -> Ptr<QGraphicsSceneWheelEvent>
Calls C++ function: QGraphicsSceneWheelEvent* dynamic_cast<QGraphicsSceneWheelEvent*>(QEvent* ptr)
.
Source§impl DynamicCast<QGraphicsSceneWheelEvent> for QGraphicsSceneEvent
impl DynamicCast<QGraphicsSceneWheelEvent> for QGraphicsSceneEvent
Source§unsafe fn dynamic_cast(
ptr: Ptr<QGraphicsSceneEvent>,
) -> Ptr<QGraphicsSceneWheelEvent>
unsafe fn dynamic_cast( ptr: Ptr<QGraphicsSceneEvent>, ) -> Ptr<QGraphicsSceneWheelEvent>
Calls C++ function: QGraphicsSceneWheelEvent* dynamic_cast<QGraphicsSceneWheelEvent*>(QGraphicsSceneEvent* ptr)
.
Source§impl StaticDowncast<QGraphicsSceneWheelEvent> for QEvent
impl StaticDowncast<QGraphicsSceneWheelEvent> for QEvent
Source§unsafe fn static_downcast(ptr: Ptr<QEvent>) -> Ptr<QGraphicsSceneWheelEvent>
unsafe fn static_downcast(ptr: Ptr<QEvent>) -> Ptr<QGraphicsSceneWheelEvent>
Calls C++ function: QGraphicsSceneWheelEvent* static_cast<QGraphicsSceneWheelEvent*>(QEvent* ptr)
.
Source§impl StaticDowncast<QGraphicsSceneWheelEvent> for QGraphicsSceneEvent
impl StaticDowncast<QGraphicsSceneWheelEvent> for QGraphicsSceneEvent
Source§unsafe fn static_downcast(
ptr: Ptr<QGraphicsSceneEvent>,
) -> Ptr<QGraphicsSceneWheelEvent>
unsafe fn static_downcast( ptr: Ptr<QGraphicsSceneEvent>, ) -> Ptr<QGraphicsSceneWheelEvent>
Calls C++ function: QGraphicsSceneWheelEvent* static_cast<QGraphicsSceneWheelEvent*>(QGraphicsSceneEvent* ptr)
.
Source§impl StaticUpcast<QEvent> for QGraphicsSceneWheelEvent
impl StaticUpcast<QEvent> for QGraphicsSceneWheelEvent
Source§unsafe fn static_upcast(ptr: Ptr<QGraphicsSceneWheelEvent>) -> Ptr<QEvent>
unsafe fn static_upcast(ptr: Ptr<QGraphicsSceneWheelEvent>) -> Ptr<QEvent>
Calls C++ function: QEvent* static_cast<QEvent*>(QGraphicsSceneWheelEvent* ptr)
.
Source§impl StaticUpcast<QGraphicsSceneEvent> for QGraphicsSceneWheelEvent
impl StaticUpcast<QGraphicsSceneEvent> for QGraphicsSceneWheelEvent
Source§unsafe fn static_upcast(
ptr: Ptr<QGraphicsSceneWheelEvent>,
) -> Ptr<QGraphicsSceneEvent>
unsafe fn static_upcast( ptr: Ptr<QGraphicsSceneWheelEvent>, ) -> Ptr<QGraphicsSceneEvent>
Calls C++ function: QGraphicsSceneEvent* static_cast<QGraphicsSceneEvent*>(QGraphicsSceneWheelEvent* ptr)
.