[][src]Struct qt_gui::QDragEnterEvent

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

The QDragEnterEvent class provides an event which is sent to a widget when a drag and drop action enters it.

C++ class: QDragEnterEvent.

C++ documentation:

The QDragEnterEvent class provides an event which is sent to a widget when a drag and drop action enters it.

A widget must accept this event in order to receive the drag move events that are sent while the drag and drop action is in progress. The drag enter event is always immediately followed by a drag move event.

QDragEnterEvent inherits most of its functionality from QDragMoveEvent, which in turn inherits most of its functionality from QDropEvent.

Methods

impl QDragEnterEvent[src]

pub unsafe fn copy_from(
    &self,
    other: impl CastInto<Ref<QDragEnterEvent>>
) -> Ref<QDragEnterEvent>
[src]

The QDragEnterEvent class provides an event which is sent to a widget when a drag and drop action enters it.

Calls C++ function: QDragEnterEvent& QDragEnterEvent::operator=(const QDragEnterEvent& other).

C++ documentation:

The QDragEnterEvent class provides an event which is sent to a widget when a drag and drop action enters it.

A widget must accept this event in order to receive the drag move events that are sent while the drag and drop action is in progress. The drag enter event is always immediately followed by a drag move event.

QDragEnterEvent inherits most of its functionality from QDragMoveEvent, which in turn inherits most of its functionality from QDropEvent.

pub unsafe fn new(
    pos: impl CastInto<Ref<QPoint>>,
    actions: QFlags<DropAction>,
    data: impl CastInto<Ptr<QMimeData>>,
    buttons: QFlags<MouseButton>,
    modifiers: QFlags<KeyboardModifier>
) -> CppBox<QDragEnterEvent>
[src]

Constructs a QDragEnterEvent that represents a drag entering a widget at the given point with mouse and keyboard states specified by buttons and modifiers.

Calls C++ function: [constructor] void QDragEnterEvent::QDragEnterEvent(const QPoint& pos, QFlags<Qt::DropAction> actions, const QMimeData* data, QFlags<Qt::MouseButton> buttons, QFlags<Qt::KeyboardModifier> modifiers).

C++ documentation:

Constructs a QDragEnterEvent that represents a drag entering a widget at the given point with mouse and keyboard states specified by buttons and modifiers.

The drag data is passed as MIME-encoded information in data, and the specified actions describe the possible types of drag and drop operation that can be performed.

Warning: Do not create a QDragEnterEvent yourself since these objects rely on Qt's internal state.

pub unsafe fn new_copy(
    other: impl CastInto<Ref<QDragEnterEvent>>
) -> CppBox<QDragEnterEvent>
[src]

The QDragEnterEvent class provides an event which is sent to a widget when a drag and drop action enters it.

Calls C++ function: [constructor] void QDragEnterEvent::QDragEnterEvent(const QDragEnterEvent& other).

C++ documentation:

The QDragEnterEvent class provides an event which is sent to a widget when a drag and drop action enters it.

A widget must accept this event in order to receive the drag move events that are sent while the drag and drop action is in progress. The drag enter event is always immediately followed by a drag move event.

QDragEnterEvent inherits most of its functionality from QDragMoveEvent, which in turn inherits most of its functionality from QDropEvent.

Methods from Deref<Target = QDragMoveEvent>

pub unsafe fn accept_0a(&self)[src]

This is an overloaded function.

Calls C++ function: void QDragMoveEvent::accept().

C++ documentation:

This is an overloaded function.

Calls QDropEvent::accept().

pub unsafe fn accept_1a(&self, r: impl CastInto<Ref<QRect>>)[src]

The same as accept(), but also notifies that future moves will also be acceptable if they remain within the rectangle given on the widget. This can improve performance, but may also be ignored by the underlying system.

Calls C++ function: void QDragMoveEvent::accept(const QRect& r).

C++ documentation:

The same as accept(), but also notifies that future moves will also be acceptable if they remain within the rectangle given on the widget. This can improve performance, but may also be ignored by the underlying system.

If the rectangle is empty, drag move events will be sent continuously. This is useful if the source is scrolling in a timer event.

pub unsafe fn answer_rect(&self) -> CppBox<QRect>[src]

Returns the rectangle in the widget where the drop will occur if accepted. You can use this information to restrict drops to certain places on the widget.

Calls C++ function: QRect QDragMoveEvent::answerRect() const.

C++ documentation:

Returns the rectangle in the widget where the drop will occur if accepted. You can use this information to restrict drops to certain places on the widget.

pub unsafe fn copy_from(
    &self,
    other: impl CastInto<Ref<QDragMoveEvent>>
) -> Ref<QDragMoveEvent>
[src]

The QDragMoveEvent class provides an event which is sent while a drag and drop action is in progress.

Calls C++ function: QDragMoveEvent& QDragMoveEvent::operator=(const QDragMoveEvent& other).

C++ documentation:

The QDragMoveEvent class provides an event which is sent while a drag and drop action is in progress.

A widget will receive drag move events repeatedly while the drag is within its boundaries, if it accepts drop events and enter events. The widget should examine the event to see what kind of data it provides, and call the accept() function to accept the drop if appropriate.

The rectangle supplied by the answerRect() function can be used to restrict drops to certain parts of the widget. For example, we can check whether the rectangle intersects with the geometry of a certain child widget and only call acceptProposedAction() if that is the case.

Note that this class inherits most of its functionality from QDropEvent.

pub unsafe fn ignore_0a(&self)[src]

This is an overloaded function.

Calls C++ function: void QDragMoveEvent::ignore().

C++ documentation:

This is an overloaded function.

Calls QDropEvent::ignore().

pub unsafe fn ignore_1a(&self, r: impl CastInto<Ref<QRect>>)[src]

The opposite of the accept(const QRect&) function. Moves within the rectangle are not acceptable, and will be ignored.

Calls C++ function: void QDragMoveEvent::ignore(const QRect& r).

C++ documentation:

The opposite of the accept(const QRect&) function. Moves within the rectangle are not acceptable, and will be ignored.

Trait Implementations

impl CppDeletable for QDragEnterEvent[src]

unsafe fn delete(&self)[src]

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

impl Deref for QDragEnterEvent[src]

type Target = QDragMoveEvent

The resulting type after dereferencing.

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

Calls C++ function: QDragMoveEvent* static_cast<QDragMoveEvent*>(QDragEnterEvent* ptr).

impl DynamicCast<QDragEnterEvent> for QDragMoveEvent[src]

unsafe fn dynamic_cast(ptr: Ptr<QDragMoveEvent>) -> Ptr<QDragEnterEvent>[src]

Calls C++ function: QDragEnterEvent* dynamic_cast<QDragEnterEvent*>(QDragMoveEvent* ptr).

impl DynamicCast<QDragEnterEvent> for QDropEvent[src]

unsafe fn dynamic_cast(ptr: Ptr<QDropEvent>) -> Ptr<QDragEnterEvent>[src]

Calls C++ function: QDragEnterEvent* dynamic_cast<QDragEnterEvent*>(QDropEvent* ptr).

impl DynamicCast<QDragEnterEvent> for QEvent[src]

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

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

impl StaticDowncast<QDragEnterEvent> for QDragMoveEvent[src]

unsafe fn static_downcast(ptr: Ptr<QDragMoveEvent>) -> Ptr<QDragEnterEvent>[src]

Calls C++ function: QDragEnterEvent* static_cast<QDragEnterEvent*>(QDragMoveEvent* ptr).

impl StaticDowncast<QDragEnterEvent> for QDropEvent[src]

unsafe fn static_downcast(ptr: Ptr<QDropEvent>) -> Ptr<QDragEnterEvent>[src]

Calls C++ function: QDragEnterEvent* static_cast<QDragEnterEvent*>(QDropEvent* ptr).

impl StaticDowncast<QDragEnterEvent> for QEvent[src]

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

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

impl StaticUpcast<QDragMoveEvent> for QDragEnterEvent[src]

unsafe fn static_upcast(ptr: Ptr<QDragEnterEvent>) -> Ptr<QDragMoveEvent>[src]

Calls C++ function: QDragMoveEvent* static_cast<QDragMoveEvent*>(QDragEnterEvent* ptr).

impl StaticUpcast<QDropEvent> for QDragEnterEvent[src]

unsafe fn static_upcast(ptr: Ptr<QDragEnterEvent>) -> Ptr<QDropEvent>[src]

Calls C++ function: QDropEvent* static_cast<QDropEvent*>(QDragEnterEvent* ptr).

impl StaticUpcast<QEvent> for QDragEnterEvent[src]

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

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