QPdfSelection Class
The QPdfSelection class defines a range of text that has been selected on one page in a PDF document, and its geometric boundaries. More...
Header: | #include <QPdfSelection> |
Since: | Qt 5.15 |
Properties
|
|
Public Functions
QPdfSelection(const QPdfSelection &other) | |
QPdfSelection(QPdfSelection &&other) | |
~QPdfSelection() | |
QRectF | boundingRectangle() const |
QVector<QPolygonF> | bounds() const |
void | copyToClipboard(QClipboard::Mode mode = QClipboard::Clipboard) const |
int | endIndex() const |
bool | isValid() const |
int | startIndex() const |
void | swap(QPdfSelection &other) |
QString | text() const |
QPdfSelection & | operator=(const QPdfSelection &other) |
QPdfSelection & | operator=(QPdfSelection &&other) |
Static Public Members
const QMetaObject | staticMetaObject |
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.
See also QPdfDocument::getSelection().
Property Documentation
boundingRectangle : const QRectF
Access functions:
QRectF | boundingRectangle() const |
bounds : const QVector<QPolygonF>
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 points.
Note: For now, the polygons returned from QPdfDocument::getSelection() are always rectangles; but in the future it may be possible to represent more complex regions.
Access functions:
QVector<QPolygonF> | bounds() const |
endIndex : const int
Access functions:
int | endIndex() const |
startIndex : const int
Access functions:
int | startIndex() const |
text : const QString
This property holds the selected text.
Access functions:
QString | text() const |
valid : const bool
This property holds whether the selection is valid.
Access functions:
bool | isValid() const |
Member Function Documentation
QPdfSelection::QPdfSelection(const QPdfSelection &other)
Default constructs an instance of QPdfSelection.
QPdfSelection::QPdfSelection(QPdfSelection &&other)
Move-copy constructor.
QPdfSelection::~QPdfSelection()
Destroys the instance of QPdfSelection.
void QPdfSelection::copyToClipboard(QClipboard::Mode mode = QClipboard::Clipboard) const
Copies text to the system clipboard.
void QPdfSelection::swap(QPdfSelection &other)
QPdfSelection &QPdfSelection::operator=(const QPdfSelection &other)
Copy-assignment operator.
QPdfSelection &QPdfSelection::operator=(QPdfSelection &&other)
Move-assignment operator.