Refactor using Fable

This commit is contained in:
Agel committed 2026-07-31 17:31:02 +02:00
1 parent 1a60a6b93c
commit 83968646c6
90 files changed
+2080 -2267

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
#pragma once
#include <functional>
#include <QAtomicInt>
#include <QImage>
#include <QQuickImageResponse>
#include <QRunnable>
// Generic async image response: runs the given job on a thread pool and
// publishes the resulting image. Shared by all image providers.
class AsyncImageResponse : public QQuickImageResponse, public QRunnable {
// NO Q_OBJECT — already inherited from QQuickImageResponse
public:
explicit AsyncImageResponse(std::function<QImage()> job);
QQuickTextureFactory *textureFactory() const override;
void cancel() override;
void run() override;
private:
std::function<QImage()> m_job;
QAtomicInt m_cancelled{0};
QImage m_image;
};