From e9eeb68a656bd52c4a783dc4247c627c5363209a Mon Sep 17 00:00:00 2001 From: Antonin Stefanutti Date: Thu, 21 May 2015 22:05:47 +0200 Subject: Add support for drawing a hyperlink in QPdfEngine Adds the drawHyperlink method so that clients can draw a hyperlink pointing to the specified URL at the specified rectangle. That new method is to be used by GraphicContext::setURLForRect implementations that want to render anchors as clickable links in PDF documents. Task-number: QTBUG-44563 Change-Id: I7b0c602da37ee157d18115c531ab1b11fe304c13 Reviewed-by: Lars Knoll --- src/gui/painting/qpdf_p.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gui/painting/qpdf_p.h') diff --git a/src/gui/painting/qpdf_p.h b/src/gui/painting/qpdf_p.h index 2b50cdc6f7..de30744ca2 100644 --- a/src/gui/painting/qpdf_p.h +++ b/src/gui/painting/qpdf_p.h @@ -188,6 +188,8 @@ public: Qt::ImageConversionFlags flags = Qt::AutoColor) Q_DECL_OVERRIDE; void drawTiledPixmap (const QRectF & rectangle, const QPixmap & pixmap, const QPointF & point) Q_DECL_OVERRIDE; + void drawHyperlink(const QRectF &r, const QUrl &url); + void updateState(const QPaintEngineState &state) Q_DECL_OVERRIDE; int metric(QPaintDevice::PaintDeviceMetric metricType) const; -- cgit v1.2.3