summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qprintengine_mac_p.h
diff options
context:
space:
mode:
authorJohn Layt <jlayt@kde.org>2014-01-21 20:07:16 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-17 13:45:58 +0100
commitc5cbdc2cbce4d2f471836f1a1c7c963ce985ac49 (patch)
treeb5d7de77d5f00b420a2a0d8fdeed57ee72556b8e /src/plugins/platforms/cocoa/qprintengine_mac_p.h
parentd13195584e3ec4b3c30b626c360e81e437757427 (diff)
QPrintEngine - Switch Mac to QPlatformPrintDevice
Change the Mac QPrintEngine to use QPlatformPrintDevice and QPageSize for all device and page size related requirements. Change-Id: Ie0e598eceaf1a657a1554c0f56078fd857ef2e06 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qprintengine_mac_p.h')
-rw-r--r--src/plugins/platforms/cocoa/qprintengine_mac_p.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/plugins/platforms/cocoa/qprintengine_mac_p.h b/src/plugins/platforms/cocoa/qprintengine_mac_p.h
index e3a8520811..cb68f03fdb 100644
--- a/src/plugins/platforms/cocoa/qprintengine_mac_p.h
+++ b/src/plugins/platforms/cocoa/qprintengine_mac_p.h
@@ -60,6 +60,9 @@
#include <QtPrintSupport/qprinter.h>
#include <QtPrintSupport/qprintengine.h>
#include <QtGui/private/qpainter_p.h>
+#include <QtGui/qpagelayout.h>
+
+#include "qcocoaprintdevice.h"
#include "qpaintengine_mac_p.h"
@@ -122,6 +125,8 @@ public:
QPrinter::PrinterMode mode;
QPrinter::PrinterState state;
QPrinter::Orientation orient;
+ QSharedDataPointer<QCocoaPrintDevice> m_printDevice;
+ QPageSize m_pageSize;
NSPrintInfo *printInfo;
PMResolution resolution;
QString outputFilename;
@@ -136,18 +141,16 @@ public:
qreal rightMargin;
qreal bottomMargin;
QHash<QMacPrintEngine::PrintEnginePropertyKey, QVariant> valueCache;
- PMPaper customPaper;
+
QMacPrintEnginePrivate() : mode(QPrinter::ScreenResolution), state(QPrinter::Idle),
orient(QPrinter::Portrait), printInfo(0), paintEngine(0),
hasCustomPaperSize(false), hasCustomPageMargins(false) {}
~QMacPrintEnginePrivate();
+
void initialize();
void releaseSession();
bool newPage_helper();
- void setPaperSize(QPrinter::PaperSize ps);
- QPrinter::PaperSize paperSize() const;
- void setPaperName(const QString &name);
- QList<QVariant> supportedResolutions() const;
+ void setPageSize(const QPageSize &pageSize);
inline bool isPrintSessionInitialized() const
{
return printInfo != 0;