You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
574 B
27 lines
574 B
/* |
|
SPDX-FileCopyrightText: 2022 Fushan Wen <qydwhotmail@gmail.com> |
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later |
|
*/ |
|
|
|
#ifndef PACKAGEIMAGEPROVIDER_H |
|
#define PACKAGEIMAGEPROVIDER_H |
|
|
|
#include <QQuickAsyncImageProvider> |
|
#include <QThreadPool> |
|
|
|
/** |
|
* Custom image provider for KPackage |
|
*/ |
|
class PackageImageProvider : public QQuickAsyncImageProvider |
|
{ |
|
public: |
|
explicit PackageImageProvider(); |
|
|
|
QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize) override; |
|
|
|
private: |
|
QThreadPool m_pool; |
|
}; |
|
|
|
#endif // PACKAGEIMAGEPROVIDER_H
|
|
|