-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpageloader.h
More file actions
29 lines (27 loc) · 835 Bytes
/
pageloader.h
File metadata and controls
29 lines (27 loc) · 835 Bytes
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
#ifndef LOADPAGETHREAD_H
#define LOADPAGETHREAD_H
#include <QComboBox>
#include <QVector>
#include "page.h"
#include "decompress.h"
// Object run in another thread to load images asynchronously
class PageLoader : public QObject
{
Q_OBJECT
public:
PageLoader();
void setPageVector(QVector<Page>* _pageVector);
void setPageComboBox(QComboBox* _pageComboBox);
public slots:
void prepare(const QString path); // Load pages without read images
void loadImages(int pageNumber); // Load images for this page and its neighbour pages
private:
void loadPage(int pageNumber); // Load one page
QVector<Page>* pageVector;
QComboBox* pageComboBox;
Decompress decom;
QVector<QString> nameList;
QVector<int> pageLoaded; // Pages whose image is loaded
int totalPages;
};
#endif // LOADPAGETHREAD_H