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 #if QT_VERSION < 0x050000
8 #include <poppler-qt4.h>
9 #else
10 #include <poppler-qt5.h>
11 #endif
12 #endif
13 
14 class biblioteq_pdfreader: public QMainWindow
15 {
16  Q_OBJECT
17 
18  public:
19  biblioteq_pdfreader(QWidget *parent);
21  void load(const QByteArray &data, const QString &fileName);
22  void load(const QString &fileName);
23 
24  private:
25 #ifdef BIBLIOTEQ_LINKED_WITH_POPPLER
26  Poppler::Document *m_document;
27 #endif
28  QRectF m_searchLocation;
29  QString m_fileName;
30  Ui_pdfreader m_ui;
31  bool event(QEvent *event);
32  void changeEvent(QEvent *event);
33  void closeEvent(QCloseEvent *event);
34  void keyPressEvent(QKeyEvent *event);
35  void prepareContents(void);
36  void resizeEvent(QResizeEvent *event);
37  void setGlobalFonts(const QFont &font);
38 
39  private slots:
40  void slotChangePageViewSize(int value);
41  void slotClose(void);
42  void slotContentsDoubleClicked(QListWidgetItem *item);
43  void slotPrint(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
Definition: biblioteq_pdfreader.h:14