16#include <QCoreApplication>
39 Q_DECLARE_TR_FUNCTIONS(ThemeParser)
47 QHash<ThemeManager::ThemeToken, ThemeColorPair> colors;
48 QList<ThemeColorPair> graphColors;
56 ThemeParser(
const QHash<QString, ThemeSectionInfo> §ions,
57 const QHash<QString, ThemeManager::ThemeToken> &roleCache);
69 bool parse(
const QString &internalName,
70 const QString &resourcePath,
72 QString *errorString =
nullptr);
88 bool parseData(
const QString &internalName,
89 const QByteArray &raw,
91 QString *errorString =
nullptr);
101 static QColor parseColor(
const QString &colorStr);
103 void parseSection(
const QJsonObject &root,
104 const QString §ionName,
108 void checkColorPair(
const QJsonObject &obj,
110 const QString §ion,
113 static QString withLine(
int line,
const QString &message);
114 static void parseFonts(
const QJsonObject &fontsObj,
Result &out);
117 ThemeManager::ThemeToken stringToToken(
const QString &token)
const;
119 const QHash<QString, ThemeSectionInfo> §ions_;
120 const QHash<QString, ThemeManager::ThemeToken> &roleCache_;
Definition jsonc_document.h:27
bool parse(const QString &internalName, const QString &resourcePath, Result &out, QString *errorString=nullptr)
Definition theme_parser.cpp:38
bool parseData(const QString &internalName, const QByteArray &raw, Result &out, QString *errorString=nullptr)
Definition theme_parser.cpp:55
static QString fontDescriptor(const ThemeFontHint &hint)
Definition theme_parser.cpp:267
Definition theme_manager.h:47
Definition theme_manager.h:72
Definition theme_manager.h:31
Definition theme_manager.h:87
Definition theme_parser.h:45
ThemeParseReport report
non-fatal findings, filled by parseData()
Definition theme_parser.h:53
QString regularFontName
theme's declared regular font descriptor; empty if unset
Definition theme_parser.h:49
ThemeFontHint monospaceFont
monospace font as family/size; unset when the theme declares none
Definition theme_parser.h:52
ThemeFontHint regularFont
regular font as family/size; unset when the theme declares none
Definition theme_parser.h:51
QString monospaceFontName
theme's declared monospace font descriptor; empty if unset
Definition theme_parser.h:50
Definition theme_manager.h:42
Definition file-pcapng.h:57