lolautoaccept/include/datadragonimagecache.h

21 lines
531 B
C
Raw Normal View History

2022-04-23 20:33:21 +02:00
#pragma once
#include <string>
#include <QByteArray>
2022-07-02 17:44:29 +02:00
#include <QPixmap>
2022-04-23 20:33:21 +02:00
class DataDragonImageCache {
public:
DataDragonImageCache(const std::string& folderextra, const std::string& imageext = ".jpg");
~DataDragonImageCache();
2022-07-05 19:39:16 +02:00
bool hasImage(const std::string& name);
2022-07-02 17:44:29 +02:00
QPixmap getImage(const std::string& name);
2022-04-23 20:33:21 +02:00
void addImageRaw(const QByteArray& arr, const std::string& name);
private:
std::string getFilepath(const std::string& name) const;
std::string cacheDir;
std::string imageext; // file extention including dot
};