2024-04-11 14:51:43 +08:00
|
|
|
#pragma once
|
2023-05-10 00:27:53 +08:00
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QtQml/qqml.h>
|
|
|
|
#include <QFont>
|
|
|
|
#include "stdafx.h"
|
2023-09-13 15:11:22 +08:00
|
|
|
#include "singleton.h"
|
2023-05-10 00:27:53 +08:00
|
|
|
|
2024-02-27 12:23:24 +08:00
|
|
|
/**
|
|
|
|
* @brief The FluTextStyle class
|
|
|
|
*/
|
2024-04-11 14:51:43 +08:00
|
|
|
class FluTextStyle : public QObject {
|
|
|
|
Q_OBJECT
|
2023-05-10 00:27:53 +08:00
|
|
|
public:
|
2024-04-11 14:51:43 +08:00
|
|
|
Q_PROPERTY_AUTO(QString, family)
|
|
|
|
Q_PROPERTY_AUTO(QFont, Caption);
|
|
|
|
Q_PROPERTY_AUTO(QFont, Body);
|
|
|
|
Q_PROPERTY_AUTO(QFont, BodyStrong);
|
|
|
|
Q_PROPERTY_AUTO(QFont, Subtitle);
|
|
|
|
Q_PROPERTY_AUTO(QFont, Title);
|
|
|
|
Q_PROPERTY_AUTO(QFont, TitleLarge);
|
|
|
|
Q_PROPERTY_AUTO(QFont, Display);
|
2023-05-10 00:27:53 +08:00
|
|
|
QML_NAMED_ELEMENT(FluTextStyle)
|
|
|
|
QML_SINGLETON
|
2024-04-11 14:51:43 +08:00
|
|
|
|
2023-08-24 15:50:37 +08:00
|
|
|
private:
|
|
|
|
explicit FluTextStyle(QObject *parent = nullptr);
|
2024-04-11 14:51:43 +08:00
|
|
|
|
2023-08-24 15:50:37 +08:00
|
|
|
public:
|
2024-04-11 14:51:43 +08:00
|
|
|
SINGLETON(FluTextStyle)
|
2023-05-10 00:27:53 +08:00
|
|
|
|
2024-04-11 14:51:43 +08:00
|
|
|
static FluTextStyle *create(QQmlEngine *, QJSEngine *) { return getInstance(); }
|
|
|
|
};
|