Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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
15QT_BEGIN_NAMESPACE
16
17class QDebug;
18class QPdfLinkPrivate;
19
21{
22 Q_GADGET_EXPORT(Q_PDF_EXPORT)
31
32public:
36
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;
51 Q_PDF_EXPORT Q_INVOKABLE QString toString() const;
53
54private: // methods
55 QPdfLink(int page, QPointF location, qreal zoom);
56 QPdfLink(int page, QList<QRectF> rects, QString contextBefore, QString contextAfter);
57 QPdfLink(QPdfLinkPrivate *d);
58 friend class QPdfDocument;
61 friend class QPdfPageNavigator;
62 friend class QQuickPdfPageNavigator;
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
74QT_END_NAMESPACE
75
76Q_DECLARE_METATYPE(QPdfLink)
77
78#endif // QPDFLINK_H
Combined button and popup list for selecting options.