1 #ifndef KPAGE_H
2 #define KPAGE_H
3 
4 #include <QImage>
5 #include <QMutex>
6 #if QT_VERSION >= 0x050000
7 #	include <poppler-qt5.h>
8 #else
9 #	include <poppler-qt4.h>
10 #endif
11 
12 
13 class SelectionLine;
14 
15 
16 class KPage {
17 private:
18 	KPage();
19 	~KPage();
20 
21 public:
22 	const QImage *get_image(int index = 0) const;
23 	int get_width(int index = 0) const;
24 	char get_rotation(int index = 0) const;
25 	const QList<SelectionLine *> *get_text() const;
26 //	QString get_label() const;
27 
28 private:
29 	void toggle_invert_colors();
30 
31 	float width;
32 	float height;
33 	QImage img[3];
34 	QImage thumbnail;
35 	// for inverted colors with reduced contrast
36 	// img_other contain the currently not needed color versions
37 	// img store the current versions to be displayed
38 	QImage img_other[3];
39 	QImage thumbnail_other;
40 
41 //	QString label;
42 	QList<Poppler::Link *> *links;
43 	QMutex mutex;
44 	int status[3];
45 	char rotation[3];
46 	bool inverted_colors; // img[]s and thumb must be consistent
47 	QList<SelectionLine *> *text;
48 
49 	friend class Worker;
50 	friend class ResourceManager;
51 };
52 
53 #endif
54 
55