File indexing completed on 2025-07-06 04:48:05
0001 /* 0002 SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org> 0003 SPDX-License-Identifier: LGPL-2.0-or-later 0004 */ 0005 0006 #ifndef KITINERARY_PDFLINK_H 0007 #define KITINERARY_PDFLINK_H 0008 0009 #include "kitinerary_export.h" 0010 0011 #include <QExplicitlySharedDataPointer> 0012 #include <QMetaType> 0013 #include <QRectF> 0014 0015 class PDFRectangle; 0016 0017 namespace KItinerary { 0018 0019 class PdfExtractorOutputDevice; 0020 class PdfLinkPrivate; 0021 class PdfPagePrivate; 0022 0023 /** An external link in a PDF file. */ 0024 class KITINERARY_EXPORT PdfLink 0025 { 0026 Q_GADGET 0027 Q_PROPERTY(QString url READ url) 0028 Q_PROPERTY(QRectF area READ area) 0029 0030 public: 0031 PdfLink(); 0032 ~PdfLink(); 0033 PdfLink(const PdfLink&); 0034 PdfLink& operator=(const PdfLink&); 0035 0036 QString url() const; 0037 QRectF area() const; 0038 0039 private: 0040 friend class PdfExtractorOutputDevice; 0041 friend class PdfPagePrivate; 0042 0043 explicit PdfLink(const QString &url, const QRectF &area); 0044 void convertToPageRect(const PDFRectangle *pageRect); 0045 0046 QExplicitlySharedDataPointer<PdfLinkPrivate> d; 0047 }; 0048 0049 } 0050 0051 #endif // KITINERARY_PDFLINK_H