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
qquickapplication_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
4#ifndef QQUICKAPPLICATION_P_H
5#define QQUICKAPPLICATION_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/qtquickglobal_p.h>
19#include <QtQuick/private/qquickscreen_p.h>
20
21#include <QtQml/qqml.h>
22#include <QtQml/private/qqmlglobal_p.h>
23
24#include <QtGui/qfont.h>
25#include <QtGui/qstylehints.h>
26
27#include <QtCore/qobject.h>
28
30
31class Q_QUICK_EXPORT QQuickApplication : public QQmlApplication
32{
34 Q_PROPERTY(bool active READ active NOTIFY activeChanged FINAL) // deprecated, use 'state' instead
35 Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection NOTIFY layoutDirectionChanged FINAL)
36 Q_PROPERTY(bool supportsMultipleWindows READ supportsMultipleWindows CONSTANT FINAL)
37 Q_PROPERTY(Qt::ApplicationState state READ state NOTIFY stateChanged FINAL)
38 Q_PROPERTY(QFont font READ font CONSTANT FINAL)
39 Q_PROPERTY(QString displayName READ displayName WRITE setDisplayName NOTIFY displayNameChanged FINAL)
40 Q_PROPERTY(QQmlListProperty<QQuickScreenInfo> screens READ screens NOTIFY screensChanged FINAL)
41 Q_PROPERTY(QStyleHints *styleHints READ styleHints CONSTANT FINAL)
42
43 QML_NAMED_ELEMENT(Application)
46
47public:
48 explicit QQuickApplication(QObject *parent = nullptr);
49 virtual ~QQuickApplication();
50 bool active() const;
51 Qt::LayoutDirection layoutDirection() const;
52 bool supportsMultipleWindows() const;
53 Qt::ApplicationState state() const;
54 QFont font() const;
56 QString displayName() const;
57 void setDisplayName(const QString &displayName);
58 QStyleHints *styleHints();
59
61 void activeChanged();
62 void displayNameChanged();
63 void layoutDirectionChanged();
64 void stateChanged(Qt::ApplicationState state);
65 void screensChanged();
66
68 void updateScreens();
69
71 Q_DISABLE_COPY(QQuickApplication)
72 QVector<QQuickScreenInfo *> m_screens;
73};
74
76
77#endif // QQUICKAPPLICATION_P_H
\reentrant
Definition qfont.h:22
Definition qlist.h:75
\inmodule QtCore
Definition qobject.h:103
The QQmlListProperty class allows applications to expose list-like properties of QObject-derived clas...
Definition qqmllist.h:24
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
The QStyleHints class contains platform specific hints and settings. \inmodule QtGui.
Definition qstylehints.h:17
else opt state
[0]
Combined button and popup list for selecting options.
Definition qcompare.h:63
static QString displayName(CGDirectDisplayID displayID)
#define QML_NAMED_ELEMENT(NAME)
#define QML_SINGLETON
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS
#define explicit