From 9e29fab38df831f33385ee25bff235a620aa20d5 Mon Sep 17 00:00:00 2001 From: John Layt Date: Sun, 5 Jan 2014 18:51:32 +0100 Subject: QPdfWriter - Use QPageSize and QPageLayout Add support to QPdfWriter for QPageSize, QPageLayout, and resolution. [ChangeLog][QtGui][QPdfWriter] The QPdfWriter now supports setting the PDF orientation, layout and resolution by using QPageSize and QPageLayout. Change-Id: I9c269f997ec540dac1989f355c6a2e7488947966 Reviewed-by: Lars Knoll --- src/gui/painting/qpdfwriter.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/gui/painting/qpdfwriter.h') diff --git a/src/gui/painting/qpdfwriter.h b/src/gui/painting/qpdfwriter.h index f5c25de5e9..fce0b88ea8 100644 --- a/src/gui/painting/qpdfwriter.h +++ b/src/gui/painting/qpdfwriter.h @@ -48,6 +48,7 @@ #include #include +#include QT_BEGIN_NAMESPACE @@ -70,6 +71,17 @@ public: bool newPage(); + void setResolution(int resolution); + int resolution() const; + + bool setPageLayout(const QPageLayout &pageLayout); + bool setPageSize(const QPageSize &pageSize); + bool setPageOrientation(QPageLayout::Orientation orientation); + bool setPageMargins(const QMarginsF &margins); + bool setPageMargins(const QMarginsF &margins, QPageLayout::Unit units); + + QPageLayout pageLayout() const; + void setPageSize(PageSize size); void setPageSizeMM(const QSizeF &size); -- cgit v1.2.3