7#include <QGuiApplication>
13
14
15
16
17
18
19
20
23
24
25
26
28 QPdfLink(
new QPdfLinkPrivate()) { }
30QPdfLink::QPdfLink(
int page, QPointF location, qreal zoom)
31 : QPdfLink(
new QPdfLinkPrivate(page, location, zoom))
35QPdfLink::QPdfLink(
int page, QList<QRectF> rects,
36 QString contextBefore, QString contextAfter)
37 : QPdfLink(
new QPdfLinkPrivate(page, std::move(rects),
38 std::move(contextBefore),
39 std::move(contextAfter)))
43QPdfLink::QPdfLink(QPdfLinkPrivate *d) : d(d) {}
51
52
53
54
61
62
63
64
65
66
73
74
75
76
77
78
85
86
87
88
89
96
97
98
99
100
107
108
109
110
111
112
113
116 return d->contextBefore;
120
121
122
123
124
125
126
129 return d->contextAfter;
133
134
135
136
137
138
139
140
141
142
149
150
151
152
156 return d->url.toString();
157 return QPdfLinkModel::tr(
"Page %1 location %2, %3 zoom %4")
158 .arg(d->page).arg(d->location.x(), 0,
'f', 1).arg(d->location.y(), 0,
'f', 1)
159 .arg(d->zoom, 0,
'f', 0);
163
164
165
166void QPdfLink::copyToClipboard(QClipboard::Mode mode)
const
168 QGuiApplication::clipboard()->setText(toString(), mode);
171#ifndef QT_NO_DEBUG_STREAM
174 QDebugStateSaver saver(dbg);
176 dbg <<
"QPdfLink(page=" << link.page()
177 <<
" location=" << link.location()
178 <<
" zoom=" << link.zoom()
179 <<
" contextBefore=" << link.contextBefore()
180 <<
" contextAfter=" << link.contextAfter()
181 <<
" rects=" << link.rectangles();
189#include "moc_qpdflink.cpp"
The QPdfLink class defines a link between a region on a page (such as a hyperlink or a search result)...
Q_PDF_EXPORT int page() const