From f50d46e5eb257528828998a465634d9044cdd17f Mon Sep 17 00:00:00 2001 From: John Layt Date: Tue, 10 Dec 2013 18:42:44 +0100 Subject: QPlatformPrintDevice - New QPA base class Add a new QPA class to abstract Print Devices. Each platform instance will encapsulate all required details about a print device instead of the code being distributed throughout the print engine and print plugin. Change-Id: I7f6a537ad55a6e7f599d83f461b1e2ee62b15094 Reviewed-by: Lars Knoll --- .../kernel/qplatformprintersupport.cpp | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/printsupport/kernel/qplatformprintersupport.cpp') diff --git a/src/printsupport/kernel/qplatformprintersupport.cpp b/src/printsupport/kernel/qplatformprintersupport.cpp index 4d80e55ab6..cddf979928 100644 --- a/src/printsupport/kernel/qplatformprintersupport.cpp +++ b/src/printsupport/kernel/qplatformprintersupport.cpp @@ -40,10 +40,12 @@ ****************************************************************************/ #include "qplatformprintersupport.h" +#include "qplatformprintdevice.h" #include #include +#include #ifndef QT_NO_PRINTER @@ -77,6 +79,32 @@ QPaintEngine *QPlatformPrinterSupport::createPaintEngine(QPrintEngine *, QPrinte return 0; } +QPrintDevice QPlatformPrinterSupport::createPrintDevice(QPlatformPrintDevice *device) +{ + return QPrintDevice(device); +} + +QPrintDevice QPlatformPrinterSupport::createPrintDevice(const QString &id) +{ + Q_UNUSED(id) + return QPrintDevice(); +} + +QPrintDevice QPlatformPrinterSupport::createDefaultPrintDevice() +{ + return createPrintDevice(defaultPrintDeviceId()); +} + +QStringList QPlatformPrinterSupport::availablePrintDeviceIds() const +{ + return QStringList(); +} + +QString QPlatformPrinterSupport::defaultPrintDeviceId() const +{ + return QString(); +} + QList QPlatformPrinterSupport::supportedPaperSizes(const QPrinterInfo &) const { return QList(); -- cgit v1.2.3