Path: blob/master/src/duckstation-qt/asyncpixmaploader.h
14138 views
// SPDX-FileCopyrightText: 2019-2026 Connor McLaughlin <[email protected]>1// SPDX-License-Identifier: CC-BY-NC-ND-4.023#pragma once45#include "common/heap_array.h"67#include <string>8#include <string_view>910#include <QtCore/QObject>1112class QPixmap;1314class AsyncPixmapLoader final : public QObject15{16Q_OBJECT1718public:19explicit AsyncPixmapLoader(QObject* parent = nullptr);20~AsyncPixmapLoader() override;2122static bool isQueueNeeded(std::string_view url_or_path);2324static QPixmap load(std::string_view url_or_path);2526void enqueue(std::string_view url_or_path);2728Q_SIGNALS:29void pixmapLoaded(QPixmap& pixmap);3031private:32void finishLoad();3334std::string m_extension;35DynamicHeapArray<u8> m_data;36};373839