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
qquickfontloader_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 QQUICKFONTLOADER_H
5#define QQUICKFONTLOADER_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
20#include <QtQml/qqml.h>
21
22#include <QtCore/qobject.h>
23#include <QtCore/qurl.h>
24
26
28class Q_QUICK_EXPORT QQuickFontLoader : public QObject
29{
31 Q_DECLARE_PRIVATE(QQuickFontLoader)
32
33 Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
34 Q_PROPERTY(QString name READ name NOTIFY nameChanged)
35 Q_PROPERTY(Status status READ status NOTIFY statusChanged)
36 Q_PROPERTY(QFont font READ font NOTIFY fontChanged)
37 QML_NAMED_ELEMENT(FontLoader)
39
40public:
41 enum Status { Null = 0, Ready, Loading, Error };
42 Q_ENUM(Status)
43
44 QQuickFontLoader(QObject *parent = nullptr);
45
46 QUrl source() const;
47 void setSource(const QUrl &url);
48
49 QString name() const;
50
51 QFont font() const;
52
53 Status status() const;
54
55private Q_SLOTS:
56 void updateFontInfo(int);
57
63};
64
66
67#endif // QQUICKFONTLOADER_H
68
\reentrant
Definition qfont.h:22
\inmodule QtCore
Definition qobject.h:103
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qurl.h:94
void statusChanged(QQmlComponent::Status status)
[1]
Definition qlogging.cpp:11
Combined button and popup list for selecting options.
GLuint name
GLsizei GLsizei GLchar * source
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS
QUrl url("example.com")
[constructor-url-reference]