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
4#ifndef QQUICKWINDOW_ATTACHED_P_H
5#define QQUICKWINDOW_ATTACHED_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 <private/qtquickglobal_p.h>
19#include <qqml.h>
20#include <QWindow>
21
22QT_BEGIN_NAMESPACE
23
24class QQuickItem;
25class QQuickWindow;
26
27class Q_QUICK_PRIVATE_EXPORT QQuickWindowAttached : public QObject
28{
29 Q_OBJECT
30
31 Q_PROPERTY(QWindow::Visibility visibility READ visibility NOTIFY visibilityChanged FINAL)
32 Q_PROPERTY(bool active READ isActive NOTIFY activeChanged FINAL)
33 Q_PROPERTY(QQuickItem* activeFocusItem READ activeFocusItem NOTIFY activeFocusItemChanged FINAL)
34 Q_PROPERTY(QQuickItem* contentItem READ contentItem NOTIFY contentItemChanged FINAL)
35 Q_PROPERTY(int width READ width NOTIFY widthChanged FINAL)
36 Q_PROPERTY(int height READ height NOTIFY heightChanged FINAL)
37 Q_PROPERTY(QQuickWindow *window READ window NOTIFY windowChanged FINAL)
38 QML_ANONYMOUS
39 QML_ADDED_IN_VERSION(2, 0)
40
41public:
42 QQuickWindowAttached(QObject* attachee);
43
44 QWindow::Visibility visibility() const;
45 bool isActive() const;
46 QQuickItem* activeFocusItem() const;
47 QQuickItem* contentItem() const;
48 int width() const;
49 int height() const;
50 QQuickWindow *window() const;
51
52Q_SIGNALS:
53
54 void visibilityChanged();
55 void activeChanged();
56 void activeFocusItemChanged();
57 void contentItemChanged();
58 void widthChanged();
59 void heightChanged();
60 void windowChanged();
61
62protected Q_SLOTS:
63 void windowChange(QQuickWindow*);
64
65private:
66 QQuickWindow* m_window;
67 QQuickItem* m_attachee;
68};
69
70QT_END_NAMESPACE
71
72#endif
73

source code of qtdeclarative/src/quick/items/qquickwindowattached_p.h