summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsdrag.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-02-22 10:58:28 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-29 20:10:30 +0100
commit3a72a1c7ed5adcdf3e473b50cc9c932e9290ee81 (patch)
treec9c6ab476e935c1141675382c051ef86e003440d /src/plugins/platforms/windows/qwindowsdrag.h
parent70784b9069fbd1c73eddbbfc83ffb44b2ca15854 (diff)
Refactor the QPA dnd interface.
- Give QPlatformDrag a synchronous drag() function returning the Qt::DropAction - Move the base functionality for asynchronous event handling to the platformsupport library as QBasicDrag (extendable base class handling drag icon and providing new virtuals) and QSimpleDrag (sample implementation for drag within the Qt application). - Change the Windows implementation accordingly. - Change XCB to be based on QBasicDrag. - Clean up QDragManager. Change-Id: I654f76f0e55a385ba189bd74f3ceaded6a8fe318 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsdrag.h')
-rw-r--r--src/plugins/platforms/windows/qwindowsdrag.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/plugins/platforms/windows/qwindowsdrag.h b/src/plugins/platforms/windows/qwindowsdrag.h
index 86b5539f92..7b629baccc 100644
--- a/src/plugins/platforms/windows/qwindowsdrag.h
+++ b/src/plugins/platforms/windows/qwindowsdrag.h
@@ -45,9 +45,9 @@
#include "qwindowsinternalmimedata.h"
#include <QtGui/QPlatformDrag>
+#include <QtGui/QPixmap>
QT_BEGIN_NAMESPACE
-
class QWindowsDropMimeData : public QWindowsInternalMimeData {
public:
QWindowsDropMimeData() {}
@@ -73,11 +73,10 @@ public:
private:
inline QWindow *findDragOverWindow(const POINTL &pt) const;
- void sendDragEnterEvent(QWindow *to, DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect);
+ void handleDrag(QWindow *window, DWORD grfKeyState, const QPoint &, LPDWORD pdwEffect);
ULONG m_refs;
QWindow *const m_window;
- QWindow *m_currentWindow;
QRect m_answerRect;
QPoint m_lastPoint;
DWORD m_chosenEffect;
@@ -92,25 +91,20 @@ public:
virtual QMimeData *platformDropData() { return &m_dropData; }
- virtual void startDrag();
- virtual void move(const QMouseEvent *me);
- virtual void drop(const QMouseEvent *me);
- virtual void cancel();
+ virtual Qt::DropAction drag(QDrag *drag);
static QWindowsDrag *instance();
IDataObject *dropDataObject() const { return m_dropDataObject; }
void setDropDataObject(IDataObject *dataObject) { m_dropDataObject = dataObject; }
void releaseDropDataObject();
-
- bool dragBeingCancelled() const { return m_dragBeingCancelled; }
+ QMimeData *dropData();
QPixmap defaultCursor(Qt::DropAction action) const;
private:
QWindowsDropMimeData m_dropData;
IDataObject *m_dropDataObject;
- bool m_dragBeingCancelled;
mutable QPixmap m_copyDragCursor;
mutable QPixmap m_moveDragCursor;