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
qpdflink.h
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QPDFLINK_H
5#define QPDFLINK_H
6
7#include <QtPdf/qtpdfglobal.h>
8#include <QtCore/qlist.h>
9#include <QtCore/qobject.h>
10#include <QtCore/qpoint.h>
11#include <QtCore/qrect.h>
12#include <QtCore/qshareddata.h>
13#include <QtGui/qclipboard.h>
14
16
17class QDebug;
18class QPdfLinkPrivate;
19
21{
22 Q_GADGET_EXPORT(Q_PDF_EXPORT)
31
32public:
33 Q_PDF_EXPORT QPdfLink();
34 Q_PDF_EXPORT ~QPdfLink();
35 Q_PDF_EXPORT QPdfLink &operator=(const QPdfLink &other);
36
37 Q_PDF_EXPORT QPdfLink(const QPdfLink &other) noexcept;
38 Q_PDF_EXPORT QPdfLink(QPdfLink &&other) noexcept;
39 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QPdfLink)
40
41 void swap(QPdfLink &other) noexcept { d.swap(other.d); }
42
43 Q_PDF_EXPORT bool isValid() const;
44 Q_PDF_EXPORT int page() const;
45 Q_PDF_EXPORT QPointF location() const;
46 Q_PDF_EXPORT qreal zoom() const;
47 Q_PDF_EXPORT QUrl url() const;
48 Q_PDF_EXPORT QString contextBefore() const;
49 Q_PDF_EXPORT QString contextAfter() const;
50 Q_PDF_EXPORT QList<QRectF> rectangles() const;
51 Q_PDF_EXPORT Q_INVOKABLE QString toString() const;
53
54private: // methods
56 QPdfLink(int page, QList<QRectF> rects, QString contextBefore, QString contextAfter);
58 friend class QPdfDocument;
61 friend class QPdfPageNavigator;
63
64private: // storage
65 QExplicitlySharedDataPointer<QPdfLinkPrivate> d;
66
67};
68Q_DECLARE_SHARED(QPdfLink)
69
70#ifndef QT_NO_DEBUG_STREAM
71Q_PDF_EXPORT QDebug operator<<(QDebug, const QPdfLink &);
72#endif
73
75
77
78#endif // QPDFLINK_H
Mode
\keyword clipboard mode
Definition qclipboard.h:27
\inmodule QtCore
void swap(QExplicitlySharedDataPointer &other) noexcept
Swap this instance's explicitly shared data pointer with the explicitly shared data pointer in other.
Definition qlist.h:75
The QPdfDocument class loads a PDF document and renders pages from it.
Navigation history within a PDF document.
\inmodule QtCore\reentrant
Definition qpoint.h:217
\inmodule QtCore\reentrant
Definition qrect.h:484
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qurl.h:94
Combined button and popup list for selecting options.
#define Q_DECLARE_METATYPE(TYPE)
Definition qmetatype.h:1525
GLint location
GLenum mode
#define Q_PROPERTY(...)
#define Q_GADGET_EXPORT(...)
#define Q_INVOKABLE
double qreal
Definition qtypes.h:187
QSharedPointer< T > other(t)
[5]