blob: c9e13c7fd88a44510736619425dcaabc536f0c15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
// ================================
// Simple abstraction class between backend renderers
// ================================
// Written by Ken Moore: Feb 26, 2018
// Available under the 3-Clause BSD License
// ================================
#ifndef _LUMINA_PDF_BACKEND_RENDERER_H
#define _LUMINA_PDF_BACKEND_RENDERER_H
#include <QString>
#include <QImage>
#include <QDebug>
#include <QJsonObject>
#include <QMutex>
#include "textData.h"
class Renderer{
private:
int pnum; //number of pages - set on loading document
bool needpass;
QString docpath; //save the path for the currently-loaded document
QString doctitle;
QMutex *mutex;
public:
Renderer();
~Renderer();
//bool loadMultiThread();
//Information functions (usually needs to be loaded first)
int numPages(){ return pnum; }
bool needPassword(){ return needpass; }
QString title(){ return doctitle; }
QJsonObject properties();
//Main access functions
bool loadDocument(QString path, QString password);
QImage renderPage(int pagenum, QSize DPI);
QList<TextData*> searchDocument(QString text, bool matchCase);
};
#endif
|