-
Notifications
You must be signed in to change notification settings - Fork 2
/
popplerdoc.h
49 lines (32 loc) · 949 Bytes
/
popplerdoc.h
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
42
43
44
45
46
47
48
49
#ifndef POPPLER_H
#define POPPLER_H
#include <QQuickPaintedItem>
#include <poppler-qt5.h>
class PopplerDoc : public QQuickPaintedItem
{
Q_OBJECT
Q_PROPERTY(int pageCount READ pageCount NOTIFY pageCountChanged)
Q_PROPERTY(QString filename READ filename WRITE setFilename NOTIFY filenameChanged)
Q_PROPERTY(int pagenumber READ pageNumber WRITE setPageNumber)
public:
PopplerDoc(QQuickPaintedItem* parent = 0 );
~PopplerDoc();
int pageCount() const;
QString filename() const;
int pageNumber() const;
void setPageNumber(int pageNumber);
void setFilename(const QString& filename);
void paint(QPainter *painter);
signals:
void pageCountChanged();
void filenameChanged();
public slots:
private:
int pageCount_;
int pageNumber_;
QString filename_;
void setPageCount(int pageCount);
Poppler::Document* document_;
Poppler::Page* pdfPage_;
};
#endif // POPPLER_H