summaryrefslogtreecommitdiffstats
path: root/src/printsupport/kernel/qprinter.h
diff options
context:
space:
mode:
authorJohn Layt <jlayt@kde.org>2013-12-30 18:04:40 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-17 13:46:10 +0100
commitdbc50e06df8465e6de02ac0b4458e1a3f3f8568c (patch)
tree58375129a608575a7b99e6a3167baa668c9d7c25 /src/printsupport/kernel/qprinter.h
parent70081096a152d6973d85a1c1466bbc058fe0b24b (diff)
QPrinter - Use QPageSize and QPageLayout
Use QPageSize and QPageMargins to get/set values in the print engines, add api to directly set the values, and rewrite the docs to make the paper-based api obsolete instead of the page-based api. Add new PPK keys to pass QPageSize, QPageMargins and QPageLayout to the print engines to ensure no level of detail is lost, e.g. for custom sizes passed to QPrinter. [ChangeLog][QtPrintSupport][QPrinter] QPrinter can now use QPageSize and QPageLayout in the public api to control the page layout for a print job. Change-Id: Iee39a4042bcd6141d29b0a82b49066d7a7a78120 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/printsupport/kernel/qprinter.h')
-rw-r--r--src/printsupport/kernel/qprinter.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/printsupport/kernel/qprinter.h b/src/printsupport/kernel/qprinter.h
index f842c222f6..709d77d4e3 100644
--- a/src/printsupport/kernel/qprinter.h
+++ b/src/printsupport/kernel/qprinter.h
@@ -45,6 +45,7 @@
#include <QtCore/qstring.h>
#include <QtCore/qscopedpointer.h>
#include <QtGui/qpagedpaintdevice.h>
+#include <QtGui/qpagelayout.h>
#include <QtPrintSupport/qtprintsupportglobal.h>
QT_BEGIN_NAMESPACE
@@ -60,6 +61,8 @@ class QPrinterPrivate;
class QPaintEngine;
class QPrintEngine;
class QPrinterInfo;
+class QPageSize;
+class QPageMargins;
class Q_PRINTSUPPORT_EXPORT QPrinter : public QPagedPaintDevice
{
@@ -304,6 +307,12 @@ public:
void setCreator(const QString &);
QString creator() const;
+ bool setPageLayout(const QPageLayout &pageLayout);
+ bool setPageSize(const QPageSize &pageSize);
+ bool setPageOrientation(QPageLayout::Orientation orientation);
+ bool setPageMargins(const QMarginsF &margins, QPageLayout::Unit units);
+ QPageLayout pageLayout() const;
+
void setOrientation(Orientation);
Orientation orientation() const;