6#include <PhosphorShell/phosphorshell_export.h>
88 QObject* parent =
nullptr);
94 [[nodiscard]] QImage
image()
const;
95 [[nodiscard]] QString
path()
const;
101 Q_INVOKABLE [[nodiscard]] QString
configuredPath(
const QString& screenName = QString())
const;
104 Q_INVOKABLE [[nodiscard]] QString
previewPath(
const QString& screenName = QString())
const;
107 Q_INVOKABLE [[nodiscard]] QString
effectivePath(
const QString& screenName = QString())
const;
113 Q_INVOKABLE
bool setPath(
const QString&
path,
const QString& screenName = QString());
117 Q_INVOKABLE
bool setPreview(
const QString&
path,
const QString& screenName = QString());
126 Q_INVOKABLE QString
effectiveFit(
const QString& screenName = QString())
const;
142 void seedFromDesktop();
143 void scheduleLoad(
const QString&
path);
144 void installImage(QImage
image,
const QString&
path);
149 static constexpr int kMaxImageBytesMib = 512;
152 static constexpr qint64 kMaxPixelCount = qint64(16384) * 16384;
154 const QString m_storePath;
155 std::unique_ptr<PhosphorShaders::IWallpaperProvider> m_seedProvider;
157 QHash<QString, QString> m_configured;
158 QHash<QString, QString> m_preview;
159 QVariantMap m_appearance;
167 quint64 m_loadGeneration = 0;
Abstract wallpaper provider interface.
Definition IWallpaperProvider.h:17
QString effectiveFit(const QString &screenName=QString()) const
~WallpaperService() override
QVariantMap appearanceSeed() const
QString effectivePath(const QString &screenName=QString()) const
What a surface on screenName should draw: the preview when one is set, otherwise the configured path.
bool setPreview(const QString &path, const QString &screenName=QString())
Show path on screenName (every screen when empty) without persisting it.
QString configuredPath(const QString &screenName=QString()) const
The persisted wallpaper for screenName: its own entry, else the all-screens entry,...
void clearPreview(const QString &screenName=QString())
Drop the preview for screenName, or every preview when the name is empty.
QString previewPath(const QString &screenName=QString()) const
The transient preview for screenName, resolved the same way.
WallpaperService(const QString &storePath, std::unique_ptr< PhosphorShaders::IWallpaperProvider > seedProvider, QObject *parent=nullptr)
Same, with the first-run seed source injected.
QString storePath() const
Where the store lives, as the constructor was given it.
void refresh()
Re-decode path into image, for a consumer that knows the file changed on disk under the same name.
bool setPath(const QString &path, const QString &screenName=QString())
Persist path as the wallpaper for screenName, or for every screen when the name is empty (which also ...
void effectivePathChanged(const QString &screenName)
The answer to effectivePath(screenName) may have changed.
WallpaperService(const QString &storePath, QObject *parent=nullptr)
The shell-wide configured wallpaper: the all-screens entry, or when only per-screen entries exist,...
void setAppearance(const QVariantMap &wallpapers)
Definition ShaderProfile.h:21
Definition Environment.h:11