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/plugin.cpp | |
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/plugin.cpp')
-rw-r--r-- | src/pdf/quick/plugin.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pdf/quick/plugin.cpp b/src/pdf/quick/plugin.cpp index 59aca576b..664ba51ab 100644 --- a/src/pdf/quick/plugin.cpp +++ b/src/pdf/quick/plugin.cpp @@ -39,6 +39,7 @@ #include <QtQml/qqmlengine.h> #include <QtQml/qqmlextensionplugin.h> #include "qquickpdfdocument_p.h" +#include "qquickpdfsearchmodel_p.h" QT_BEGIN_NAMESPACE @@ -79,6 +80,9 @@ public: qmlRegisterModule(uri, 2, QT_VERSION_MINOR); qmlRegisterType<QQuickPdfDocument>(uri, 5, 15, "PdfDocument"); + qmlRegisterType<QQuickPdfSearchModel>(uri, 5, 15, "PdfSearchModel"); + + qmlRegisterType(QUrl("qrc:/qt-project.org/qtpdf/qml/PdfPageView.qml"), uri, 5, 15, "PdfPageView"); } }; |