6#include <phosphortiles_export.h>
22class ITileAlgorithmRegistry;
66 const QSize& canvas = {})
override;
81 mutable QHash<QString, PhosphorLayout::LayoutPreview> m_cache;
83 mutable QStringList m_cacheOrder;
89 mutable QMutex m_cacheMutex;
Abstract producer of LayoutPreview values.
Definition ILayoutSource.h:48
ILayoutSource adapter wrapping an ITileAlgorithmRegistry.
Definition AutotileLayoutSource.h:47
QVector< PhosphorLayout::LayoutPreview > availableLayouts() const override
Enumerate every layout this source can render.
PhosphorLayout::LayoutPreview previewAt(const QString &id, int windowCount=PhosphorLayout::DefaultPreviewWindowCount, const QSize &canvas={}) override
id must be in the form "autotile:<algorithmId>" — returns an empty preview otherwise.
void invalidateCache()
Drop any cached previews — next query re-runs the algorithms.
~AutotileLayoutSource() override
AutotileLayoutSource(PhosphorTiles::ITileAlgorithmRegistry *registry, QObject *parent=nullptr)
Construct over a borrowed algorithm registry.
Abstract contract for a tiling-algorithm registry.
Definition ITileAlgorithmRegistry.h:41
constexpr int DefaultPreviewWindowCount
Reference window count used by ILayoutSource::previewAt when the caller doesn't specify one.
Definition LayoutPreview.h:20
Definition AutotileEngine.h:71
Renderer-ready snapshot of one layout entry (manual zone layout OR autotile algorithm result).
Definition LayoutPreview.h:44