-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpdqmainwindow.h
83 lines (74 loc) · 1.84 KB
/
pdqmainwindow.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#ifndef PDQMAINWINDOW_H
#define PDQMAINWINDOW_H
#include <QMainWindow>
#include <poppler-qt5.h>
#include <QLabel>
#include <QScrollBar>
#include <QGraphicsScene>
#include <QGraphicsView>
#include <QSize>
#include <QStack>
#include <searchstate.h>
#include <QFile>
#include <QClipboard>
#include "note.h"
#include "config.h"
namespace Ui {
class PdQMainWindow;
}
class PdQMainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit PdQMainWindow(QWidget *parent = 0, Config *conf = new Config());
~PdQMainWindow();
Poppler::Document* document;
int numPages;
void loadFile();
void preparePage(int pagenumber);
QString filename;
QGraphicsScene *pageScene;
quint16 currentPageNum;
Poppler::Page* currentPage;
QScrollBar* hbar;
QScrollBar* vbar;
QList <Poppler::Link*> links;
qint32 pageSizeX;
qint32 pageSizeY;
QStack <int> beforeJump;
QLabel *pageNumLabel;
QLabel *totalPagesLabel;
QLabel *resolutionLabel;
QList<Note> *notes;
Config *conf;
public slots:
void ReloadFile();
void PrevPage();
void NextPage();
void ZoomIn();
void ZoomOut();
void GoBack();
void StartSearching();
void StartSearchingInReverse();
void StopSearching();
void Search(QString term, bool directionIsBackwards);
void GotIt();
void OpenBookmarks();
void GoToBookmark(int n);
void AddNewBookmark();
void Navigate();
void ShowPage(int pagenumber);
void PushCurrentPage();
void ShowTextExtract();
void AddNewNote(int p, qreal x, qreal y, int r, int g, int b, QString txt);
void CopyPathToPDF();
private:
Ui::PdQMainWindow *ui;
void keyPressEvent(QKeyEvent *k);
void pushCurrentPage();
bool search(int pagenumber);
void searchForward();
void searchBack();
SearchState searchState;
};
#endif // PDQMAINWINDOW_H