BiblioteQ

biblioteq_pdfreader.h
1 #ifndef _BIBLIOTEQ_PDFREADER_H_
2 #define _BIBLIOTEQ_PDFREADER_H_
3
4 #include "ui_biblioteq_pdfreader.h"
5
6 #ifdef BIBLIOTEQ_LINKED_WITH_POPPLER
7 #include <poppler-qt5.h>
8 #endif
9
10 class QPrinter;
11
12 class biblioteq_pdfreader: public QMainWindow
13 {
14 Q_OBJECT
15
16 public:
17 biblioteq_pdfreader(QWidget *parent);
18 ~biblioteq_pdfreader();
19 void load(const QByteArray &data, const QString &fileName);
20 void load(const QString &fileName);
21
22 private:
23 #ifdef BIBLIOTEQ_LINKED_WITH_POPPLER
24 Poppler::Document *m_document;
25 #endif
26 QRectF m_searchLocation;
27 QString m_fileName;
28 Ui_pdfreader m_ui;
29 bool event(QEvent *event);
30 void changeEvent(QEvent *event);
31 void closeEvent(QCloseEvent *event);
32 void keyPressEvent(QKeyEvent *event);
33 void prepareContents(void);
34 void resizeEvent(QResizeEvent *event);
35
36 private slots:
37 void setGlobalFonts(const QFont &font);
38 void slotChangePageViewSize(int value);
39 void slotClose(void);
40 void slotContentsDoubleClicked(QListWidgetItem *item);
41 void slotPrint(void);
42 void slotPrintPreview(QPrinter *printer);
43 void slotPrintPreview(void);
44 void slotSaveAs(void);
45 void slotSearchNext(void);
46 void slotSearchPrevious(void);
47 void slotShowContents(bool state);
48 void slotShowPage(int value, const QRectF &location = QRectF());
49 void slotSliderTriggerAction(int action);
50
51 public slots:
52 void showNormal(void);
53 };
54
55 #endif
biblioteq_pdfreader
Definition: biblioteq_pdfreader.h:12