[][src]Struct qt_widgets::QGraphicsSceneMoveEvent

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

The QGraphicsSceneMoveEvent class provides events for widget moving in the graphics view framework.

C++ class: QGraphicsSceneMoveEvent.

C++ documentation:

The QGraphicsSceneMoveEvent class provides events for widget moving in the graphics view framework.

A QGraphicsWidget sends itself a QGraphicsSceneMoveEvent immediately when its local position changes. The delivery is implemented as part of QGraphicsItem::itemChange().

It's similar to QMoveEvent, but its positions, oldPos() and newPos(), use QPointF instead of QPoint.

Methods

impl QGraphicsSceneMoveEvent[src]

pub unsafe fn new() -> CppBox<QGraphicsSceneMoveEvent>[src]

Constructs a QGraphicsSceneMoveEvent.

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

C++ documentation:

Constructs a QGraphicsSceneMoveEvent.

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

Returns the new position (i.e., the current position).

Calls C++ function: QPointF QGraphicsSceneMoveEvent::newPos() const.

C++ documentation:

Returns the new position (i.e., the current position).

See also oldPos() and QGraphicsItem::setPos().

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

Returns the old position (i.e., the position immediately before the widget was moved).

Calls C++ function: QPointF QGraphicsSceneMoveEvent::oldPos() const.

C++ documentation:

Returns the old position (i.e., the position immediately before the widget was moved).

See also newPos() and QGraphicsItem::setPos().

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

Calls C++ function: void QGraphicsSceneMoveEvent::setNewPos(const QPointF& pos).

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

Calls C++ function: void QGraphicsSceneMoveEvent::setOldPos(const QPointF& 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 QGraphicsSceneMoveEvent[src]

unsafe fn delete(&self)[src]

Destroys the QGraphicsSceneMoveEvent.

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

C++ documentation:

impl Deref for QGraphicsSceneMoveEvent[src]

type Target = QGraphicsSceneEvent

The resulting type after dereferencing.

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

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

impl DynamicCast<QGraphicsSceneMoveEvent> for QGraphicsSceneEvent[src]

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

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

impl DynamicCast<QGraphicsSceneMoveEvent> for QEvent[src]

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

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

impl StaticDowncast<QGraphicsSceneMoveEvent> for QGraphicsSceneEvent[src]

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

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

impl StaticDowncast<QGraphicsSceneMoveEvent> for QEvent[src]

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

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

impl StaticUpcast<QEvent> for QGraphicsSceneMoveEvent[src]

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

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

impl StaticUpcast<QGraphicsSceneEvent> for QGraphicsSceneMoveEvent[src]

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

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