#[repr(C)]pub struct QGraphicsSceneResizeEvent { /* private fields */ }
Expand description
The QGraphicsSceneResizeEvent class provides events for widget resizing in the graphics view framework.
C++ class: QGraphicsSceneResizeEvent
.
The QGraphicsSceneResizeEvent class provides events for widget resizing in the graphics view framework.
A QGraphicsWidget sends itself a QGraphicsSceneResizeEvent immediately when its geometry changes.
It's similar to QResizeEvent, but its sizes, oldSize() and newSize(), use QSizeF instead of QSize.
Implementations§
Source§impl QGraphicsSceneResizeEvent
impl QGraphicsSceneResizeEvent
Sourcepub unsafe fn new() -> CppBox<QGraphicsSceneResizeEvent>
pub unsafe fn new() -> CppBox<QGraphicsSceneResizeEvent>
Constructs a QGraphicsSceneResizeEvent.
Calls C++ function: [constructor] void QGraphicsSceneResizeEvent::QGraphicsSceneResizeEvent()
.
Constructs a QGraphicsSceneResizeEvent.
Sourcepub unsafe fn new_size(&self) -> CppBox<QSizeF>
pub unsafe fn new_size(&self) -> CppBox<QSizeF>
Returns the new size (i.e., the current size).
Calls C++ function: QSizeF QGraphicsSceneResizeEvent::newSize() const
.
Returns the new size (i.e., the current size).
See also oldSize() and QGraphicsWidget::resize().
Sourcepub unsafe fn old_size(&self) -> CppBox<QSizeF>
pub unsafe fn old_size(&self) -> CppBox<QSizeF>
Returns the old size (i.e., the size immediately before the widget was resized).
Calls C++ function: QSizeF QGraphicsSceneResizeEvent::oldSize() const
.
Returns the old size (i.e., the size immediately before the widget was resized).
See also newSize() and QGraphicsWidget::resize().
Sourcepub unsafe fn set_new_size(&self, size: impl CastInto<Ref<QSizeF>>)
pub unsafe fn set_new_size(&self, size: impl CastInto<Ref<QSizeF>>)
Calls C++ function: void QGraphicsSceneResizeEvent::setNewSize(const QSizeF& size)
.
Sourcepub unsafe fn set_old_size(&self, size: impl CastInto<Ref<QSizeF>>)
pub unsafe fn set_old_size(&self, size: impl CastInto<Ref<QSizeF>>)
Calls C++ function: void QGraphicsSceneResizeEvent::setOldSize(const QSizeF& size)
.
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 QGraphicsSceneResizeEvent
impl CppDeletable for QGraphicsSceneResizeEvent
Source§unsafe fn delete(&self)
unsafe fn delete(&self)
Destroys the QGraphicsSceneResizeEvent.
Calls C++ function: virtual [destructor] void QGraphicsSceneResizeEvent::~QGraphicsSceneResizeEvent()
.
Destroys the QGraphicsSceneResizeEvent.
Source§impl Deref for QGraphicsSceneResizeEvent
impl Deref for QGraphicsSceneResizeEvent
Source§fn deref(&self) -> &QGraphicsSceneEvent
fn deref(&self) -> &QGraphicsSceneEvent
Calls C++ function: QGraphicsSceneEvent* static_cast<QGraphicsSceneEvent*>(QGraphicsSceneResizeEvent* ptr)
.
Source§type Target = QGraphicsSceneEvent
type Target = QGraphicsSceneEvent
Source§impl DynamicCast<QGraphicsSceneResizeEvent> for QEvent
impl DynamicCast<QGraphicsSceneResizeEvent> for QEvent
Source§unsafe fn dynamic_cast(ptr: Ptr<QEvent>) -> Ptr<QGraphicsSceneResizeEvent>
unsafe fn dynamic_cast(ptr: Ptr<QEvent>) -> Ptr<QGraphicsSceneResizeEvent>
Calls C++ function: QGraphicsSceneResizeEvent* dynamic_cast<QGraphicsSceneResizeEvent*>(QEvent* ptr)
.
Source§impl DynamicCast<QGraphicsSceneResizeEvent> for QGraphicsSceneEvent
impl DynamicCast<QGraphicsSceneResizeEvent> for QGraphicsSceneEvent
Source§unsafe fn dynamic_cast(
ptr: Ptr<QGraphicsSceneEvent>,
) -> Ptr<QGraphicsSceneResizeEvent>
unsafe fn dynamic_cast( ptr: Ptr<QGraphicsSceneEvent>, ) -> Ptr<QGraphicsSceneResizeEvent>
Calls C++ function: QGraphicsSceneResizeEvent* dynamic_cast<QGraphicsSceneResizeEvent*>(QGraphicsSceneEvent* ptr)
.
Source§impl StaticDowncast<QGraphicsSceneResizeEvent> for QEvent
impl StaticDowncast<QGraphicsSceneResizeEvent> for QEvent
Source§unsafe fn static_downcast(ptr: Ptr<QEvent>) -> Ptr<QGraphicsSceneResizeEvent>
unsafe fn static_downcast(ptr: Ptr<QEvent>) -> Ptr<QGraphicsSceneResizeEvent>
Calls C++ function: QGraphicsSceneResizeEvent* static_cast<QGraphicsSceneResizeEvent*>(QEvent* ptr)
.
Source§impl StaticDowncast<QGraphicsSceneResizeEvent> for QGraphicsSceneEvent
impl StaticDowncast<QGraphicsSceneResizeEvent> for QGraphicsSceneEvent
Source§unsafe fn static_downcast(
ptr: Ptr<QGraphicsSceneEvent>,
) -> Ptr<QGraphicsSceneResizeEvent>
unsafe fn static_downcast( ptr: Ptr<QGraphicsSceneEvent>, ) -> Ptr<QGraphicsSceneResizeEvent>
Calls C++ function: QGraphicsSceneResizeEvent* static_cast<QGraphicsSceneResizeEvent*>(QGraphicsSceneEvent* ptr)
.
Source§impl StaticUpcast<QEvent> for QGraphicsSceneResizeEvent
impl StaticUpcast<QEvent> for QGraphicsSceneResizeEvent
Source§unsafe fn static_upcast(ptr: Ptr<QGraphicsSceneResizeEvent>) -> Ptr<QEvent>
unsafe fn static_upcast(ptr: Ptr<QGraphicsSceneResizeEvent>) -> Ptr<QEvent>
Calls C++ function: QEvent* static_cast<QEvent*>(QGraphicsSceneResizeEvent* ptr)
.
Source§impl StaticUpcast<QGraphicsSceneEvent> for QGraphicsSceneResizeEvent
impl StaticUpcast<QGraphicsSceneEvent> for QGraphicsSceneResizeEvent
Source§unsafe fn static_upcast(
ptr: Ptr<QGraphicsSceneResizeEvent>,
) -> Ptr<QGraphicsSceneEvent>
unsafe fn static_upcast( ptr: Ptr<QGraphicsSceneResizeEvent>, ) -> Ptr<QGraphicsSceneEvent>
Calls C++ function: QGraphicsSceneEvent* static_cast<QGraphicsSceneEvent*>(QGraphicsSceneResizeEvent* ptr)
.