2019-01-16 20:00:10 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <map>
|
2019-01-19 23:03:22 +00:00
|
|
|
#include <mutex>
|
2019-01-16 20:00:10 +00:00
|
|
|
#include <string>
|
|
|
|
#include <QPixmap>
|
2019-01-17 22:10:50 +00:00
|
|
|
#include "ui_shared/BootablesDbClient.h"
|
2019-01-16 20:00:10 +00:00
|
|
|
|
|
|
|
class CoverUtils
|
|
|
|
{
|
|
|
|
|
|
|
|
private:
|
|
|
|
static std::map<std::string, QPixmap> cache;
|
2019-01-19 23:03:22 +00:00
|
|
|
static std::mutex m_lock;
|
2019-01-16 20:00:10 +00:00
|
|
|
|
|
|
|
public:
|
2019-01-19 23:01:38 +00:00
|
|
|
static void PopulateCache(std::vector<BootablesDb::Bootable>);
|
2019-01-16 20:00:10 +00:00
|
|
|
static QPixmap find(std::string key);
|
2019-01-17 22:05:35 +00:00
|
|
|
static void PopulatePlaceholderCover();
|
2019-01-16 20:00:10 +00:00
|
|
|
};
|