![]() |
Qt 6.x
The Qt SDK
|
The QPdfSelection class defines a range of text that has been selected on one page in a PDF document, and its geometric boundaries. More...
#include <qpdfselection.h>
Public Member Functions | |
Q_PDF_EXPORT | ~QPdfSelection () |
Q_PDF_EXPORT | QPdfSelection (const QPdfSelection &other) |
Q_PDF_EXPORT QPdfSelection & | operator= (const QPdfSelection &other) |
Q_PDF_EXPORT | QPdfSelection (QPdfSelection &&other) noexcept |
void | swap (QPdfSelection &other) noexcept |
Q_PDF_EXPORT bool | isValid () const |
Q_PDF_EXPORT QList< QPolygonF > | bounds () const |
Q_PDF_EXPORT QString | text () const |
Q_PDF_EXPORT QRectF | boundingRectangle () const |
Q_PDF_EXPORT int | startIndex () const |
Q_PDF_EXPORT int | endIndex () const |
Properties | |
bool | valid |
This property holds whether the selection is valid. | |
QList< QPolygonF > | bounds |
This property holds a set of regions that the selected text occupies on the page, represented as polygons. | |
QRectF | boundingRectangle |
This property holds the overall bounding rectangle (convex hull) around \l bounds. | |
QString | text |
This property holds the selected text. | |
int | startIndex |
This property holds the index at the beginning of \l text within the full text on the page. | |
int | endIndex |
This property holds the index at the end of \l text within the full text on the page. | |
Friends | |
class | QPdfDocument |
class | QQuickPdfSelection |
The QPdfSelection class defines a range of text that has been selected on one page in a PDF document, and its geometric boundaries.
Definition at line 18 of file qpdfselection.h.
|
default |
|
default |
|
defaultnoexcept |
QRectF QPdfSelection::boundingRectangle | ( | ) | const |
Definition at line 94 of file qpdfselection.cpp.
References QPdfSelectionPrivate::boundingRect.
Definition at line 74 of file qpdfselection.cpp.
References QPdfSelectionPrivate::bounds.
int QPdfSelection::endIndex | ( | ) | const |
Definition at line 114 of file qpdfselection.cpp.
References QPdfSelectionPrivate::endIndex.
bool QPdfSelection::isValid | ( | ) | const |
Definition at line 57 of file qpdfselection.cpp.
References QPdfSelectionPrivate::bounds, and QList< T >::isEmpty().
|
default |
int QPdfSelection::startIndex | ( | ) | const |
Definition at line 104 of file qpdfselection.cpp.
References QPdfSelectionPrivate::startIndex.
|
inlinenoexcept |
Definition at line 36 of file qpdfselection.h.
References other(), and QExplicitlySharedDataPointer< T >::swap().
QString QPdfSelection::text | ( | ) | const |
Definition at line 84 of file qpdfselection.cpp.
References QPdfSelectionPrivate::text.
|
friend |
Definition at line 52 of file qpdfselection.h.
|
friend |
Definition at line 53 of file qpdfselection.h.
|
read |
This property holds the overall bounding rectangle (convex hull) around \l bounds.
Definition at line 60 of file qpdfselection.h.
|
read |
This property holds a set of regions that the selected text occupies on the page, represented as polygons.
The coordinate system for the polygons has the origin at the upper-left corner of the page, and the units are \l {https://en.wikipedia.org/wiki/Point_(typography)}{points}.
Definition at line 60 of file qpdfselection.h.
Referenced by QQuickPdfSelection::selectAll().
|
read |
This property holds the index at the end of \l text within the full text on the page.
Definition at line 60 of file qpdfselection.h.
Referenced by QQuickPdfSelection::selectAll().
|
read |
This property holds the index at the beginning of \l text within the full text on the page.
Definition at line 60 of file qpdfselection.h.
Referenced by QQuickPdfSelection::selectAll().
|
read |
This property holds the selected text.
Definition at line 60 of file qpdfselection.h.
Referenced by QQuickPdfSelection::selectAll().
|
read |
This property holds whether the selection is valid.
Definition at line 60 of file qpdfselection.h.