diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-08-26 15:31:00 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-01-23 19:44:17 +0100 |
commit | b6dd845ec4a6bfb6b620686681e20d38a2f24101 (patch) | |
tree | cafcf5b7c8f3185fb7fa5dfe07b38cd9b17a8cb7 /src/pdf/quick/qquickpdfdocument_p.h | |
parent | 32fb888f3c5b6d415d84895e3cab594de026d3dd (diff) |
Add QPdfSearchModel, QML PdfSearchModel and PdfPageView
This enables searching a PDF for a text string and getting the
boundaries of the areas where it is found. The boundaries are returned
as polygons intended to be rendered with PathMultiline.
PdfPageView is a QML component intended to be a drop-in viewer for use
in applications that need the most common PDF viewing functionality.
More advanced applications are free to use it as a starting point for
customization.
Task-number: QTBUG-77507
Task-number: QTBUG-77514
Change-Id: Id08ac30224e41b6cdfb9300cc4288d5750259f78
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/pdf/quick/qquickpdfdocument_p.h')
-rw-r--r-- | src/pdf/quick/qquickpdfdocument_p.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pdf/quick/qquickpdfdocument_p.h b/src/pdf/quick/qquickpdfdocument_p.h index ee6195679..1ec7edb1a 100644 --- a/src/pdf/quick/qquickpdfdocument_p.h +++ b/src/pdf/quick/qquickpdfdocument_p.h @@ -64,6 +64,7 @@ class QQuickPdfDocument : public QObject, public QQmlParserStatus Q_PROPERTY(int pageCount READ pageCount NOTIFY pageCountChanged FINAL) 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) Q_PROPERTY(QString title READ title NOTIFY metaDataChanged) Q_PROPERTY(QString subject READ subject NOTIFY metaDataChanged) @@ -86,6 +87,8 @@ public: int pageCount() const { return m_doc.pageCount(); } QPdfDocument::Status status() const { return m_doc.status(); } + QString error() const; + QString password() const { return m_doc.password(); } void setPassword(const QString &password); @@ -115,6 +118,7 @@ private: QUrl m_source; QPdfDocument m_doc; + friend class QQuickPdfSearchModel; friend class QQuickPdfSelection; Q_DISABLE_COPY(QQuickPdfDocument) |