~mutse-young/ubuntu-docviewer-app/trunk

« back to all changes in this revision

Viewing changes to PdfPage.qml

  • Committer: David Planella
  • Date: 2014-10-08 04:45:32 UTC
  • mto: (31.2.8 add-poppler-plugin)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: david.planella@ubuntu.com-20141008044532-81w3zoh2j5nmbefu
Reorganized files to prepare inclusion of the file QML plugin into the source tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
import QtQuick 2.0
2
 
import Ubuntu.Components 0.1
3
 
 
4
 
 
5
 
Image
6
 
{
7
 
 
8
 
    property double fixedWidth
9
 
 
10
 
    id: imagePage
11
 
    asynchronous: true
12
 
    width: parent.width
13
 
    sourceSize.width: fixedWidth
14
 
    fillMode: Image.PreserveAspectCrop
15
 
    source: "image://poppler/page/1"
16
 
 
17
 
    Connections {
18
 
        target: parent
19
 
 
20
 
        onShouldReloadImgChanged: {
21
 
            if (parent.shouldReloadImg)
22
 
            {
23
 
                fixedWidth = parent.width
24
 
            }
25
 
        }
26
 
    }
27
 
 
28
 
    Component.onCompleted: {
29
 
        fixedWidth = parent.width
30
 
    }
31
 
}