/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
** Contact: http://www.qt-project.org/
**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
+** This file is part of the QtQml module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qquickdroparea_p.h"
#include "qquickdrag_p.h"
#include "qquickitem_p.h"
-#include "qquickcanvas.h"
+#include "qquickwindow.h"
+
+#include <private/qqmlengine_p.h>
-#include <private/qdeclarativeengine_p.h>
+#ifndef QT_NO_DRAGANDDROP
QT_BEGIN_NAMESPACE
QRegExp keyRegExp;
QPointF dragPosition;
QQuickDropAreaDrag *drag;
- QDeclarativeGuard<QObject> source;
- QDeclarativeGuard<QMimeData> mimeData;
+ QQmlGuard<QObject> source;
+ QQmlGuard<QMimeData> mimeData;
};
QQuickDropAreaPrivate::QQuickDropAreaPrivate()
/*!
\qmlclass DropArea QQuickDropArea
\inqmlmodule QtQuick 2
- \brief The DropArea item provides drag and drop handling.
+ \ingroup qtquick-input
+ \brief For specifying drag and drop handling in an area
A DropArea is an invisible item which receives events when other items are
dragged over it.
if (keyRegExp.isEmpty())
return true;
+ QRegExp copy = keyRegExp;
foreach (const QString &key, keys) {
- if (keyRegExp.exactMatch(key))
+ if (copy.exactMatch(key))
return true;
}
return false;
/*!
\qmlclass DragEvent QQuickDragEvent
\inqmlmodule QtQuick 2
- \brief The DragEvent object provides information about a drag event.
+ \ingroup qtquick-input-events
+ \brief Provides information about a drag event
The position of the drag event can be obtained from the \l x and \l y
properties, and the \l keys property identifies the drag keys of the event
}
/*!
- \qmlproperty enum QtQuick2::DragEvent::action
+ \qmlproperty enumeration QtQuick2::DragEvent::action
This property holds the action that the \l source is to perform on an accepted drop.
The drop action may be one of:
\list
- \o Qt.CopyAction Copy the data to the target
- \o Qt.MoveAction Move the data from the source to the target
- \o Qt.LinkAction Create a link from the source to the target.
- \o Qt.IgnoreAction Ignore the action (do nothing with the data).
+ \li Qt.CopyAction Copy the data to the target
+ \li Qt.MoveAction Move the data from the source to the target
+ \li Qt.LinkAction Create a link from the source to the target.
+ \li Qt.IgnoreAction Ignore the action (do nothing with the data).
\endlist
*/
/*!
\qmlmethod void QtQuick2::DragEvent::accept()
- \qmlmethod void QtQuick2::DragEvent::accept(enum action)
+ \qmlmethod void QtQuick2::DragEvent::accept(enumeration action)
Accepts the drag event.
If an \a action is specified it will overwrite the value of the \l action property.
*/
-void QQuickDropEvent::accept(QDeclarativeV8Function *args)
+void QQuickDropEvent::accept(QQmlV8Function *args)
{
Qt::DropAction action = event->dropAction();
QT_END_NAMESPACE
+#endif // QT_NO_DRAGANDDROP