Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QPdfSelection Class Reference

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>

+ Collaboration diagram for QPdfSelection:

Public Member Functions

Q_PDF_EXPORT ~QPdfSelection ()
 
Q_PDF_EXPORT QPdfSelection (const QPdfSelection &other)
 
Q_PDF_EXPORT QPdfSelectionoperator= (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< QPolygonFbounds () 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< QPolygonFbounds
 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
 

Detailed Description

The QPdfSelection class defines a range of text that has been selected on one page in a PDF document, and its geometric boundaries.

Since
5.15 \inmodule QtPdf
See also
QPdfDocument::getSelection()

Definition at line 18 of file qpdfselection.h.

Constructor & Destructor Documentation

◆ ~QPdfSelection()

QPdfSelection::~QPdfSelection ( )
default

◆ QPdfSelection() [1/2]

QPdfSelection::QPdfSelection ( const QPdfSelection & other)
default

◆ QPdfSelection() [2/2]

QPdfSelection::QPdfSelection ( QPdfSelection && other)
defaultnoexcept

Member Function Documentation

◆ boundingRectangle()

QRectF QPdfSelection::boundingRectangle ( ) const

Definition at line 94 of file qpdfselection.cpp.

References QPdfSelectionPrivate::boundingRect.

◆ bounds()

QList< QPolygonF > QPdfSelection::bounds ( ) const

Definition at line 74 of file qpdfselection.cpp.

References QPdfSelectionPrivate::bounds.

◆ endIndex()

int QPdfSelection::endIndex ( ) const

Definition at line 114 of file qpdfselection.cpp.

References QPdfSelectionPrivate::endIndex.

◆ isValid()

bool QPdfSelection::isValid ( ) const

Definition at line 57 of file qpdfselection.cpp.

References QPdfSelectionPrivate::bounds, and QList< T >::isEmpty().

+ Here is the call graph for this function:

◆ operator=()

QPdfSelection & QPdfSelection::operator= ( const QPdfSelection & other)
default

◆ startIndex()

int QPdfSelection::startIndex ( ) const

Definition at line 104 of file qpdfselection.cpp.

References QPdfSelectionPrivate::startIndex.

◆ swap()

void QPdfSelection::swap ( QPdfSelection & other)
inlinenoexcept

Definition at line 36 of file qpdfselection.h.

References other(), and QExplicitlySharedDataPointer< T >::swap().

+ Here is the call graph for this function:

◆ text()

QString QPdfSelection::text ( ) const

Definition at line 84 of file qpdfselection.cpp.

References QPdfSelectionPrivate::text.

Friends And Related Symbol Documentation

◆ QPdfDocument

friend class QPdfDocument
friend

Definition at line 52 of file qpdfselection.h.

◆ QQuickPdfSelection

friend class QQuickPdfSelection
friend

Definition at line 53 of file qpdfselection.h.

Property Documentation

◆ boundingRectangle

QPdfSelection::boundingRectangle
read

This property holds the overall bounding rectangle (convex hull) around \l bounds.

Definition at line 23 of file qpdfselection.h.

◆ bounds

QPdfSelection::bounds
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}.

Note
For now, the polygons returned from \l QPdfDocument::getSelection() are always rectangles; but in the future it may be possible to represent more complex regions.

Definition at line 22 of file qpdfselection.h.

◆ endIndex

QPdfSelection::endIndex
read

This property holds the index at the end of \l text within the full text on the page.

Definition at line 26 of file qpdfselection.h.

◆ startIndex

QPdfSelection::startIndex
read

This property holds the index at the beginning of \l text within the full text on the page.

Definition at line 25 of file qpdfselection.h.

◆ text

QPdfSelection::text
read

This property holds the selected text.

Definition at line 24 of file qpdfselection.h.

◆ valid

QPdfSelection::valid
read

This property holds whether the selection is valid.

Definition at line 21 of file qpdfselection.h.


The documentation for this class was generated from the following files: