-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage.cpp
48 lines (35 loc) · 807 Bytes
/
page.cpp
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
#include "page.h"
#include <QDebug>
Page::Page()
{
initParams();
}
Page::Page(QImage _image, unsigned int number)
{
initParams();
image = _image; // QImage is implicite shared
pageNumber = number;
}
Page::Page(unsigned int number)
{
initParams();
pageNumber = number;
}
Page::~Page()
{
qDebug()<<"Destroy page"<<pageNumber;
//image.~QImage(); QImage is implicitly shared
}
void Page::initParams()
{
pageNumber = 0;
loaded = 0;
}
// Getter
QImage Page::getImage(){ return image;}
unsigned int Page::getPageNumber(){return pageNumber;}
int Page::isLoaded(){return loaded;}
// Setter
void Page::setImage(QImage _image){image = _image;}
void Page::setPageNumber(unsigned int number){pageNumber = number;}
void Page::setLoaded(int _loaded){loaded = _loaded;}