aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/handlers/qquickpointerhandler_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/handlers/qquickpointerhandler_p.h')
-rw-r--r--src/quick/handlers/qquickpointerhandler_p.h62
1 files changed, 18 insertions, 44 deletions
diff --git a/src/quick/handlers/qquickpointerhandler_p.h b/src/quick/handlers/qquickpointerhandler_p.h
index f7e7b83164..e54338f677 100644
--- a/src/quick/handlers/qquickpointerhandler_p.h
+++ b/src/quick/handlers/qquickpointerhandler_p.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtQuick module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2018 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QQUICKPOINTERHANDLER_H
#define QQUICKPOINTERHANDLER_H
@@ -51,16 +15,25 @@
// We mean it.
//
-#include <QtQuick/private/qquickevents_p_p.h>
-#include <QtQuick/private/qquickitem_p.h>
+#include <QtCore/QObject>
+#include <QtCore/qloggingcategory.h>
+#include <QtCore/qtconfigmacros.h>
+#include <QtGui/qeventpoint.h>
+#include <QtGui/qpointingdevice.h>
+#include <QtQml/QQmlParserStatus>
+#include <QtQml/qqmlregistration.h>
+#include <QtQuick/qtquickglobal.h>
+#include <QtQuick/qtquickexports.h>
QT_BEGIN_NAMESPACE
Q_DECLARE_LOGGING_CATEGORY(lcPointerHandlerDispatch)
+class QQuickItem;
class QQuickPointerHandlerPrivate;
+class QPointerEvent;
-class Q_QUICK_PRIVATE_EXPORT QQuickPointerHandler : public QObject, public QQmlParserStatus
+class Q_QUICK_EXPORT QQuickPointerHandler : public QObject, public QQmlParserStatus
{
Q_OBJECT
Q_INTERFACES(QQmlParserStatus)
@@ -68,7 +41,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickPointerHandler : public QObject, public QQmlP
Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
Q_PROPERTY(bool active READ active NOTIFY activeChanged)
Q_PROPERTY(QQuickItem * target READ target WRITE setTarget NOTIFY targetChanged)
- Q_PROPERTY(QQuickItem * parent READ parentItem CONSTANT)
+ Q_PROPERTY(QQuickItem * parent READ parentItem WRITE setParentItem NOTIFY parentChanged)
Q_PROPERTY(GrabPermissions grabPermissions READ grabPermissions WRITE setGrabPermissions NOTIFY grabPermissionChanged)
Q_PROPERTY(qreal margin READ margin WRITE setMargin NOTIFY marginChanged)
Q_PROPERTY(int dragThreshold READ dragThreshold WRITE setDragThreshold RESET resetDragThreshold NOTIFY dragThresholdChanged REVISION(2, 15))
@@ -76,6 +49,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickPointerHandler : public QObject, public QQmlP
Q_PROPERTY(Qt::CursorShape cursorShape READ cursorShape WRITE setCursorShape RESET resetCursorShape NOTIFY cursorShapeChanged REVISION(2, 15))
#endif
+ Q_CLASSINFO("ParentProperty", "parent")
QML_NAMED_ELEMENT(PointerHandler)
QML_UNCREATABLE("PointerHandler is an abstract base class.")
QML_ADDED_IN_VERSION(2, 12)
@@ -109,6 +83,7 @@ public:
void setTarget(QQuickItem *target);
QQuickItem * parentItem() const;
+ void setParentItem(QQuickItem *p);
void handlePointerEvent(QPointerEvent *event);
@@ -141,6 +116,7 @@ Q_SIGNALS:
#if QT_CONFIG(cursor)
Q_REVISION(2, 15) void cursorShapeChanged();
#endif
+ Q_REVISION(6, 3) void parentChanged();
protected:
QQuickPointerHandler(QQuickPointerHandlerPrivate &dd, QQuickItem *parent);
@@ -178,6 +154,4 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickPointerHandler::GrabPermissions)
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QQuickPointerHandler)
-
#endif // QQUICKPOINTERHANDLER_H