[−][src]Struct qt_widgets::QGraphicsSceneMoveEvent
The QGraphicsSceneMoveEvent class provides events for widget moving in the graphics view framework.
C++ class: QGraphicsSceneMoveEvent
.
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()
.
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
.
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
.
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
.
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()
.
Destroys the QGraphicsSceneMoveEvent.
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]
ptr: Ptr<QGraphicsSceneEvent>
) -> Ptr<QGraphicsSceneMoveEvent>
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]
ptr: Ptr<QGraphicsSceneEvent>
) -> Ptr<QGraphicsSceneMoveEvent>
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]
ptr: Ptr<QGraphicsSceneMoveEvent>
) -> Ptr<QGraphicsSceneEvent>
Calls C++ function: QGraphicsSceneEvent* static_cast<QGraphicsSceneEvent*>(QGraphicsSceneMoveEvent* ptr)
.
Auto Trait Implementations
impl RefUnwindSafe for QGraphicsSceneMoveEvent
impl Send for QGraphicsSceneMoveEvent
impl Sync for QGraphicsSceneMoveEvent
impl Unpin for QGraphicsSceneMoveEvent
impl UnwindSafe for QGraphicsSceneMoveEvent
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,