Qt 4.8
|
The QDragEnterEvent class provides an event which is sent to a widget when a drag and drop action enters it. More...
#include <qevent.h>
Public Functions | |
QDragEnterEvent (const QPoint &pos, Qt::DropActions actions, const QMimeData *data, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) | |
Constructs a QDragEnterEvent that represents a drag entering a widget at the given point with mouse and keyboard states specified by buttons and modifiers. More... | |
~QDragEnterEvent () | |
Public Functions inherited from QDragMoveEvent | |
void | accept () |
Calls QDropEvent::accept(). More... | |
void | accept (const QRect &r) |
The same as accept(), but also notifies that future moves will also be acceptable if they remain within the rectangle given on the widget. More... | |
QRect | answerRect () const |
Returns the rectangle in the widget where the drop will occur if accepted. More... | |
void | ignore () |
Calls QDropEvent::ignore(). More... | |
void | ignore (const QRect &r) |
The opposite of the accept(const QRect&) function. More... | |
QDragMoveEvent (const QPoint &pos, Qt::DropActions actions, const QMimeData *data, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Type type=DragMove) | |
Creates a QDragMoveEvent of the required type indicating that the mouse is at position pos given within a widget. More... | |
~QDragMoveEvent () | |
Destroys the event. More... | |
Public Functions inherited from QDropEvent | |
void | acceptProposedAction () |
Sets the drop action to be the proposed action. More... | |
Qt::DropAction | dropAction () const |
Returns the action to be performed on the data by the target. More... | |
QByteArray | encodedData (const char *) const |
Returns a byte array containing the drag's data, in format. More... | |
const char * | format (int n=0) const |
Returns a string describing one of the available data types for this drag. More... | |
Qt::KeyboardModifiers | keyboardModifiers () const |
Returns the modifier keys that are pressed. More... | |
const QMimeData * | mimeData () const |
Returns the data that was dropped on the widget and its associated MIME type information. More... | |
Qt::MouseButtons | mouseButtons () const |
Returns the mouse buttons that are pressed. More... | |
const QPoint & | pos () const |
Returns the position where the drop was made. More... | |
Qt::DropActions | possibleActions () const |
Returns an OR-combination of possible drop actions. More... | |
Qt::DropAction | proposedAction () const |
Returns the proposed drop action. More... | |
bool | provides (const char *) const |
Returns true if this event provides format mimeType; otherwise returns false. More... | |
QDropEvent (const QPoint &pos, Qt::DropActions actions, const QMimeData *data, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Type type=Drop) | |
Constructs a drop event of a certain type corresponding to a drop at the point specified by pos in the destination widget's coordinate system. More... | |
void | setDropAction (Qt::DropAction action) |
Sets the action to be performed on the data by the target. More... | |
QWidget * | source () const |
If the source of the drag operation is a widget in this application, this function returns that source; otherwise it returns 0. More... | |
~QDropEvent () | |
Public Functions inherited from QEvent | |
void | accept () |
Sets the accept flag of the event object, the equivalent of calling setAccepted(true). More... | |
void | ignore () |
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false). More... | |
bool | isAccepted () const |
QEvent (Type type) | |
Contructs an event object of type type. More... | |
void | setAccepted (bool accepted) |
bool | spontaneous () const |
Returns true if the event originated outside the application (a system event); otherwise returns false. More... | |
Type | type () const |
Returns the event type. More... | |
virtual | ~QEvent () |
Destroys the event. More... | |
Public Functions inherited from QMimeSource | |
virtual | ~QMimeSource () |
Destroys the MIME source. More... | |
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 QDragMoveEvent 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.
QDragEnterEvent::QDragEnterEvent | ( | const QPoint & | point, |
Qt::DropActions | actions, | ||
const QMimeData * | data, | ||
Qt::MouseButtons | buttons, | ||
Qt::KeyboardModifiers | modifiers | ||
) |
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.
Definition at line 2977 of file qevent.cpp.
QDragEnterEvent::~QDragEnterEvent | ( | ) |
Definition at line 2984 of file qevent.cpp.