blob: 477b61c85769ce5f87f3821e22e840dcb12bec2d (
plain)
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
|
#include "widgetinfo.h"
WidgetInfo::WidgetInfo(QObject *parent)
: QObject(parent)
{
}
bool WidgetInfo::valid() const
{
return !_url.isEmpty();
}
QUrl WidgetInfo::url() const
{
return _url;
}
void WidgetInfo::setUrl(const QUrl &url)
{
if (url != _url) {
const bool cur_valid = valid();
_url = url;
emit urlChanged();
if (cur_valid != valid()) {
emit validChanged();
}
}
}
bool WidgetInfo::invert() const
{
return _invert;
}
void WidgetInfo::setInvert(bool invert)
{
if (invert != _invert) {
_invert = invert;
emit invertChanged();
}
}
int WidgetInfo::page() const
{
return _page;
}
void WidgetInfo::setPage(int page)
{
if (page != _page) {
_page = page;
emit pageChanged();
}
}
WidgetInfo::WidgetSize WidgetInfo::size() const
{
return _size;
}
void WidgetInfo::setSize(const WidgetSize &size)
{
if (size != _size) {
_size = size;
emit sizeChanged();
}
}
WidgetInfo::WidgetPosition WidgetInfo::position() const
{
return _pos;
}
void WidgetInfo::setPosition(const WidgetPosition &pos)
{
if (pos != _pos) {
_pos = pos;
emit positionChanged();
}
}
|