| 1 | // Copyright (C) 2017 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QQUICKOVERLAY_P_P_H |
| 5 | #define QQUICKOVERLAY_P_P_H |
| 6 | |
| 7 | // |
| 8 | // W A R N I N G |
| 9 | // ------------- |
| 10 | // |
| 11 | // This file is not part of the Qt API. It exists purely as an |
| 12 | // implementation detail. This header file may change from version to |
| 13 | // version without notice, or even be removed. |
| 14 | // |
| 15 | // We mean it. |
| 16 | // |
| 17 | |
| 18 | #include <QtQuickTemplates2/private/qquickoverlay_p.h> |
| 19 | |
| 20 | #include <QtQuick/private/qquickitem_p.h> |
| 21 | #include <QtQuick/private/qquickitemchangelistener_p.h> |
| 22 | |
| 23 | #include <QtCore/qpointer.h> |
| 24 | |
| 25 | QT_BEGIN_NAMESPACE |
| 26 | |
| 27 | class ; |
| 28 | |
| 29 | class Q_AUTOTEST_EXPORT QQuickOverlayPrivate : public QQuickItemPrivate, |
| 30 | public QQuickItemChangeListener |
| 31 | { |
| 32 | public: |
| 33 | Q_DECLARE_PUBLIC(QQuickOverlay) |
| 34 | |
| 35 | static QQuickOverlayPrivate *get(QQuickOverlay *overlay) |
| 36 | { |
| 37 | return overlay->d_func(); |
| 38 | } |
| 39 | |
| 40 | bool startDrag(QEvent *event, const QPointF &pos); |
| 41 | bool handlePress(QQuickItem *source, QEvent *event, QQuickPopup *target); |
| 42 | bool handleMove(QQuickItem *source, QEvent *event, QQuickPopup *target); |
| 43 | bool handleRelease(QQuickItem *source, QEvent *event, QQuickPopup *target); |
| 44 | |
| 45 | bool handleMouseEvent(QQuickItem *source, QMouseEvent *event, QQuickPopup *target = nullptr); |
| 46 | bool handleHoverEvent(QQuickItem *source, QHoverEvent *event, QQuickPopup *target = nullptr); |
| 47 | #if QT_CONFIG(quicktemplates2_multitouch) |
| 48 | bool handleTouchEvent(QQuickItem *source, QTouchEvent *event, QQuickPopup *target = nullptr); |
| 49 | #endif |
| 50 | |
| 51 | void (QQuickPopup *); |
| 52 | void (QQuickPopup *); |
| 53 | void (QQuickPopup *); |
| 54 | |
| 55 | QList<QQuickPopup *> () const; |
| 56 | QList<QQuickPopup *> stackingOrderDrawers() const; |
| 57 | |
| 58 | void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override; |
| 59 | void itemRotationChanged(QQuickItem *item) override; |
| 60 | |
| 61 | void updateGeometry(); |
| 62 | |
| 63 | QQmlComponent *modal = nullptr; |
| 64 | QQmlComponent *modeless = nullptr; |
| 65 | QList<QQuickPopup *> ; |
| 66 | // Store drawers as QQuickPopup instead of QQuickDrawer because they're no longer |
| 67 | // QQuickDrawer by the time removePopup is called. |
| 68 | QList<QQuickPopup *> allDrawers; |
| 69 | QPointer<QQuickPopup> ; |
| 70 | QPointer<QQuickItem> lastActiveFocusItem; |
| 71 | }; |
| 72 | |
| 73 | QT_END_NAMESPACE |
| 74 | |
| 75 | #endif // QQUICKOVERLAY_P_P_H |
| 76 | |