13#include <QFontDatabase>
15#include <private/qobject_p.h>
19#if QT_CONFIG(qml_network)
20#include <QNetworkRequest>
21#include <QNetworkReply>
24#include <QtCore/QCoreApplication>
25#include <QtCore/private/qduplicatetracker_p.h>
27#include <QtGui/private/qfontdatabase_p.h>
38#if QT_CONFIG(qml_network)
42 void fontDownloaded(
int id);
62#if QT_CONFIG(qml_network)
71void QQuickFontObject::replyFinished()
76 emit fontDownloaded(
id);
80 emit fontDownloaded(-1);
137 fontLoaderFonts()->reset();
206#if QT_CONFIG(qml_network)
213 this,
SLOT(updateFontInfo(
int)));
220#if QT_CONFIG(qml_network)
224 this,
SLOT(updateFontInfo(
int)));
230 updateFontInfo(fo->
id);
235void QQuickFontLoader::updateFontInfo(
int id)
244 if (id < p->applicationFonts.size()) {
260 if (
font !=
d->font) {
360 return d->font.resolveMask() == 0 ?
QString() :
d->font.family();
404#include <qquickfontloader.moc>
406#include "moc_qquickfontloader_p.cpp"
static QFontDatabasePrivate * instance()
static int addApplicationFontFromData(const QByteArray &fontData)
static int addApplicationFont(const QString &fileName)
QHash< QUrl, QQuickFontObject * > map
void setStyle(Style style)
Sets the style of the font to style.
void setFamily(const QString &)
Sets the family name of the font.
void setStyleName(const QString &)
void setStretch(int)
Sets the stretch factor for the font.
Weight
Qt uses a weighting scale from 1 to 1000 compatible with OpenType.
void setWeight(Weight weight)
Sets the weight of the font to weight, using the scale defined by \l QFont::Weight enumeration.
qsizetype size() const noexcept
Returns the number of items in the hash.
void clear() noexcept(std::is_nothrow_destructible< Node >::value)
Removes all items from the hash and frees up all memory used by it.
QByteArray readAll()
Reads all remaining data from the device, and returns it as a byte array.
QString errorString() const
Returns a human-readable description of the last device error that occurred.
T value(const Key &key, const T &defaultValue=T()) const
bool contains(const Key &key) const
The QNetworkAccessManager class allows the application to send network requests and receive replies.
QNetworkReply * get(const QNetworkRequest &request)
Posts a request to obtain the contents of the target request and returns a new QNetworkReply object o...
The QNetworkReply class contains the data and headers for a request sent with QNetworkAccessManager.
NetworkError error() const
Returns the error that was found during the processing of this request.
QUrl url() const
Returns the URL of the content downloaded or uploaded.
The QNetworkRequest class holds a request to be sent with QNetworkAccessManager.
@ HttpPipeliningAllowedAttribute
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
void deleteLater()
\threadsafe
The QQmlContext class defines a context within a QML engine.
static QString urlToLocalFileOrQrc(const QString &)
If url is a local file returns a path suitable for passing to QFile.
QQuickFontLoaderPrivate()
QQuickFontLoader::Status status
QQuickFontLoader(QObject *parent=nullptr)
\qmltype FontLoader \instantiates QQuickFontLoader \inqmlmodule QtQuick
void setSource(const QUrl &url)
QQuickFontObject(int _id=-1)
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QString toString(FormattingOptions options=FormattingOptions(PrettyDecoded)) const
Returns a string representation of the URL.
QMap< QString, QString > map
[6]
Combined button and popup list for selecting options.
void qAddPreRoutine(QtStartUpFunction p)
void qAddPostRoutine(QtCleanUpFunction p)
void qRemovePostRoutine(QtCleanUpFunction p)
static const QCssKnownValue properties[NumProperties - 1]
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
QQmlContext * qmlContext(const QObject *obj)
Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me)
static void q_QFontLoaderFontsAddReset()
static void q_QFontLoaderFontsStaticReset()
static QUrl resolvedUrl(const QUrl &url, const QQmlRefPointer< QQmlContextData > &context)
#define qPrintable(string)
QUrl url("example.com")
[constructor-url-reference]
QNetworkAccessManager manager
void replyFinished(QNetworkReply *reply)
[1]
char * toString(const MyType &t)
[31]
QList< Properties > properties
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent