2
import Ubuntu.Components 0.1
3
import org.docviewer.poppler 1.0
9
contentHeight: columnPages.height + 10
10
contentWidth: parent.width
14
anchors.fill: columnPages
16
pinch.target: flickable
18
property real lastWidth
19
/*property real lastHeight
20
property double p1toC_X
21
property double p1toC_Y
22
property double contentInitX
23
property double contentInitY*/
26
lastWidth = flickable.width
28
/*contentInitX = flickImg.contentX
29
contentInitY = flickImg.contentY*/
37
newWidth = lastWidth*pinch.scale;
39
/*if (newWidth < image.startWidth)
40
newWidth = image.startWidth;
41
else if (newWidth > image.sourceSize.width)
42
newWidth = image.sourceSize.width;*/
44
flickable.contentWidth = newWidth;
46
/*flickImg.contentX = contentInitX-(lastWidth-newWidth)/2
47
flickImg.contentY = contentInitY-(lastHeight-image.height)/2*/
53
columnPages.shouldReloadImg = true;
54
console.log("FINISHED");
67
property bool shouldReloadImg : false
69
width: parent.width - 10
75
if (!pinchy.pinch.active)
83
Component.onCompleted: {
86
for(i=1; i <= popplerProp.numPages; i++)
88
var component = Qt.createComponent("PdfPage.qml");
90
if (component.status === Component.Error)
92
console.debug("Error creating component");
96
var page = component.createObject(columnPages);
98
page.source = "image://poppler/page/"+i;