![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The QPdfLink class defines a link between a region on a page (such as a hyperlink or a search result) and a destination (page, location on the page, and zoom level at which to view it). More...
#include <qpdflink.h>
Public Member Functions | |
Q_PDF_EXPORT | QPdfLink () |
Constructs an invalid Destination. | |
Q_PDF_EXPORT | ~QPdfLink () |
Q_PDF_EXPORT QPdfLink & | operator= (const QPdfLink &other) |
Q_PDF_EXPORT | QPdfLink (const QPdfLink &other) noexcept |
Q_PDF_EXPORT | QPdfLink (QPdfLink &&other) noexcept |
void | swap (QPdfLink &other) noexcept |
Q_PDF_EXPORT bool | isValid () const |
Q_PDF_EXPORT int | page () const |
Q_PDF_EXPORT QPointF | location () const |
Q_PDF_EXPORT qreal | zoom () const |
Q_PDF_EXPORT QUrl | url () const |
Q_PDF_EXPORT QString | contextBefore () const |
Q_PDF_EXPORT QString | contextAfter () const |
Q_PDF_EXPORT QList< QRectF > | rectangles () const |
Q_PDF_EXPORT Q_INVOKABLE QString | toString () const |
Returns a translated representation for display. | |
Q_PDF_EXPORT Q_INVOKABLE void | copyToClipboard (QClipboard::Mode mode=QClipboard::Clipboard) const |
Copies the toString() representation of the link to the \l {QGuiApplication::clipboard()}{system clipboard} depending on the mode given. | |
Properties | |
bool | valid |
This property holds whether the link is valid. | |
int | page |
This property holds the page number. | |
QPointF | location |
This property holds the location on the \l page, in units of points. | |
qreal | zoom |
This property holds the suggested magnification level, where 1.0 means default scale (1 pixel = 1 point). | |
QUrl | url |
This property holds the destination URL if the link is an external hyperlink; otherwise, it's empty. | |
QString | contextBefore |
This property holds adjacent text found on the page before the search string. | |
QString | contextAfter |
This property holds adjacent text found on the page after the search string. | |
QList< QRectF > | rectangles |
This property holds the region (set of rectangles) occupied by the link or search result on the page where it was found. | |
Friends | |
class | QPdfDocument |
class | QPdfLinkModelPrivate |
class | QPdfSearchModelPrivate |
class | QPdfPageNavigator |
class | QQuickPdfPageNavigator |
The QPdfLink class defines a link between a region on a page (such as a hyperlink or a search result) and a destination (page, location on the page, and zoom level at which to view it).
Definition at line 20 of file qpdflink.h.
QPdfLink::QPdfLink | ( | ) |
|
default |
|
defaultnoexcept |
|
defaultnoexcept |
QString QPdfLink::contextAfter | ( | ) | const |
Definition at line 127 of file qpdflink.cpp.
QString QPdfLink::contextBefore | ( | ) | const |
Definition at line 114 of file qpdflink.cpp.
void QPdfLink::copyToClipboard | ( | QClipboard::Mode | mode = QClipboard::Clipboard | ) | const |
Copies the toString() representation of the link to the \l {QGuiApplication::clipboard()}{system clipboard} depending on the mode given.
Definition at line 166 of file qpdflink.cpp.
bool QPdfLink::isValid | ( | ) | const |
Definition at line 55 of file qpdflink.cpp.
QPointF QPdfLink::location | ( | ) | const |
Definition at line 79 of file qpdflink.cpp.
int QPdfLink::page | ( | ) | const |
Definition at line 67 of file qpdflink.cpp.
Definition at line 143 of file qpdflink.cpp.
Definition at line 41 of file qpdflink.h.
QString QPdfLink::toString | ( | ) | const |
Returns a translated representation for display.
Definition at line 153 of file qpdflink.cpp.
QUrl QPdfLink::url | ( | ) | const |
Definition at line 101 of file qpdflink.cpp.
qreal QPdfLink::zoom | ( | ) | const |
Definition at line 90 of file qpdflink.cpp.
|
friend |
Definition at line 58 of file qpdflink.h.
|
friend |
Definition at line 59 of file qpdflink.h.
|
friend |
Definition at line 61 of file qpdflink.h.
|
friend |
Definition at line 60 of file qpdflink.h.
|
friend |
Definition at line 62 of file qpdflink.h.
|
read |
This property holds adjacent text found on the page after the search string.
If the link is a hyperlink, this string is empty.
Definition at line 29 of file qpdflink.h.
|
read |
This property holds adjacent text found on the page before the search string.
If the link is a hyperlink, this string is empty.
Definition at line 28 of file qpdflink.h.
|
read |
This property holds the location on the \l page, in units of points.
If the link is a search result, it is the location where the result is found; if the link is a hyperlink, it is the destination location.
Definition at line 25 of file qpdflink.h.
|
read |
This property holds the page number.
If the link is a search result, it is the page number on which the result is found; if the link is a hyperlink, it is the destination page number.
Definition at line 24 of file qpdflink.h.
This property holds the region (set of rectangles) occupied by the link or search result on the page where it was found.
If the text wraps around to multiple lines on the page, there may be multiple rectangles:
Definition at line 30 of file qpdflink.h.
|
read |
This property holds the destination URL if the link is an external hyperlink; otherwise, it's empty.
Definition at line 27 of file qpdflink.h.
|
read |
This property holds whether the link is valid.
Definition at line 23 of file qpdflink.h.
|
read |
This property holds the suggested magnification level, where 1.0 means default scale (1 pixel = 1 point).
If the link is a search result, this value is not used.
Definition at line 26 of file qpdflink.h.