/* SPDX-FileCopyrightText: 2007 Paolo Capriotti SPDX-FileCopyrightText: 2022 Fushan Wen SPDX-License-Identifier: GPL-2.0-or-later */ #pragma once #include #include #include #include /** * A runnable that finds KPackage wallpapers. */ class PackageFinder : public QObject, public QRunnable { Q_OBJECT public: PackageFinder(const QStringList &paths, const QSize &targetSize, QObject *parent = nullptr); void run() override; static void findPreferredImageInPackage(KPackage::Package &package, const QSize &targetSize); static QString packageDisplayName(const KPackage::Package &b); Q_SIGNALS: void packageFound(const QList &packages); private: QStringList m_paths; QSize m_targetSize; };