diff options
author | Chris Meyer <cmeyer1969@gmail.com> | 2013-08-26 16:15:23 -0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-09 22:58:45 +0200 |
commit | 391459210de53e342ba5e9c44360754e86d7625c (patch) | |
tree | f68fca8e2f059f8e07b2638245451137af79b479 /src/quick/items/qquickwindow_p.h | |
parent | 2dcb0adc3a0a9b93b4cd09f26f2d1bac0e8cd110 (diff) |
Add support for external drag and drop in Quick items.
Add dragType enums with values of None, Automatic, Internal (default).
Setting to Automatic allows startDrag to be called automatically.
Setting to Internal (default) retains old behavior.
Add mimeData to Drag item to enable external drags.
Call startDrag to start drag manually or change from internal drag to
external drag. Added events dragStarted and dragFinished that get
invoked from startDrag.
Mime data must be specified in the mimeData property as
mime-type / data pairs.
Moved QQuickDrag from qquickmousearea* files to qquickdrag* files to
reduce header interdependencies that caused linking errors in other
modules and also to improve code organization.
Allow DropArea to receive and process external data.
Introduced new variable containsDrag to QQuickDropAreaPrivate. This
replaces mimeData which was previously being used to determine if a
drop operation was currently occurring. The problem was that mimeData
was being externally destructed.
Also introduced accessor methods for getting color, html, image, text,
and urls out of the drop. This facilitates dropping of external data of
those types onto a DropArea.
Added example quick/externaldraganddrop.
Task-number: QTBUG-27498
Change-Id: I1420df7c161ea3399e49a23305273e106baa246f
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Diffstat (limited to 'src/quick/items/qquickwindow_p.h')
-rw-r--r-- | src/quick/items/qquickwindow_p.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/items/qquickwindow_p.h b/src/quick/items/qquickwindow_p.h index aa7d7c5128..ad861754d7 100644 --- a/src/quick/items/qquickwindow_p.h +++ b/src/quick/items/qquickwindow_p.h @@ -57,7 +57,6 @@ #include "qquickwindow.h" #include <QtQuick/private/qsgcontext_p.h> -#include <private/qquickdrag_p.h> #include <QtCore/qthread.h> #include <QtCore/qmutex.h> @@ -73,6 +72,7 @@ QT_BEGIN_NAMESPACE //Make it easy to identify and customize the root item if needed class QSGRenderLoop; +class QQuickDragGrabber; class QQuickRootItem : public QQuickItem { @@ -116,7 +116,7 @@ public: QQuickItem *cursorItem; #endif #ifndef QT_NO_DRAGANDDROP - QQuickDragGrabber dragGrabber; + QQuickDragGrabber *dragGrabber; #endif int touchMouseId; bool checkIfDoubleClicked(ulong newPressEventTimestamp); |