-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.h
84 lines (68 loc) · 1.74 KB
/
mainwindow.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
84
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QtWidgets/QMainWindow>
#include <QWheelEvent>
#include <QCryptographicHash>
#include <QProgressBar>
#include <QTemporaryFile>
#include <QLabel>
#include <QFile>
#include <QDir>
#include <QCloseEvent>
#include "booklist.h"
#include "connservice.h"
#include "aes.h"
#include "workthread.h"
class QAction;
class QActionGroup;
class QLabel;
class DocumentObserver;
namespace Poppler {
class Document;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
friend class DocumentObserver;
public:
MainWindow();
~MainWindow();
QSize sizeHint() const override;
void loadDocument(const QString &file);
void closeDocument();
private Q_SLOTS:
void slotOpenFile();
void slotSaveCopy();
void slotAbout();
void slotAboutQt();
void slotAboutYou();
void slotToggleTextAA(bool value);
void slotToggleGfxAA(bool value);
void slotRenderBackend(QAction *act);
void slotGetUserINFO(QString name, QString psw);
void slotSelectBook(QString fileName);
void slotReceiveBook();
void slotCryptoFinish(QString fileName);
private:
void setPage(int page);
int page() const;
void wheelEvent(QWheelEvent *e);
void startThread(QString file, QString pwd);
void closeEvent(QCloseEvent *event);
int m_currentPage;
QAction *m_fileOpenAct;
QAction *m_fileSaveCopyAct;
QAction *m_settingsTextAAAct;
QAction *m_settingsGfxAAAct;
QActionGroup *m_settingsRenderBackendGrp;
BookList *list;
QList<DocumentObserver *> m_observers;
Poppler::Document *m_doc;
QString usr_name;
QString usr_psw;
QProgressBar *progressBar;
QLabel *statusInfo;
workThread *myThread;
QString workDir;
};
#endif // MAINWINDOW_H