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
qquickapplicationwindow_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 QQUICKAPPLICATIONWINDOW_P_H
5#define QQUICKAPPLICATIONWINDOW_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/private/qquickwindowmodule_p.h>
19#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
20#include <QtGui/qfont.h>
21#include <QtGui/qpalette.h>
22#include <QtCore/qlocale.h>
23
25
29
30class Q_QUICKTEMPLATES2_EXPORT QQuickApplicationWindow : public QQuickWindowQmlImpl
31{
33 Q_PROPERTY(QQuickItem *background READ background WRITE setBackground NOTIFY backgroundChanged FINAL)
34 Q_PROPERTY(QQuickItem *contentItem READ contentItem CONSTANT FINAL)
35 Q_PRIVATE_PROPERTY(QQuickApplicationWindow::d_func(), QQmlListProperty<QObject> contentData READ contentData FINAL)
36 Q_PROPERTY(QQuickItem *activeFocusControl READ activeFocusControl NOTIFY activeFocusControlChanged FINAL)
37 Q_PROPERTY(QQuickItem *header READ header WRITE setHeader NOTIFY headerChanged FINAL)
38 Q_PROPERTY(QQuickItem *footer READ footer WRITE setFooter NOTIFY footerChanged FINAL)
39 Q_PROPERTY(QFont font READ font WRITE setFont RESET resetFont NOTIFY fontChanged FINAL)
40 Q_PROPERTY(QLocale locale READ locale WRITE setLocale RESET resetLocale NOTIFY localeChanged FINAL)
41 // 2.3 (Qt 5.10)
42 Q_PROPERTY(QQuickItem *menuBar READ menuBar WRITE setMenuBar NOTIFY menuBarChanged FINAL REVISION(2, 3))
43 // 2.14 (Qt 6)
44 Q_PRIVATE_PROPERTY(QQuickApplicationWindow::d_func(), QQuickPalette *palette READ palette WRITE setPalette RESET resetPalette NOTIFY paletteChanged REVISION(2, 3))
45 Q_CLASSINFO("DeferredPropertyNames", "background")
46 Q_CLASSINFO("DefaultProperty", "contentData")
47 QML_NAMED_ELEMENT(ApplicationWindow)
50
51public:
52 explicit QQuickApplicationWindow(QWindow *parent = nullptr);
54
55 static QQuickApplicationWindowAttached *qmlAttachedProperties(QObject *object);
56
57 QQuickItem *background() const;
58 void setBackground(QQuickItem *background);
59
60 QQuickItem *contentItem() const;
61
62 QQuickItem *activeFocusControl() const;
63
64 QQuickItem *header() const;
66
67 QQuickItem *footer() const;
68 void setFooter(QQuickItem *footer);
69
70 QFont font() const;
71 void setFont(const QFont &font);
72 void resetFont();
73
74 QLocale locale() const;
75 void setLocale(const QLocale &locale);
76 void resetLocale();
77
78 QQuickItem *menuBar() const;
79 void setMenuBar(QQuickItem *menuBar);
80
82 void backgroundChanged();
83 void activeFocusControlChanged();
84 void headerChanged();
85 void footerChanged();
86 void fontChanged();
87 void localeChanged();
88 Q_REVISION(2, 3) void menuBarChanged();
89
90protected:
91 bool isComponentComplete() const;
92 void classBegin() override;
93 void componentComplete() override;
94 void resizeEvent(QResizeEvent *event) override;
95
97 Q_DISABLE_COPY(QQuickApplicationWindow)
98 Q_DECLARE_PRIVATE(QQuickApplicationWindow)
99 Q_PRIVATE_SLOT(d_func(), void _q_updateActiveFocus())
100};
101
102class Q_QUICKTEMPLATES2_EXPORT QQuickApplicationWindowAttached : public QObject
103{
105 Q_PROPERTY(QQuickApplicationWindow *window READ window NOTIFY windowChanged FINAL)
106 Q_PROPERTY(QQuickItem *contentItem READ contentItem NOTIFY contentItemChanged FINAL)
107 Q_PROPERTY(QQuickItem *activeFocusControl READ activeFocusControl NOTIFY activeFocusControlChanged FINAL)
108 Q_PROPERTY(QQuickItem *header READ header NOTIFY headerChanged FINAL)
109 Q_PROPERTY(QQuickItem *footer READ footer NOTIFY footerChanged FINAL)
110 Q_PROPERTY(QQuickItem *menuBar READ menuBar NOTIFY menuBarChanged FINAL) // REVISION(2, 3)
111
112public:
114
116 QQuickItem *contentItem() const;
117 QQuickItem *activeFocusControl() const;
118 QQuickItem *header() const;
119 QQuickItem *footer() const;
120 QQuickItem *menuBar() const;
121
123 void windowChanged();
124 void contentItemChanged();
125 void activeFocusControlChanged();
126 void headerChanged();
127 void footerChanged();
128 // 2.3 (Qt 5.10)
129 /*Q_REVISION(2, 3)*/ void menuBarChanged();
130
131private:
132 Q_DISABLE_COPY(QQuickApplicationWindowAttached)
133 Q_DECLARE_PRIVATE(QQuickApplicationWindowAttached)
134};
135
137
138#endif // QQUICKAPPLICATIONWINDOW_P_H
\reentrant
Definition qfont.h:22
\inmodule QtCore
Definition qobject.h:103
The QQmlListProperty class allows applications to expose list-like properties of QObject-derived clas...
Definition qqmllist.h:24
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
Contains color groups for each QML item state. \inmodule QtQuick.
The QResizeEvent class contains event parameters for resize events.
Definition qevent.h:548
\inmodule QtGui
Definition qwindow.h:63
Combined button and popup list for selecting options.
static QString header(const QString &name)
struct _cl_event * event
#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_REVISION(...)
#define Q_CLASSINFO(name, value)
#define Q_PRIVATE_SLOT(d, signature)
#define Q_SIGNALS
#define Q_PRIVATE_PROPERTY(d, text)
#define explicit
aWidget window() -> setWindowTitle("New Window Title")
[2]
QMenuBar * menuBar
[0]
textPart setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"text\""))