Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickoverlay_p.h
Go to the documentation of this file.
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_H
5#define QQUICKOVERLAY_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 <QtQuick/qquickitem.h>
19#include <QtQuickTemplates2/private/qquickabstractbutton_p.h>
20
22
23class QQmlComponent;
27
28class Q_QUICKTEMPLATES2_EXPORT QQuickOverlay : public QQuickItem
29{
31 Q_PROPERTY(QQmlComponent *modal READ modal WRITE setModal NOTIFY modalChanged FINAL)
32 Q_PROPERTY(QQmlComponent *modeless READ modeless WRITE setModeless NOTIFY modelessChanged FINAL)
33 QML_NAMED_ELEMENT(Overlay)
37
38public:
39 explicit QQuickOverlay(QQuickItem *parent = nullptr);
41
42 QQmlComponent *modal() const;
43 void setModal(QQmlComponent *modal);
44
45 QQmlComponent *modeless() const;
46 void setModeless(QQmlComponent *modeless);
47
48 static QQuickOverlay *overlay(QQuickWindow *window);
49
50 static QQuickOverlayAttached *qmlAttachedProperties(QObject *object);
51
53 void modalChanged();
54 void modelessChanged();
55 void pressed();
56 void released();
57
58protected:
59 void itemChange(ItemChange change, const ItemChangeData &data) override;
60 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
61
62 void mousePressEvent(QMouseEvent *event) override;
63 void mouseMoveEvent(QMouseEvent *event) override;
64 void mouseReleaseEvent(QMouseEvent *event) override;
65#if QT_CONFIG(quicktemplates2_multitouch)
66 void touchEvent(QTouchEvent *event) override;
67#endif
68#if QT_CONFIG(wheelevent)
69 void wheelEvent(QWheelEvent *event) override;
70#endif
71 bool childMouseEventFilter(QQuickItem *item, QEvent *event) override;
72 bool eventFilter(QObject *object, QEvent *event) override;
73
74private:
75 Q_DISABLE_COPY(QQuickOverlay)
76 Q_DECLARE_PRIVATE(QQuickOverlay)
77};
78
79class Q_QUICKTEMPLATES2_EXPORT QQuickOverlayAttached : public QObject
80{
82 Q_PROPERTY(QQuickOverlay *overlay READ overlay NOTIFY overlayChanged FINAL)
83 Q_PROPERTY(QQmlComponent *modal READ modal WRITE setModal NOTIFY modalChanged FINAL)
84 Q_PROPERTY(QQmlComponent *modeless READ modeless WRITE setModeless NOTIFY modelessChanged FINAL)
85
86public:
87 explicit QQuickOverlayAttached(QObject *parent = nullptr);
88
89 QQuickOverlay *overlay() const;
90
91 QQmlComponent *modal() const;
92 void setModal(QQmlComponent *modal);
93
94 QQmlComponent *modeless() const;
95 void setModeless(QQmlComponent *modeless);
96
98 void overlayChanged();
99 void modalChanged();
100 void modelessChanged();
101 void pressed();
102 void released();
103
104private:
105 Q_DISABLE_COPY(QQuickOverlayAttached)
106 Q_DECLARE_PRIVATE(QQuickOverlayAttached)
107};
108
110
111#endif // QQUICKOVERLAY_P_H
\inmodule QtCore
Definition qcoreevent.h:45
\inmodule QtGui
Definition qevent.h:196
\inmodule QtCore
Definition qobject.h:103
The QQmlComponent class encapsulates a QML component definition.
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
ItemChange
Used in conjunction with QQuickItem::itemChange() to notify the item about certain types of changes.
Definition qquickitem.h:144
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
\inmodule QtCore\reentrant
Definition qrect.h:484
The QTouchEvent class contains parameters that describe a touch event.
Definition qevent.h:917
Combined button and popup list for selecting options.
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
struct _cl_event * event
#define QML_UNCREATABLE(REASON)
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define QML_ATTACHED(ATTACHED_TYPE)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS
#define explicit
QGraphicsItem * item
aWidget window() -> setWindowTitle("New Window Title")
[2]
\inmodule QtQuick
Definition qquickitem.h:159