2
import Ubuntu.Components 1.1
3
import org.docviewer.poppler 1.0
5
import "utils.js" as Utils
9
title: Utils.getNameOfFile(file.path);
13
text: i18n.tr("Details")
15
onTriggered: pageStack.push(Qt.resolvedUrl("DetailsPage.qml"))
23
contentHeight: columnPages.height + 10
24
contentWidth: parent.width
28
anchors.fill: columnPages
30
pinch.target: flickable
32
property real lastWidth
33
/*property real lastHeight
34
property double p1toC_X
35
property double p1toC_Y
36
property double contentInitX
37
property double contentInitY*/
40
lastWidth = flickable.width
42
/*contentInitX = flickImg.contentX
43
contentInitY = flickImg.contentY*/
51
newWidth = lastWidth*pinch.scale;
53
/*if (newWidth < image.startWidth)
54
newWidth = image.startWidth;
55
else if (newWidth > image.sourceSize.width)
56
newWidth = image.sourceSize.width;*/
58
flickable.contentWidth = newWidth;
60
/*flickImg.contentX = contentInitX-(lastWidth-newWidth)/2
61
flickImg.contentY = contentInitY-(lastHeight-image.height)/2*/
67
columnPages.shouldReloadImg = true;
68
console.log("FINISHED");
81
property bool shouldReloadImg : false
83
width: parent.width - 10
89
if (!pinchy.pinch.active)
97
Component.onCompleted: {
100
for(i=1; i <= popplerProp.numPages; i++)
102
var component = Qt.createComponent("PdfPage.qml");
104
if (component.status === Component.Error)
106
console.debug("Error creating component");
110
var page = component.createObject(columnPages);
112
page.source = "image://poppler/page/"+i;