Qt 4.8
Public Functions | List of all members
QGraphicsSceneDragDropEvent Class Reference

The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framework. More...

#include <qgraphicssceneevent.h>

Inheritance diagram for QGraphicsSceneDragDropEvent:
QGraphicsSceneEvent QEvent

Public Functions

void acceptProposedAction ()
 Sets the proposed action as accepted, i.e, the drop action is set to the proposed action. More...
 
Qt::MouseButtons buttons () const
 Returns a Qt::MouseButtons value indicating which buttons were pressed on the mouse when this mouse event was generated. More...
 
Qt::DropAction dropAction () const
 Returns the action that was performed in this drag and drop. More...
 
const QMimeDatamimeData () const
 This function returns the MIME data of the event. More...
 
Qt::KeyboardModifiers modifiers () const
 Returns the keyboard modifiers that were pressed when the drag and drop event was created. More...
 
QPointF pos () const
 Returns the mouse position of the event relative to the view that sent the event. More...
 
Qt::DropActions possibleActions () const
 Returns the possible drop actions that the drag and drop can result in. More...
 
Qt::DropAction proposedAction () const
 Returns the drop action that is proposed, i.e., preferred. More...
 
 QGraphicsSceneDragDropEvent (Type type=None)
 Constructs a new QGraphicsSceneDragDropEvent of the specified type. More...
 
QPointF scenePos () const
 Returns the position of the mouse in scene coordinates. More...
 
QPoint screenPos () const
 Returns the position of the mouse relative to the screen. More...
 
void setButtons (Qt::MouseButtons buttons)
 Sets the mouse buttons that were pressed when the event was created to buttons. More...
 
void setDropAction (Qt::DropAction action)
 This function lets the receiver of the drop set the drop action that was performed to action, which should be one of the possible actions. More...
 
void setMimeData (const QMimeData *data)
 This function sets the MIME data for the event. More...
 
void setModifiers (Qt::KeyboardModifiers modifiers)
 Sets the keyboard modifiers that were pressed when the event was created to modifiers. More...
 
void setPos (const QPointF &pos)
 Sets the position of the mouse to pos; this should be relative to the widget that generated the event, which normally is a QGraphicsView. More...
 
void setPossibleActions (Qt::DropActions actions)
 Sets the possible drop actions that the drag can result in to actions. More...
 
void setProposedAction (Qt::DropAction action)
 Sets the proposed action to action. More...
 
void setScenePos (const QPointF &pos)
 Sets the scene position of the mouse to pos. More...
 
void setScreenPos (const QPoint &pos)
 Sets the mouse position relative to the screen to pos. More...
 
void setSource (QWidget *source)
 This function set the source widget, i. More...
 
QWidgetsource () const
 This function returns the QGraphicsView that created the QGraphicsSceneDragDropEvent. More...
 
 ~QGraphicsSceneDragDropEvent ()
 Destroys the object. More...
 
- Public Functions inherited from QGraphicsSceneEvent
 QGraphicsSceneEvent (Type type)
 Constructs a generic graphics scene event of the specified type. More...
 
void setWidget (QWidget *widget)
 Sets the widget related to this event. More...
 
QWidgetwidget () const
 Returns the widget where the event originated, or 0 if the event originates from another application. More...
 
 ~QGraphicsSceneEvent ()
 Destroys the event. More...
 
- 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...
 

Additional Inherited Members

- Public Types inherited from QEvent
enum  Type {
  None = 0, Timer = 1, MouseButtonPress = 2, MouseButtonRelease = 3,
  MouseButtonDblClick = 4, MouseMove = 5, KeyPress = 6, KeyRelease = 7,
  FocusIn = 8, FocusOut = 9, Enter = 10, Leave = 11,
  Paint = 12, Move = 13, Resize = 14, Create = 15,
  Destroy = 16, Show = 17, Hide = 18, Close = 19,
  Quit = 20, ParentChange = 21, ParentAboutToChange = 131, ThreadChange = 22,
  WindowActivate = 24, WindowDeactivate = 25, ShowToParent = 26, HideToParent = 27,
  Wheel = 31, WindowTitleChange = 33, WindowIconChange = 34, ApplicationWindowIconChange = 35,
  ApplicationFontChange = 36, ApplicationLayoutDirectionChange = 37, ApplicationPaletteChange = 38, PaletteChange = 39,
  Clipboard = 40, Speech = 42, MetaCall = 43, SockAct = 50,
  WinEventAct = 132, DeferredDelete = 52, DragEnter = 60, DragMove = 61,
  DragLeave = 62, Drop = 63, DragResponse = 64, ChildAdded = 68,
  ChildPolished = 69, ChildRemoved = 71, ShowWindowRequest = 73, PolishRequest = 74,
  Polish = 75, LayoutRequest = 76, UpdateRequest = 77, UpdateLater = 78,
  EmbeddingControl = 79, ActivateControl = 80, DeactivateControl = 81, ContextMenu = 82,
  InputMethod = 83, AccessibilityPrepare = 86, TabletMove = 87, LocaleChange = 88,
  LanguageChange = 89, LayoutDirectionChange = 90, Style = 91, TabletPress = 92,
  TabletRelease = 93, OkRequest = 94, HelpRequest = 95, IconDrag = 96,
  FontChange = 97, EnabledChange = 98, ActivationChange = 99, StyleChange = 100,
  IconTextChange = 101, ModifiedChange = 102, MouseTrackingChange = 109, WindowBlocked = 103,
  WindowUnblocked = 104, WindowStateChange = 105, ToolTip = 110, WhatsThis = 111,
  StatusTip = 112, ActionChanged = 113, ActionAdded = 114, ActionRemoved = 115,
  FileOpen = 116, Shortcut = 117, ShortcutOverride = 51, WhatsThisClicked = 118,
  ToolBarChange = 120, ApplicationActivate = 121, ApplicationActivated = ApplicationActivate, ApplicationDeactivate = 122,
  ApplicationDeactivated = ApplicationDeactivate, QueryWhatsThis = 123, EnterWhatsThisMode = 124, LeaveWhatsThisMode = 125,
  ZOrderChange = 126, HoverEnter = 127, HoverLeave = 128, HoverMove = 129,
  AccessibilityHelp = 119, AccessibilityDescription = 130, AcceptDropsChange = 152, MenubarUpdated = 153,
  ZeroTimerEvent = 154, GraphicsSceneMouseMove = 155, GraphicsSceneMousePress = 156, GraphicsSceneMouseRelease = 157,
  GraphicsSceneMouseDoubleClick = 158, GraphicsSceneContextMenu = 159, GraphicsSceneHoverEnter = 160, GraphicsSceneHoverMove = 161,
  GraphicsSceneHoverLeave = 162, GraphicsSceneHelp = 163, GraphicsSceneDragEnter = 164, GraphicsSceneDragMove = 165,
  GraphicsSceneDragLeave = 166, GraphicsSceneDrop = 167, GraphicsSceneWheel = 168, KeyboardLayoutChange = 169,
  DynamicPropertyChange = 170, TabletEnterProximity = 171, TabletLeaveProximity = 172, NonClientAreaMouseMove = 173,
  NonClientAreaMouseButtonPress = 174, NonClientAreaMouseButtonRelease = 175, NonClientAreaMouseButtonDblClick = 176, MacSizeChange = 177,
  ContentsRectChange = 178, MacGLWindowChange = 179, FutureCallOut = 180, GraphicsSceneResize = 181,
  GraphicsSceneMove = 182, CursorChange = 183, ToolTipChange = 184, NetworkReplyUpdated = 185,
  GrabMouse = 186, UngrabMouse = 187, GrabKeyboard = 188, UngrabKeyboard = 189,
  MacGLClearDrawable = 191, StateMachineSignal = 192, StateMachineWrapped = 193, TouchBegin = 194,
  TouchUpdate = 195, TouchEnd = 196, NativeGesture = 197, RequestSoftwareInputPanel = 199,
  CloseSoftwareInputPanel = 200, UpdateSoftKeys = 201, WinIdChange = 203, Gesture = 198,
  GestureOverride = 202, PlatformPanel = 212, User = 1000, MaxUser = 65535
}
 This enum type defines the valid event types in Qt. More...
 
- Static Public Functions inherited from QEvent
static int registerEventType (int hint=-1)
 Registers and returns a custom event type. More...
 
- Protected Functions inherited from QGraphicsSceneEvent
 QGraphicsSceneEvent (QGraphicsSceneEventPrivate &dd, Type type=None)
 Constructs a generic graphics scene event. More...
 
- Protected Variables inherited from QGraphicsSceneEvent
QScopedPointer< QGraphicsSceneEventPrivated_ptr
 
- Protected Variables inherited from QEvent
QEventPrivate * d
 
ushort t
 

Detailed Description

The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framework.

Since
4.2

QGraphicsView inherits the drag and drop functionality provided by QWidget. When it receives a drag and drop event, it translates it to a QGraphicsSceneDragDropEvent.

QGraphicsSceneDragDropEvent stores events of type GraphicsSceneDragEnter, GraphicsSceneDragLeave, GraphicsSceneDragMove, or GraphicsSceneDrop.

QGraphicsSceneDragDropEvent contains the position of the mouse cursor in both item, scene, and screen coordinates; this can be retrieved with pos(), scenePos(), and screenPos().

The scene sends the event to the first QGraphicsItem under the mouse cursor that accepts drops; a graphics item is set to accept drops with QGraphicsItem::setAcceptDrops().

Definition at line 246 of file qgraphicssceneevent.h.

Constructors and Destructors

◆ QGraphicsSceneDragDropEvent()

QGraphicsSceneDragDropEvent::QGraphicsSceneDragDropEvent ( Type  type = None)

Constructs a new QGraphicsSceneDragDropEvent of the specified type.

Warning
This function is not part of the public interface.

The type can be either QEvent::GraphicsSceneDragEnter, QEvent::GraphicsSceneDragLeave, QEvent::GraphicsSceneDragMove, or QEvent::GraphicsSceneDrop.

Definition at line 1361 of file qgraphicssceneevent.cpp.

1363 {
1364 }
QGraphicsSceneEvent(Type type)
Constructs a generic graphics scene event of the specified type.
Type type() const
Returns the event type.
Definition: qcoreevent.h:303

◆ ~QGraphicsSceneDragDropEvent()

QGraphicsSceneDragDropEvent::~QGraphicsSceneDragDropEvent ( )

Destroys the object.

Definition at line 1369 of file qgraphicssceneevent.cpp.

1370 {
1371 }

Functions

◆ acceptProposedAction()

void QGraphicsSceneDragDropEvent::acceptProposedAction ( )

Sets the proposed action as accepted, i.e, the drop action is set to the proposed action.

This is equal to:

When using this function, one should not call accept().

See also
dropAction(), setDropAction(), proposedAction()

Definition at line 1585 of file qgraphicssceneevent.cpp.

Referenced by QTextControl::processEvent().

1586 {
1588  d->dropAction = d->proposedAction;
1589 }
#define Q_D(Class)
Definition: qglobal.h:2482
QEventPrivate * d
Definition: qcoreevent.h:315
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...

◆ buttons()

Qt::MouseButtons QGraphicsSceneDragDropEvent::buttons ( ) const

Returns a Qt::MouseButtons value indicating which buttons were pressed on the mouse when this mouse event was generated.

See also
Qt::MouseButtons

Definition at line 1462 of file qgraphicssceneevent.cpp.

Referenced by QGraphicsScenePrivate::cloneDragDropEvent(), cloneEvent(), setButtons(), and QGraphicsViewPrivate::storeDragDropEvent().

1463 {
1465  return d->buttons;
1466 }
#define Q_D(Class)
Definition: qglobal.h:2482
QEventPrivate * d
Definition: qcoreevent.h:315
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...

◆ dropAction()

Qt::DropAction QGraphicsSceneDragDropEvent::dropAction ( ) const

Returns the action that was performed in this drag and drop.

This should be set by the receiver of the drop and is returned by QDrag::exec().

See also
setDropAction(), acceptProposedAction()

Definition at line 1599 of file qgraphicssceneevent.cpp.

Referenced by QGraphicsScenePrivate::cloneDragDropEvent(), QGraphicsView::dragEnterEvent(), QGraphicsProxyWidget::dragMoveEvent(), QGraphicsView::dragMoveEvent(), QGraphicsScene::dragMoveEvent(), QGraphicsView::dropEvent(), QTextControl::processEvent(), and QGraphicsViewPrivate::storeDragDropEvent().

1600 {
1602  return d->dropAction;
1603 }
#define Q_D(Class)
Definition: qglobal.h:2482
QEventPrivate * d
Definition: qcoreevent.h:315
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...

◆ mimeData()

const QMimeData * QGraphicsSceneDragDropEvent::mimeData ( ) const

This function returns the MIME data of the event.

Definition at line 1647 of file qgraphicssceneevent.cpp.

Referenced by QGraphicsScenePrivate::cloneDragDropEvent(), QTextControl::processEvent(), and QGraphicsViewPrivate::storeDragDropEvent().

1648 {
1650  return d->mimeData;
1651 }
#define Q_D(Class)
Definition: qglobal.h:2482
QEventPrivate * d
Definition: qcoreevent.h:315
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...

◆ modifiers()

Qt::KeyboardModifiers QGraphicsSceneDragDropEvent::modifiers ( ) const

Returns the keyboard modifiers that were pressed when the drag and drop event was created.

See also
Qt::KeyboardModifiers

Definition at line 1490 of file qgraphicssceneevent.cpp.

Referenced by QGraphicsScenePrivate::cloneDragDropEvent(), cloneEvent(), setModifiers(), and QGraphicsViewPrivate::storeDragDropEvent().

1491 {
1493  return d->modifiers;
1494 }
#define Q_D(Class)
Definition: qglobal.h:2482
QEventPrivate * d
Definition: qcoreevent.h:315
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...

◆ pos()

QPointF QGraphicsSceneDragDropEvent::pos ( ) const

Returns the mouse position of the event relative to the view that sent the event.

See also
QGraphicsView, screenPos(), scenePos()

Definition at line 1379 of file qgraphicssceneevent.cpp.

Referenced by QGraphicsScenePrivate::cloneDragDropEvent(), cloneEvent(), QGraphicsProxyWidget::dragEnterEvent(), QGraphicsProxyWidget::dropEvent(), QTextControl::processEvent(), setPos(), setScenePos(), and setScreenPos().

1380 {
1382  return d->pos;
1383 }
#define Q_D(Class)
Definition: qglobal.h:2482
QEventPrivate * d
Definition: qcoreevent.h:315
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...

◆ possibleActions()

Qt::DropActions QGraphicsSceneDragDropEvent::possibleActions ( ) const

Returns the possible drop actions that the drag and drop can result in.

See also
Qt::DropActions

Definition at line 1520 of file qgraphicssceneevent.cpp.

Referenced by QGraphicsScenePrivate::cloneDragDropEvent(), QGraphicsProxyWidget::dragMoveEvent(), QGraphicsProxyWidget::dropEvent(), and QGraphicsViewPrivate::storeDragDropEvent().

1521 {
1523  return d->possibleActions;
1524 }
#define Q_D(Class)
Definition: qglobal.h:2482
QEventPrivate * d
Definition: qcoreevent.h:315
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...

◆ proposedAction()

Qt::DropAction QGraphicsSceneDragDropEvent::proposedAction ( ) const

Returns the drop action that is proposed, i.e., preferred.

The action must be one of the possible actions as defined by possibleActions().

See also
Qt::DropAction, possibleActions()

Definition at line 1550 of file qgraphicssceneevent.cpp.

Referenced by QGraphicsScenePrivate::cloneDragDropEvent(), QGraphicsProxyWidget::dragMoveEvent(), QGraphicsScene::dragMoveEvent(), and QGraphicsViewPrivate::storeDragDropEvent().

1551 {
1553  return d->proposedAction;
1554 }
#define Q_D(Class)
Definition: qglobal.h:2482
QEventPrivate * d
Definition: qcoreevent.h:315
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...

◆ scenePos()

QPointF QGraphicsSceneDragDropEvent::scenePos ( ) const

Returns the position of the mouse in scene coordinates.

See also
pos(), screenPos()

Definition at line 1408 of file qgraphicssceneevent.cpp.

Referenced by QGraphicsScenePrivate::cloneDragDropEvent(), cloneEvent(), QGraphicsScenePrivate::sendDragDropEvent(), and QGraphicsViewPrivate::storeDragDropEvent().

1409 {
1411  return d->scenePos;
1412 }
#define Q_D(Class)
Definition: qglobal.h:2482
QEventPrivate * d
Definition: qcoreevent.h:315
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...

◆ screenPos()

QPoint QGraphicsSceneDragDropEvent::screenPos ( ) const

Returns the position of the mouse relative to the screen.

See also
pos(), scenePos()

Definition at line 1434 of file qgraphicssceneevent.cpp.

Referenced by QGraphicsScenePrivate::cloneDragDropEvent(), cloneEvent(), QGraphicsScene::dragMoveEvent(), and QGraphicsViewPrivate::storeDragDropEvent().

1435 {
1437  return d->screenPos;
1438 }
#define Q_D(Class)
Definition: qglobal.h:2482
QEventPrivate * d
Definition: qcoreevent.h:315
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...

◆ setButtons()

void QGraphicsSceneDragDropEvent::setButtons ( Qt::MouseButtons  buttons)

Sets the mouse buttons that were pressed when the event was created to buttons.

Warning
This function is not part of the public interface.
See also
Qt::MouseButtons, buttons()

Definition at line 1478 of file qgraphicssceneevent.cpp.

Referenced by QGraphicsScenePrivate::cloneDragDropEvent(), cloneEvent(), QGraphicsView::dragLeaveEvent(), QGraphicsViewPrivate::populateSceneDragDropEvent(), and QGraphicsViewPrivate::storeDragDropEvent().

1479 {
1481  d->buttons = buttons;
1482 }
Qt::MouseButtons buttons() const
Returns a Qt::MouseButtons value indicating which buttons were pressed on the mouse when this mouse e...
#define Q_D(Class)
Definition: qglobal.h:2482
QEventPrivate * d
Definition: qcoreevent.h:315
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...

◆ setDropAction()

void QGraphicsSceneDragDropEvent::setDropAction ( Qt::DropAction  action)

This function lets the receiver of the drop set the drop action that was performed to action, which should be one of the possible actions.

Call accept() in stead of acceptProposedAction() if you use this function.

See also
dropAction(), accept(), possibleActions()

Definition at line 1614 of file qgraphicssceneevent.cpp.

Referenced by QGraphicsScenePrivate::cloneDragDropEvent(), QGraphicsProxyWidget::dragEnterEvent(), QGraphicsView::dragLeaveEvent(), QGraphicsScene::dragMoveEvent(), QGraphicsViewPrivate::populateSceneDragDropEvent(), and QGraphicsViewPrivate::storeDragDropEvent().

1615 {
1617  d->dropAction = action;
1618 }
#define Q_D(Class)
Definition: qglobal.h:2482
QEventPrivate * d
Definition: qcoreevent.h:315
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...

◆ setMimeData()

void QGraphicsSceneDragDropEvent::setMimeData ( const QMimeData data)

This function sets the MIME data for the event.

Warning
This function is not part of the public interface.

Definition at line 1660 of file qgraphicssceneevent.cpp.

Referenced by QGraphicsScenePrivate::cloneDragDropEvent(), QGraphicsView::dragLeaveEvent(), QGraphicsViewPrivate::populateSceneDragDropEvent(), and QGraphicsViewPrivate::storeDragDropEvent().

1661 {
1663  d->mimeData = data;
1664 }
#define Q_D(Class)
Definition: qglobal.h:2482
static const char * data(const QByteArray &arr)
QEventPrivate * d
Definition: qcoreevent.h:315
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...

◆ setModifiers()

void QGraphicsSceneDragDropEvent::setModifiers ( Qt::KeyboardModifiers  modifiers)

Sets the keyboard modifiers that were pressed when the event was created to modifiers.

Warning
This function is not part of the public interface.
See also
Qt::KeyboardModifiers, modifiers()

Definition at line 1507 of file qgraphicssceneevent.cpp.

Referenced by QGraphicsScenePrivate::cloneDragDropEvent(), cloneEvent(), QGraphicsView::dragLeaveEvent(), QGraphicsViewPrivate::populateSceneDragDropEvent(), and QGraphicsViewPrivate::storeDragDropEvent().

1508 {
1510  d->modifiers = modifiers;
1511 }
Qt::KeyboardModifiers modifiers() const
Returns the keyboard modifiers that were pressed when the drag and drop event was created...
#define Q_D(Class)
Definition: qglobal.h:2482
QEventPrivate * d
Definition: qcoreevent.h:315
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...

◆ setPos()

void QGraphicsSceneDragDropEvent::setPos ( const QPointF pos)

Sets the position of the mouse to pos; this should be relative to the widget that generated the event, which normally is a QGraphicsView.

Warning
This function is not part of the public interface.
See also
pos(), setScenePos(), setScreenPos()

Definition at line 1397 of file qgraphicssceneevent.cpp.

Referenced by QGraphicsScenePrivate::cloneDragDropEvent(), cloneEvent(), and QGraphicsScenePrivate::sendDragDropEvent().

1398 {
1400  d->pos = pos;
1401 }
#define Q_D(Class)
Definition: qglobal.h:2482
QEventPrivate * d
Definition: qcoreevent.h:315
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...
QPointF pos() const
Returns the mouse position of the event relative to the view that sent the event. ...

◆ setPossibleActions()

void QGraphicsSceneDragDropEvent::setPossibleActions ( Qt::DropActions  actions)

Sets the possible drop actions that the drag can result in to actions.

Warning
This function is not part of the public interface.
See also
Qt::DropActions, possibleActions()

Definition at line 1536 of file qgraphicssceneevent.cpp.

Referenced by QGraphicsScenePrivate::cloneDragDropEvent(), QGraphicsView::dragLeaveEvent(), QGraphicsViewPrivate::populateSceneDragDropEvent(), and QGraphicsViewPrivate::storeDragDropEvent().

1537 {
1539  d->possibleActions = actions;
1540 }
#define Q_D(Class)
Definition: qglobal.h:2482
QEventPrivate * d
Definition: qcoreevent.h:315
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...

◆ setProposedAction()

void QGraphicsSceneDragDropEvent::setProposedAction ( Qt::DropAction  action)

Sets the proposed action to action.

Warning
This function is not part of the public interface. The proposed action is a Qt::DropAction that is one of the possible actions as given by possibleActions().
See also
proposedAction(), Qt::DropAction, possibleActions()

Definition at line 1568 of file qgraphicssceneevent.cpp.

Referenced by QGraphicsScenePrivate::cloneDragDropEvent(), QGraphicsView::dragLeaveEvent(), QGraphicsViewPrivate::populateSceneDragDropEvent(), and QGraphicsViewPrivate::storeDragDropEvent().

1569 {
1571  d->proposedAction = action;
1572 }
#define Q_D(Class)
Definition: qglobal.h:2482
QEventPrivate * d
Definition: qcoreevent.h:315
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...

◆ setScenePos()

void QGraphicsSceneDragDropEvent::setScenePos ( const QPointF pos)

Sets the scene position of the mouse to pos.

Warning
This function is not part of the public interface.
See also
scenePos(), setScreenPos(), setPos()

Definition at line 1423 of file qgraphicssceneevent.cpp.

Referenced by QGraphicsScenePrivate::cloneDragDropEvent(), cloneEvent(), QGraphicsView::dragLeaveEvent(), QGraphicsViewPrivate::populateSceneDragDropEvent(), and QGraphicsViewPrivate::storeDragDropEvent().

1424 {
1426  d->scenePos = pos;
1427 }
#define Q_D(Class)
Definition: qglobal.h:2482
QEventPrivate * d
Definition: qcoreevent.h:315
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...
QPointF pos() const
Returns the mouse position of the event relative to the view that sent the event. ...

◆ setScreenPos()

void QGraphicsSceneDragDropEvent::setScreenPos ( const QPoint pos)

Sets the mouse position relative to the screen to pos.

Warning
This function is not part of the public interface.
See also
screenPos(), setScenePos(), setPos()

Definition at line 1449 of file qgraphicssceneevent.cpp.

Referenced by QGraphicsScenePrivate::cloneDragDropEvent(), cloneEvent(), QGraphicsView::dragLeaveEvent(), QGraphicsViewPrivate::populateSceneDragDropEvent(), and QGraphicsViewPrivate::storeDragDropEvent().

1450 {
1452  d->screenPos = pos;
1453 }
#define Q_D(Class)
Definition: qglobal.h:2482
QEventPrivate * d
Definition: qcoreevent.h:315
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...
QPointF pos() const
Returns the mouse position of the event relative to the view that sent the event. ...

◆ setSource()

void QGraphicsSceneDragDropEvent::setSource ( QWidget source)

This function set the source widget, i.

Warning
This function is not part of the public interface. e., the widget that created the drop event, to source.

Definition at line 1638 of file qgraphicssceneevent.cpp.

Referenced by QGraphicsScenePrivate::cloneDragDropEvent(), QGraphicsView::dragLeaveEvent(), QGraphicsViewPrivate::populateSceneDragDropEvent(), and QGraphicsViewPrivate::storeDragDropEvent().

1639 {
1641  d->source = source;
1642 }
#define Q_D(Class)
Definition: qglobal.h:2482
QWidget * source() const
This function returns the QGraphicsView that created the QGraphicsSceneDragDropEvent.
QEventPrivate * d
Definition: qcoreevent.h:315
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...

◆ source()

QWidget * QGraphicsSceneDragDropEvent::source ( ) const

This function returns the QGraphicsView that created the QGraphicsSceneDragDropEvent.

Definition at line 1624 of file qgraphicssceneevent.cpp.

Referenced by QGraphicsScenePrivate::cloneDragDropEvent(), QTextControl::processEvent(), setSource(), and QGraphicsViewPrivate::storeDragDropEvent().

1625 {
1627  return d->source;
1628 }
#define Q_D(Class)
Definition: qglobal.h:2482
QEventPrivate * d
Definition: qcoreevent.h:315
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...

The documentation for this class was generated from the following files: