Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquickwindowmodule_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 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// Qt-Security score:significant reason:default
4
5#ifndef QQUICKWINDOWMODULE_H
6#define QQUICKWINDOWMODULE_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <private/qtquickglobal_p.h>
20#include <qquickwindow.h>
21#include <qqmlparserstatus.h>
22#include <private/qquickwindowattached_p.h>
23
24QT_BEGIN_NAMESPACE
25
26class QQuickWindowQmlImplPrivate;
27
29{
30 Q_GADGET
31 QML_FOREIGN(QWindow)
34};
35
36class Q_QUICK_EXPORT QQuickWindowQmlImpl : public QQuickWindow, public QQmlParserStatus
37{
38 Q_OBJECT
39 Q_INTERFACES(QQmlParserStatus)
40
41 Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged)
42 Q_PROPERTY(QWindow::Visibility visibility READ visibility WRITE setVisibility NOTIFY
43 visibilityChanged)
44 Q_PROPERTY(QObject *screen READ screen WRITE setScreen NOTIFY screenChanged REVISION(2, 3))
45 QML_ATTACHED(QQuickWindowAttached)
46 QML_NAMED_ELEMENT(Window)
47 QML_ADDED_IN_VERSION(2, 1)
48
49public:
50 QQuickWindowQmlImpl(QWindow *parent = nullptr);
51 ~QQuickWindowQmlImpl();
52
53 void setVisible(bool visible);
54 void setVisibility(QWindow::Visibility visibility);
55
56 QObject *screen() const;
57 void setScreen(QObject *screen);
58
59 QObject *visualParent() const;
60 void setVisualParent(QObject *parent);
61 void visualParentChanged(QObject *) {};
62
63 void setX(int arg);
64 int x() const;
65 void setY(int arg);
66 int y() const;
67 void setZ(qreal arg);
68 qreal z() const;
69 void zChanged() {};
70
71 static QQuickWindowAttached *qmlAttachedProperties(QObject *object);
72
73Q_SIGNALS:
74 void visibleChanged(bool arg);
75 void visibilityChanged(QWindow::Visibility visibility);
76 Q_REVISION(2, 3) void screenChanged();
77
78 void xChanged(int arg);
79 void yChanged(int arg);
80
81protected:
82 void classBegin() override;
83 void componentComplete() override;
84
85 bool event(QEvent *) override;
86
87 QQuickWindowQmlImpl(QQuickWindowQmlImplPrivate &dd, QWindow *parent);
88
89private Q_SLOTS:
90 Q_REVISION(6, 7) void applyWindowVisibility();
91 Q_REVISION(6, 7) void updateTransientParent();
92
93private:
94 bool transientParentVisible();
95 void applyVisualParent();
96
97private:
98 Q_DISABLE_COPY(QQuickWindowQmlImpl)
99 Q_DECLARE_PRIVATE(QQuickWindowQmlImpl)
100};
101
102QT_END_NAMESPACE
103
104#endif
Q_STATIC_LOGGING_CATEGORY(lcAccessibilityCore, "qt.accessibility.core")