summaryrefslogtreecommitdiffstats
path: root/src/pdf/quick/qquickpdfdocument_p.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-02-21 11:38:27 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2020-02-21 11:40:49 +0100
commitd9349a299f66fb154ad24f410451872a7ca253fb (patch)
tree2e8258ef3679707a2a9245c85bc8490251b3e256 /src/pdf/quick/qquickpdfdocument_p.h
parent50bc8b124705c33c5e27f035b1eab756e14247ba (diff)
parentc0aa9d794378846e4cc0b6fe94f2765bc31cefdd (diff)
Merge remote-tracking branch 'origin/wip/qtpdf' into 5.15v5.15.0-beta1
The feature set is mostly in place (except for some known shortcomings) and we need the merge to build it on iOS. Task-number: QTBUG-69519 Change-Id: Ib1ac82a9a7e0830d98d1c4327a1b15d4d7f4d4c1
Diffstat (limited to 'src/pdf/quick/qquickpdfdocument_p.h')
-rw-r--r--src/pdf/quick/qquickpdfdocument_p.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pdf/quick/qquickpdfdocument_p.h b/src/pdf/quick/qquickpdfdocument_p.h
index 1ec7edb1a..cefa4f756 100644
--- a/src/pdf/quick/qquickpdfdocument_p.h
+++ b/src/pdf/quick/qquickpdfdocument_p.h
@@ -62,6 +62,8 @@ class QQuickPdfDocument : public QObject, public QQmlParserStatus
Q_OBJECT
Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
Q_PROPERTY(int pageCount READ pageCount NOTIFY pageCountChanged FINAL)
+ Q_PROPERTY(qreal maxPageWidth READ maxPageWidth NOTIFY metaDataChanged)
+ Q_PROPERTY(qreal maxPageHeight READ maxPageHeight NOTIFY metaDataChanged)
Q_PROPERTY(QString password READ password WRITE setPassword NOTIFY passwordChanged FINAL)
Q_PROPERTY(QPdfDocument::Status status READ status NOTIFY statusChanged FINAL)
Q_PROPERTY(QString error READ error NOTIFY statusChanged FINAL)
@@ -102,6 +104,9 @@ public:
QDateTime modificationDate() { return m_doc.metaData(QPdfDocument::ModificationDate).toDateTime(); }
Q_INVOKABLE QSizeF pagePointSize(int page) const;
+ qreal maxPageWidth() const;
+ qreal maxPageHeight() const;
+ Q_INVOKABLE qreal heightSumBeforePage(int page, qreal spacing = 0, int facingPages = 1) const;
Q_SIGNALS:
void sourceChanged();
@@ -113,11 +118,14 @@ Q_SIGNALS:
private:
QPdfDocument &document() { return m_doc; }
+ void updateMaxPageSize();
private:
QUrl m_source;
QPdfDocument m_doc;
+ QSizeF m_maxPageWidthHeight;
+ friend class QQuickPdfLinkModel;
friend class QQuickPdfSearchModel;
friend class QQuickPdfSelection;