summaryrefslogtreecommitdiffstats
path: root/src/pdf/quick/qquickpdfsearchmodel_p.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-02-26 13:36:05 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2020-04-30 22:24:35 +0200
commitb918fed6ede79b5a1a1bb5f6d36ade9cb6d0a3f1 (patch)
treece992136c5b3c64c11a4f9e7036894c1532784f3 /src/pdf/quick/qquickpdfsearchmodel_p.h
parent9e3c27595113dd07ad936e73696aee62db4c6f3f (diff)
PDF views: jump to precise locations
PdfScrollingPageView and PdfMultiPageView were already jumping to the right page; but if you have zoomed in very far, you need it to jump to the right part of the page too. This affects how it jumps to search results, link locations, and the forward/back behavior. All of those should be more precise and repeatable now. But we depend on some new features that are added to TableView for Qt 6; in lieu of those, we use TableViewExtra for now. Fixes: QTBUG-83679 Change-Id: Ie974205562fe7dbf93bae274cef6fefa768aaefb Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/pdf/quick/qquickpdfsearchmodel_p.h')
-rw-r--r--src/pdf/quick/qquickpdfsearchmodel_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pdf/quick/qquickpdfsearchmodel_p.h b/src/pdf/quick/qquickpdfsearchmodel_p.h
index 3e05f80e3..66fc583d9 100644
--- a/src/pdf/quick/qquickpdfsearchmodel_p.h
+++ b/src/pdf/quick/qquickpdfsearchmodel_p.h
@@ -64,6 +64,7 @@ class QQuickPdfSearchModel : public QPdfSearchModel
Q_PROPERTY(int currentResult READ currentResult WRITE setCurrentResult NOTIFY currentResultChanged)
Q_PROPERTY(QVector<QPolygonF> currentPageBoundingPolygons READ currentPageBoundingPolygons NOTIFY currentPageBoundingPolygonsChanged)
Q_PROPERTY(QVector<QPolygonF> currentResultBoundingPolygons READ currentResultBoundingPolygons NOTIFY currentResultBoundingPolygonsChanged)
+ Q_PROPERTY(QRectF currentResultBoundingRect READ currentResultBoundingRect NOTIFY currentResultBoundingRectChanged)
public:
explicit QQuickPdfSearchModel(QObject *parent = nullptr);
@@ -81,6 +82,7 @@ public:
QVector<QPolygonF> currentPageBoundingPolygons() const;
QVector<QPolygonF> currentResultBoundingPolygons() const;
+ QRectF currentResultBoundingRect() const;
signals:
void documentChanged();
@@ -88,6 +90,7 @@ signals:
void currentResultChanged();
void currentPageBoundingPolygonsChanged();
void currentResultBoundingPolygonsChanged();
+ void currentResultBoundingRectChanged();
private:
void updateResults();