summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoadrag.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoadrag.h')
-rw-r--r--src/plugins/platforms/cocoa/qcocoadrag.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoadrag.h b/src/plugins/platforms/cocoa/qcocoadrag.h
index 5a0a3fa271..cb8a71ed92 100644
--- a/src/plugins/platforms/cocoa/qcocoadrag.h
+++ b/src/plugins/platforms/cocoa/qcocoadrag.h
@@ -51,10 +51,29 @@
QT_BEGIN_NAMESPACE
-class QCocoaDrag : public QSimpleDrag
+class QCocoaDrag : public QPlatformDrag
{
public:
+ QCocoaDrag();
+
+ virtual QMimeData *platformDropData();
+ virtual Qt::DropAction drag(QDrag *m_drag);
+
+ virtual Qt::DropAction defaultAction(Qt::DropActions possibleActions,
+ Qt::KeyboardModifiers modifiers) const;
+
+ /**
+ * to meet NSView dragImage:at guarantees, we need to record the original
+ * event and view when handling an event in QNSView
+ */
+ void setLastMouseEvent(NSEvent *event, NSView *view);
+
+ void setAcceptedAction(Qt::DropAction act);
private:
+ QDrag *m_drag;
+ NSEvent *m_lastEvent;
+ NSView *m_lastView;
+ Qt::DropAction m_executed_drop_action;
};
class QCocoaDropData : public QInternalMimeData