diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-04-21 18:48:06 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-05-03 13:44:19 +0000 |
commit | c373d2ba3477bb97edd1233a1ef18e45540a2336 (patch) | |
tree | 5d24763bdb0417751840cfddd6ebeb29852eddfc /src/pdf | |
parent | 4fc8a1074435b5e44e1c24d9f6ca5cc0a07f1243 (diff) |
Add PdfMultiPageView currentPageRenderingStatus property
It is needed to assist with autotests, and may be useful to users too.
Also, avoid showing links (dashed lines) until the page is rendered.
Change-Id: I1be5aa82631b2ced00de556b34de29cd2ee1d00e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/pdf')
-rw-r--r-- | src/pdf/quick/qml/PdfMultiPageView.qml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pdf/quick/qml/PdfMultiPageView.qml b/src/pdf/quick/qml/PdfMultiPageView.qml index 416026efc..71485c214 100644 --- a/src/pdf/quick/qml/PdfMultiPageView.qml +++ b/src/pdf/quick/qml/PdfMultiPageView.qml @@ -81,6 +81,7 @@ Item { navigationStack.push(page, location, zoom) // actually jump } property vector2d jumpLocationMargin: Qt.vector2d(10, 10) // px from top-left corner + property int currentPageRenderingStatus: Image.Null // page scaling property real renderScale: 1 @@ -176,6 +177,10 @@ Item { paper.scale = 1 searchHighlights.update() } + onStatusChanged: { + if (index === navigationStack.currentPage) + root.currentPageRenderingStatus = status + } } Shape { anchors.fill: parent @@ -297,6 +302,7 @@ Item { y: rect.y * paper.pageScale width: rect.width * paper.pageScale height: rect.height * paper.pageScale + visible: image.status === Image.Ready ShapePath { strokeWidth: style.linkUnderscoreStrokeWidth strokeColor: style.linkUnderscoreColor |