PdfSearchModel QML Type
PDF ドキュメント内のテキスト検索結果の表現。詳細...
| Import Statement: | import QtQuick.Pdf |
プロパティ
- count : int
(since 6.8) - currentPage : int
- currentPageBoundingPolygons : list<list<point>>
- currentResult : int
- currentResultBoundingPolygons : list<list<point>>
- currentResultBoundingRect : point
- currentResultLink : QPdfLink
- searchString : string
方法
- list<list<point>> boundingPolygonsOnPage(int page)
詳細な説明
PdfSearchModel は、ドキュメント内のテキスト文字列を検索し、各ページでマッチした幾何学的な位置を取得する機能を提供します。
プロパティの説明
count : int [since 6.8]
検索結果の数。
このプロパティは Qt 6.8 で導入されました。
currentPage : int
currentResultBoundingPolygons 、フィルタリングされた検索結果を提供するページ。
currentPageBoundingPolygons : list<list<point>>
PathMultiline インスタンスのpaths プロパティにバインドして、currentPage で検索結果が見つかったすべての領域の周囲に矩形のバッチをレンダリングできる形式のパスのセット:
PdfDocument {
id: doc
}
PdfSearchModel {
id: searchModel
document: doc
}
Shape {
ShapePath {
PathMultiline {
paths: searchModel.matchGeometry(view.currentPage)
}
}
}PathMultilineも参照 。
currentResult : int
currentPage がcurrentResultLink.page にマッチする場合、currentResultBoundingPolygons がハイライトする領域を提供する。
currentResultBoundingPolygons : list<list<point>>
PathMultiline インスタンスのpaths プロパティにバインドして、currentPage 上の検索結果currentResult を構成する領域の周囲に矩形のバッチをレンダリングできる形式のパスのセット。これは通常、検索結果をステップスルーできる UI で、一度に 1 つの検索結果をハイライトするために使用されます:
PdfDocument {
id: doc
}
PdfSearchModel {
id: searchModel
document: doc
currentPage: view.currentPage
currentResult: ...
}
Shape {
ShapePath {
PathMultiline {
paths: searchModel.currentResultBoundingPolygons
}
}
}currentPage != currentResultLink.page を参照。
PathMultilineも参照してください 。
currentResultBoundingRect : point
すべてのcurrentResultBoundingPolygons を含む外接枠(currentPage == currentResultLink.page の場合)。
currentResultLink : QPdfLink
インデックスcurrentResult での結果。
searchString : string
検索する文字列。
メソッドのドキュメント
list<list<point>> boundingPolygonsOnPage(int page)
PathMultiline インスタンスのpaths プロパティにバインドできる形式で、パスのセットを返します。このプロパティは、page 上の一致するすべての位置を囲む長方形のバッチをレンダリングするために使用されます:
PdfDocument {
id: doc
}
PdfSearchModel {
id: searchModel
document: doc
}
Shape {
ShapePath {
PathMultiline {
paths: searchModel.matchGeometry(view.currentPage)
}
}
}PathMultilineも参照 。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.