10#include <QtQmlIntegration/qqmlintegration.h>
46 [[nodiscard]] QVariantList
presets()
const;
47 [[nodiscard]]
int count()
const;
58 [[nodiscard]]
static QVariantList
swatchesFor(
const QVariantMap& tokens);
71 [[nodiscard]] Q_INVOKABLE QVariantMap
tokensFor(
const QString& name)
const;
79 QVariantList m_presets;
bool isCompletePalette(const QVariantMap &tokens) const
Whether a palette supplies every standard color used by Appearance.
static QVariantMap readPaletteFile(const QString &path)
Parse one palette file into a token map (empty on failure).
static QVariantList swatchesFor(const QVariantMap &tokens)
The five swatches a tile shows for tokens.
ThemePresets(QObject *parent=nullptr)
Where user palettes live. Defaults to defaultDirectory().
void setDirectory(const QString &directory)
static QVariantMap darkPalette()
The canonical dark palette.
QVariantMap tokensFor(const QString &name) const
The tokens of the preset called name, or an empty map.
void rescan()
Rebuild the list: the two built-ins, then the directory's files by name.
QVariantList presets() const
QString directory() const
static QVariantMap lightPalette()
The light variant: sky, blue, violet, rose on #F6F9FF.
static QString defaultDirectory()
<AppLocalDataLocation>/palettes, beside the committed palette.
Definition AppearanceLibrary.h:13