begin work on qt gui - basic search & pdf preview
This commit is contained in:
26
gui/pdfworker.h
Normal file
26
gui/pdfworker.h
Normal file
@ -0,0 +1,26 @@
|
||||
#ifndef PDFWORKER_H
|
||||
#define PDFWORKER_H
|
||||
#include <QObject>
|
||||
#include <QImage>
|
||||
#include <QHash>
|
||||
#include <poppler-qt5.h>
|
||||
#include "pdfpreview.h"
|
||||
#include "searchresult.h"
|
||||
class PdfWorker : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
QHash<QString, Poppler::Document *> documentcache;
|
||||
Poppler::Document *document(QString path);
|
||||
|
||||
public:
|
||||
PdfWorker();
|
||||
public slots:
|
||||
void generatePreviews(QVector<SearchResult> paths, double scalefactor);
|
||||
signals:
|
||||
void previewReady(PdfPreview p);
|
||||
void previewsFinished();
|
||||
};
|
||||
|
||||
#endif // PDFWORKER_H
|
Reference in New Issue
Block a user