16#include <QtCore/private/qobject_p.h>
17#include <QtCore/qscopedvaluerollback.h>
18#include <QtQuick/private/qquickitem_p.h>
19#include <QtQuick/private/qquickitemchangelistener_p.h>
20#include <QtQuick/private/qquickwindowmodule_p_p.h>
117 void updateFont(
const QFont &
f);
125 void _q_updateActiveFocus();
130 void cancelBackground();
131 void executeBackground(
bool complete =
false);
140 for (
auto &&popup : q_func()->findChildren<
QQuickPopup *>())
152 bool insideRelayout =
false;
162 if (!
p->widthValid()) {
164 p->widthValidFlag =
false;
180 content->
setY(mbh + hh);
182 content->
setHeight(
q->height() - mbh - hh - fh);
192 p->widthValidFlag =
false;
196 p->heightValidFlag =
false;
230 const bool changed =
font !=
f;
240 emit q->fontChanged();
253 if (qobject_cast<QQuickControl *>(
item) || qobject_cast<QQuickTextField *>(
item) || qobject_cast<QQuickTextArea *>(
item))
271 emit q->activeFocusControlChanged();
302QQuickApplicationWindow::QQuickApplicationWindow(
QWindow *
parent)
308QQuickApplicationWindow::~QQuickApplicationWindow()
311 d->setActiveFocusControl(
nullptr);
348 d->executeBackground();
349 return d->background;
352void QQuickApplicationWindow::setBackground(
QQuickItem *background)
358 if (!
d->background.isExecuting())
359 d->cancelBackground();
370 if (!
d->background.isExecuting())
409 d->header->setParentItem(
nullptr);
456void QQuickApplicationWindow::setFooter(
QQuickItem *footer)
464 d->footer->setParentItem(
nullptr);
529 if (!
d->appWindowContentItem) {
532 d->appWindowContentItem->setFocus(
true);
535 return d->appWindowContentItem;
555 return d->activeFocusControl;
580void QQuickApplicationWindow::setFont(
const QFont &
font)
587 d->setFont_helper(resolvedFont);
590void QQuickApplicationWindow::resetFont()
615void QQuickApplicationWindow::setLocale(
const QLocale &locale)
632void QQuickApplicationWindow::resetLocale()
669 d->menuBar->setParentItem(
nullptr);
681 emit menuBarChanged();
702 d->executeBackground(
true);
761 connect(wnd, &QQuickWindow::activeFocusItemChanged,
766 emit q->windowChanged();
767 emit q->contentItemChanged();
770 if ((oldWindow && oldWindow->
menuBar()) || (newWindow && newWindow->
menuBar()))
771 emit q->menuBarChanged();
772 if ((oldWindow && oldWindow->
header()) || (newWindow && newWindow->
header()))
773 emit q->headerChanged();
774 if ((oldWindow && oldWindow->
footer()) || (newWindow && newWindow->
footer()))
775 emit q->footerChanged();
783 control = appWindow->activeFocusControl();
790 emit q->activeFocusControlChanged();
803 if (
QQuickPopup *popup = qobject_cast<QQuickPopup *>(
p->parent())) {
804 d->windowChange(popup->window());
811 d->windowChange(popup->window());
828 return qobject_cast<QQuickApplicationWindow *>(
d->window);
861 return d->activeFocusControl;
921#include "moc_qquickapplicationwindow_p.cpp"
QFont resolve(const QFont &) const
Returns a new QFont that has attributes copied from other that have not been previously set on this f...
QGraphicsWidget * window() const
QGraphicsItem * parentItem() const
Returns a pointer to this item's parent item.
static QMetaObject::Connection connect(const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
QObject * parent() const
Returns a pointer to the parent object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
\threadsafe
QList< T > findChildren(const QString &aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
Returns all children of this object with the given name that can be cast to type T,...
The QPalette class contains color groups for each widget state.
The QQmlListProperty class allows applications to expose list-like properties of QObject-derived clas...
void windowChange(QQuickWindow *wnd)
QQuickItem * activeFocusControl
QQuickApplicationWindow * window
QQuickApplicationWindowAttached(QObject *parent=nullptr)
QQuickItem * activeFocusControl
void setFont_helper(const QFont &f)
void _q_updateActiveFocus()
QQuickItem * activeFocusControl
QQmlListProperty< QObject > contentData()
\qmlproperty list<QtObject> QtQuick.Controls::ApplicationWindow::contentData \qmldefault
void updateChildrenPalettes(const QPalette &parentPalette) override
void setActiveFocusControl(QQuickItem *item)
QPalette defaultPalette() const override
void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override
QQuickApplicationWindowPrivate()
void itemImplicitWidthChanged(QQuickItem *item) override
void updateFont(const QFont &f)
QPalette windowPalette() const override
static void contentData_append(QQmlListProperty< QObject > *prop, QObject *obj)
static QQuickApplicationWindowPrivate * get(QQuickApplicationWindow *window)
QQuickDeferredPointer< QQuickItem > background
void executeBackground(bool complete=false)
void itemVisibilityChanged(QQuickItem *item) override
void itemImplicitHeightChanged(QQuickItem *item) override
void activeFocusControlChanged()
void resizeEvent(QResizeEvent *event) override
Override this to handle resize events (ev).
QQuickItem * activeFocusControl
bool isComponentComplete() const
void classBegin() override
Invoked after class creation, but before any properties have been set.
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
static void updateLocaleRecur(QQuickItem *item, const QLocale &l)
static void hideOldItem(QQuickItem *item)
static QQuickControlPrivate * get(QQuickControl *control)
static void updateFontRecur(QQuickItem *item, const QFont &font)
virtual void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &)
virtual void itemImplicitWidthChanged(QQuickItem *)
virtual void itemVisibilityChanged(QQuickItem *)
virtual void itemImplicitHeightChanged(QQuickItem *)
static void data_clear(QQmlListProperty< QObject > *)
void removeItemChangeListener(QQuickItemChangeListener *, ChangeTypes types)
static qsizetype data_count(QQmlListProperty< QObject > *)
\qmlproperty list<QtObject> QtQuick::Item::data \qmldefault
static QObject * data_at(QQmlListProperty< QObject > *, qsizetype)
static void data_append(QQmlListProperty< QObject > *, QObject *)
static QQuickItemPrivate * get(QQuickItem *item)
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
qreal x
\qmlproperty real QtQuick::Item::x \qmlproperty real QtQuick::Item::y \qmlproperty real QtQuick::Item...
void setParentItem(QQuickItem *parent)
qreal z
\qmlproperty real QtQuick::Item::z
qreal y
Defines the item's y position relative to its parent.
qreal width
This property holds the width of this item.
qreal height
This property holds the height of this item.
QPalette defaultPalette() const override
static QPalette palette(Scope scope)
static QFont font(Scope scope)
void updateChildrenPalettes(const QPalette &parentPalette) override
void classBegin() override
Invoked after class creation, but before any properties have been set.
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
QQuickItem * contentItem
\qmlattachedproperty Item Window::contentItem
\inmodule QtCore\reentrant
The QResizeEvent class contains event parameters for resize events.
virtual void resizeEvent(QResizeEvent *)
Override this to handle resize events (ev).
Combined button and popup list for selecting options.
static QDBusError::ErrorType get(const char *name)
static QString header(const QString &name)
bool qFuzzyIsNull(qfloat16 f) noexcept
GLdouble GLdouble GLdouble GLdouble q
static void layoutItem(QQuickItem *item, qreal y, qreal width)
static QT_BEGIN_NAMESPACE const QQuickItemPrivate::ChangeTypes ItemChanges
Styled top-level window with support for a header and footer.
static QQuickItem * findActiveFocusControl(QQuickWindow *window)
void quickCancelDeferred(QObject *object, const QString &property)
void quickCompleteDeferred(QObject *object, const QString &property, QQuickDeferredPointer< T > &delegate)
void quickBeginDeferred(QObject *object, const QString &property, QQuickDeferredPointer< T > &delegate)
QQuickItem * qobject_cast< QQuickItem * >(QObject *o)
static QString backgroundName()
connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection)
myObject disconnect()
[26]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent