mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-11-13 23:17:09 +00:00
44 lines
810 B
C++
44 lines
810 B
C++
#pragma once
|
|
|
|
#include "computermanager.h"
|
|
#include <QDir>
|
|
#include <QImage>
|
|
#include <QThreadPool>
|
|
#include <QRunnable>
|
|
|
|
class BoxArtManager : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
friend class NetworkBoxArtLoadTask;
|
|
|
|
public:
|
|
explicit BoxArtManager(QObject *parent = nullptr);
|
|
|
|
QUrl
|
|
loadBoxArt(NvComputer* computer, NvApp& app);
|
|
|
|
static
|
|
void
|
|
deleteBoxArt(NvComputer* computer);
|
|
|
|
signals:
|
|
void
|
|
boxArtLoadComplete(NvComputer* computer, NvApp app, QUrl image);
|
|
|
|
public slots:
|
|
|
|
private slots:
|
|
void
|
|
handleBoxArtLoadComplete(NvComputer* computer, NvApp app, QUrl image);
|
|
|
|
private:
|
|
QUrl
|
|
loadBoxArtFromNetwork(NvComputer* computer, int appId);
|
|
|
|
QString
|
|
getFilePathForBoxArt(NvComputer* computer, int appId);
|
|
|
|
QDir m_BoxArtDir;
|
|
QThreadPool m_ThreadPool;
|
|
};
|