[−][src]Struct qt_widgets::QGraphicsSceneContextMenuEvent
The QGraphicsSceneContextMenuEvent class provides context menu events in the graphics view framework.
C++ class: QGraphicsSceneContextMenuEvent
.
The QGraphicsSceneContextMenuEvent class provides context menu events in the graphics view framework.
A QContextMenuEvent received by a QGraphicsView is translated into a QGraphicsSceneContextMenuEvent. The QContextMenuEvent::globalPos() is translated into item, scene, and screen coordinates (pos(), scenePos(), and screenPos()).
Methods
impl QGraphicsSceneContextMenuEvent
[src]
pub unsafe fn modifiers(&self) -> QFlags<KeyboardModifier>
[src]
Returns the keyboard modifiers in use when the context menu was requested.
Calls C++ function: QFlags<Qt::KeyboardModifier> QGraphicsSceneContextMenuEvent::modifiers() const
.
Returns the keyboard modifiers in use when the context menu was requested.
pub unsafe fn new_1a(type_: Type) -> CppBox<QGraphicsSceneContextMenuEvent>
[src]
Calls C++ function: [constructor] void QGraphicsSceneContextMenuEvent::QGraphicsSceneContextMenuEvent(QEvent::Type type = …)
.
pub unsafe fn new_0a() -> CppBox<QGraphicsSceneContextMenuEvent>
[src]
The QGraphicsSceneContextMenuEvent class provides context menu events in the graphics view framework.
Calls C++ function: [constructor] void QGraphicsSceneContextMenuEvent::QGraphicsSceneContextMenuEvent()
.
The QGraphicsSceneContextMenuEvent class provides context menu events in the graphics view framework.
A QContextMenuEvent received by a QGraphicsView is translated into a QGraphicsSceneContextMenuEvent. The QContextMenuEvent::globalPos() is translated into item, scene, and screen coordinates (pos(), scenePos(), and screenPos()).
pub unsafe fn pos(&self) -> CppBox<QPointF>
[src]
Returns the position of the mouse cursor in item coordinates at the moment the context menu was requested.
Calls C++ function: QPointF QGraphicsSceneContextMenuEvent::pos() const
.
pub unsafe fn reason(&self) -> Reason
[src]
Returns the reason for the context menu event.
Calls C++ function: QGraphicsSceneContextMenuEvent::Reason QGraphicsSceneContextMenuEvent::reason() const
.
Returns the reason for the context menu event.
See also QGraphicsSceneContextMenuEvent::Reason.
pub unsafe fn scene_pos(&self) -> CppBox<QPointF>
[src]
Returns the position of the mouse cursor in scene coordinates at the moment the context menu was requested.
Calls C++ function: QPointF QGraphicsSceneContextMenuEvent::scenePos() const
.
pub unsafe fn screen_pos(&self) -> CppBox<QPoint>
[src]
Returns the position of the mouse cursor in screen coordinates at the moment the context menu was requested.
Calls C++ function: QPoint QGraphicsSceneContextMenuEvent::screenPos() const
.
pub unsafe fn set_modifiers(&mut self, modifiers: QFlags<KeyboardModifier>)
[src]
Calls C++ function: void QGraphicsSceneContextMenuEvent::setModifiers(QFlags<Qt::KeyboardModifier> modifiers)
.
pub unsafe fn set_pos(&mut self, pos: impl CastInto<Ref<QPointF>>)
[src]
Calls C++ function: void QGraphicsSceneContextMenuEvent::setPos(const QPointF& pos)
.
pub unsafe fn set_reason(&mut self, reason: Reason)
[src]
Calls C++ function: void QGraphicsSceneContextMenuEvent::setReason(QGraphicsSceneContextMenuEvent::Reason reason)
.
pub unsafe fn set_scene_pos(&mut self, pos: impl CastInto<Ref<QPointF>>)
[src]
Calls C++ function: void QGraphicsSceneContextMenuEvent::setScenePos(const QPointF& pos)
.
pub unsafe fn set_screen_pos(&mut self, pos: impl CastInto<Ref<QPoint>>)
[src]
Calls C++ function: void QGraphicsSceneContextMenuEvent::setScreenPos(const QPoint& pos)
.
Methods from Deref<Target = QGraphicsSceneEvent>
pub unsafe fn set_widget(&mut self, widget: impl CastInto<MutPtr<QWidget>>)
[src]
Calls C++ function: void QGraphicsSceneEvent::setWidget(QWidget* widget)
.
pub unsafe fn widget(&self) -> MutPtr<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 Deref for QGraphicsSceneContextMenuEvent
[src]
type Target = QGraphicsSceneEvent
The resulting type after dereferencing.
fn deref(&self) -> &QGraphicsSceneEvent
[src]
Calls C++ function: QGraphicsSceneEvent* static_cast<QGraphicsSceneEvent*>(QGraphicsSceneContextMenuEvent* ptr)
.
impl DerefMut for QGraphicsSceneContextMenuEvent
[src]
fn deref_mut(&mut self) -> &mut QGraphicsSceneEvent
[src]
Calls C++ function: QGraphicsSceneEvent* static_cast<QGraphicsSceneEvent*>(QGraphicsSceneContextMenuEvent* ptr)
.
impl StaticUpcast<QGraphicsSceneEvent> for QGraphicsSceneContextMenuEvent
[src]
unsafe fn static_upcast(
ptr: Ptr<QGraphicsSceneContextMenuEvent>
) -> Ptr<QGraphicsSceneEvent>
[src]
ptr: Ptr<QGraphicsSceneContextMenuEvent>
) -> Ptr<QGraphicsSceneEvent>
Calls C++ function: QGraphicsSceneEvent* static_cast<QGraphicsSceneEvent*>(QGraphicsSceneContextMenuEvent* ptr)
.
unsafe fn static_upcast_mut(
ptr: MutPtr<QGraphicsSceneContextMenuEvent>
) -> MutPtr<QGraphicsSceneEvent>
[src]
ptr: MutPtr<QGraphicsSceneContextMenuEvent>
) -> MutPtr<QGraphicsSceneEvent>
Calls C++ function: QGraphicsSceneEvent* static_cast<QGraphicsSceneEvent*>(QGraphicsSceneContextMenuEvent* ptr)
.
impl StaticUpcast<QEvent> for QGraphicsSceneContextMenuEvent
[src]
unsafe fn static_upcast(ptr: Ptr<QGraphicsSceneContextMenuEvent>) -> Ptr<QEvent>
[src]
Calls C++ function: QEvent* static_cast<QEvent*>(QGraphicsSceneContextMenuEvent* ptr)
.
unsafe fn static_upcast_mut(
ptr: MutPtr<QGraphicsSceneContextMenuEvent>
) -> MutPtr<QEvent>
[src]
ptr: MutPtr<QGraphicsSceneContextMenuEvent>
) -> MutPtr<QEvent>
Calls C++ function: QEvent* static_cast<QEvent*>(QGraphicsSceneContextMenuEvent* ptr)
.
impl StaticDowncast<QGraphicsSceneContextMenuEvent> for QGraphicsSceneEvent
[src]
unsafe fn static_downcast(
ptr: Ptr<QGraphicsSceneEvent>
) -> Ptr<QGraphicsSceneContextMenuEvent>
[src]
ptr: Ptr<QGraphicsSceneEvent>
) -> Ptr<QGraphicsSceneContextMenuEvent>
Calls C++ function: QGraphicsSceneContextMenuEvent* static_cast<QGraphicsSceneContextMenuEvent*>(QGraphicsSceneEvent* ptr)
.
unsafe fn static_downcast_mut(
ptr: MutPtr<QGraphicsSceneEvent>
) -> MutPtr<QGraphicsSceneContextMenuEvent>
[src]
ptr: MutPtr<QGraphicsSceneEvent>
) -> MutPtr<QGraphicsSceneContextMenuEvent>
Calls C++ function: QGraphicsSceneContextMenuEvent* static_cast<QGraphicsSceneContextMenuEvent*>(QGraphicsSceneEvent* ptr)
.
impl StaticDowncast<QGraphicsSceneContextMenuEvent> for QEvent
[src]
unsafe fn static_downcast(
ptr: Ptr<QEvent>
) -> Ptr<QGraphicsSceneContextMenuEvent>
[src]
ptr: Ptr<QEvent>
) -> Ptr<QGraphicsSceneContextMenuEvent>
Calls C++ function: QGraphicsSceneContextMenuEvent* static_cast<QGraphicsSceneContextMenuEvent*>(QEvent* ptr)
.
unsafe fn static_downcast_mut(
ptr: MutPtr<QEvent>
) -> MutPtr<QGraphicsSceneContextMenuEvent>
[src]
ptr: MutPtr<QEvent>
) -> MutPtr<QGraphicsSceneContextMenuEvent>
Calls C++ function: QGraphicsSceneContextMenuEvent* static_cast<QGraphicsSceneContextMenuEvent*>(QEvent* ptr)
.
impl DynamicCast<QGraphicsSceneContextMenuEvent> for QGraphicsSceneEvent
[src]
unsafe fn dynamic_cast(
ptr: Ptr<QGraphicsSceneEvent>
) -> Ptr<QGraphicsSceneContextMenuEvent>
[src]
ptr: Ptr<QGraphicsSceneEvent>
) -> Ptr<QGraphicsSceneContextMenuEvent>
Calls C++ function: QGraphicsSceneContextMenuEvent* dynamic_cast<QGraphicsSceneContextMenuEvent*>(QGraphicsSceneEvent* ptr)
.
unsafe fn dynamic_cast_mut(
ptr: MutPtr<QGraphicsSceneEvent>
) -> MutPtr<QGraphicsSceneContextMenuEvent>
[src]
ptr: MutPtr<QGraphicsSceneEvent>
) -> MutPtr<QGraphicsSceneContextMenuEvent>
Calls C++ function: QGraphicsSceneContextMenuEvent* dynamic_cast<QGraphicsSceneContextMenuEvent*>(QGraphicsSceneEvent* ptr)
.
impl DynamicCast<QGraphicsSceneContextMenuEvent> for QEvent
[src]
unsafe fn dynamic_cast(ptr: Ptr<QEvent>) -> Ptr<QGraphicsSceneContextMenuEvent>
[src]
Calls C++ function: QGraphicsSceneContextMenuEvent* dynamic_cast<QGraphicsSceneContextMenuEvent*>(QEvent* ptr)
.
unsafe fn dynamic_cast_mut(
ptr: MutPtr<QEvent>
) -> MutPtr<QGraphicsSceneContextMenuEvent>
[src]
ptr: MutPtr<QEvent>
) -> MutPtr<QGraphicsSceneContextMenuEvent>
Calls C++ function: QGraphicsSceneContextMenuEvent* dynamic_cast<QGraphicsSceneContextMenuEvent*>(QEvent* ptr)
.
impl CppDeletable for QGraphicsSceneContextMenuEvent
[src]
Auto Trait Implementations
impl Send for QGraphicsSceneContextMenuEvent
impl Sync for QGraphicsSceneContextMenuEvent
impl Unpin for QGraphicsSceneContextMenuEvent
impl RefUnwindSafe for QGraphicsSceneContextMenuEvent
impl UnwindSafe for QGraphicsSceneContextMenuEvent
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
unsafe fn static_upcast_mut(ptr: MutPtr<T>) -> MutPtr<T>
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,