Warning, file /network/tokodon/src/utils/blurhashimageprovider.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 // SPDX-FileCopyrightText: 2021 Tobias Fella <fella@posteo.de> 0002 // SPDX-License-Identifier: LGPL-2.0-or-later 0003 0004 #pragma once 0005 0006 #include <QQuickAsyncImageProvider> 0007 #include <QThreadPool> 0008 0009 class AsyncImageResponse : public QQuickImageResponse 0010 { 0011 public: 0012 AsyncImageResponse(const QString &id, const QSize &requestedSize, QThreadPool *pool); 0013 void handleDone(QImage image); 0014 QQuickTextureFactory *textureFactory() const override; 0015 QImage m_image; 0016 }; 0017 0018 class BlurhashImageProvider : public QQuickAsyncImageProvider 0019 { 0020 public: 0021 QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize) override; 0022 0023 private: 0024 QThreadPool pool; 0025 };