looqs/gui/previewgeneratorpdf.h

25 рядки
563 B
C

#ifndef PREVIEWGENERATORPDF_H
#define PREVIEWGENERATORPDF_H
2024-05-20 19:14:40 +02:00
#include <poppler-qt6.h>
#include "previewgenerator.h"
#include "previewresultpdf.h"
class PreviewGeneratorPdf : public PreviewGenerator
{
protected:
QHash<QString, Poppler::Document *> documentcache;
Poppler::Document *document(QString path);
public:
using PreviewGenerator::PreviewGenerator;
QSharedPointer<PreviewResult> generate(RenderConfig config, QString documentPath, unsigned int page);
~PreviewGeneratorPdf()
{
qDeleteAll(documentcache);
}
};
#endif // PREVIEWGENERATORPDF_H