You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
569 B
C++
25 lines
569 B
C++
#pragma once
|
|
|
|
#include <QImage>
|
|
#include <QSize>
|
|
#include <QString>
|
|
|
|
struct Thumbnail
|
|
{
|
|
QString path;
|
|
QImage image;
|
|
};
|
|
|
|
class ThumbnailCache
|
|
{
|
|
public:
|
|
static ThumbnailCache *self();
|
|
|
|
/** Whether Qt's image readers or an installed thumbnailer handle @p mimeType. */
|
|
bool canThumbnail(const QString &mimeType);
|
|
|
|
Thumbnail requestThumbnail(const QString &filePath, const QSize &requestedSize);
|
|
QImage generateThumbnail(const QString &source, const QSize &requestedSize);
|
|
QString writeCacheFile(const QString &path, const QImage &image);
|
|
};
|