diff options
author | John Layt <jlayt@kde.org> | 2013-12-10 18:42:44 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-17 13:45:31 +0100 |
commit | f50d46e5eb257528828998a465634d9044cdd17f (patch) | |
tree | f7ae3f0ee13b06fb47247b1ef760a2274194c11e /src/printsupport/kernel/qplatformprintersupport.h | |
parent | 5eeed00f4d01d5033594854399a33d6ec54c3e58 (diff) |
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 <lars.knoll@digia.com>
Diffstat (limited to 'src/printsupport/kernel/qplatformprintersupport.h')
-rw-r--r-- | src/printsupport/kernel/qplatformprintersupport.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/printsupport/kernel/qplatformprintersupport.h b/src/printsupport/kernel/qplatformprintersupport.h index c4ffcffd1e..6a4ecc09c8 100644 --- a/src/printsupport/kernel/qplatformprintersupport.h +++ b/src/printsupport/kernel/qplatformprintersupport.h @@ -52,6 +52,7 @@ #include <QtPrintSupport/qprinter.h> +#include <QtCore/qstringlist.h> #include <QtCore/qlist.h> #include <QtCore/qhash.h> @@ -61,6 +62,8 @@ QT_BEGIN_NAMESPACE typedef QHash<QString, QString> PrinterOptions; +class QPlatformPrintDevice; +class QPrintDevice; class QPrintEngine; class Q_PRINTSUPPORT_EXPORT QPlatformPrinterSupport @@ -71,6 +74,12 @@ public: virtual QPrintEngine *createNativePrintEngine(QPrinter::PrinterMode printerMode); virtual QPaintEngine *createPaintEngine(QPrintEngine *, QPrinter::PrinterMode printerMode); + + virtual QPrintDevice createPrintDevice(const QString &id); + virtual QPrintDevice createDefaultPrintDevice(); + virtual QStringList availablePrintDeviceIds() const; + virtual QString defaultPrintDeviceId() const; + virtual QList<QPrinter::PaperSize> supportedPaperSizes(const QPrinterInfo &) const; virtual QList<QPair<QString, QSizeF> > supportedSizesWithNames(const QPrinterInfo &printerInfo) const; virtual QList<QPrinterInfo> availablePrinters(); @@ -88,6 +97,7 @@ protected: static QPrinterInfo createPrinterInfo(const QString &name, const QString &description, const QString &location, const QString &makeAndModel, bool isDefault, int index); + static QPrintDevice createPrintDevice(QPlatformPrintDevice *device); QList<QPrinterInfo> m_printers; }; |