diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-05-30 11:18:46 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-05-30 14:21:09 +0200 |
commit | af13869fef8db737ec9e0ed4f1e95c7fd8fd4eab (patch) | |
tree | 896acfdb2f0c1f6ac993762d3fecb16ef69731c3 /src/gui/kernel | |
parent | 09796553a5c3253d8507600f31d24589b52aa080 (diff) |
Add QPlatformPrinterSupport.
Add QPlatformPrinterSupport which provides functionality for
obtaining QPrinterInfo and creating native printer engines.
Rubber-stamped-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qplatformintegration_qpa.cpp | 12 | ||||
-rw-r--r-- | src/gui/kernel/qplatformintegration_qpa.h | 4 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/gui/kernel/qplatformintegration_qpa.cpp b/src/gui/kernel/qplatformintegration_qpa.cpp index 7a95ffa2a5..b335dd5a97 100644 --- a/src/gui/kernel/qplatformintegration_qpa.cpp +++ b/src/gui/kernel/qplatformintegration_qpa.cpp @@ -43,6 +43,7 @@ #include <QtGui/QPlatformFontDatabase> #include <QtGui/QPlatformClipboard> +#include <QtGui/QPlatformPrinterSupport> QT_BEGIN_NAMESPACE @@ -218,8 +219,19 @@ bool QPlatformIntegration::hasCapability(Capability cap) const return false; } +/*! + Returns the platform's printing support. + \since 5.0 +*/ +QPlatformPrinterSupport *QPlatformIntegration::printerSupport() const +{ + static QPlatformPrinterSupport *ps = 0; + if (!ps) + ps = new QPlatformPrinterSupport; + return ps; +} QT_END_NAMESPACE diff --git a/src/gui/kernel/qplatformintegration_qpa.h b/src/gui/kernel/qplatformintegration_qpa.h index b42a162019..c3d311eb1e 100644 --- a/src/gui/kernel/qplatformintegration_qpa.h +++ b/src/gui/kernel/qplatformintegration_qpa.h @@ -60,7 +60,7 @@ class QPlatformEventLoopIntegration; class QPlatformFontDatabase; class QPlatformClipboard; class QPlatformNativeInterface; - +class QPlatformPrinterSupport; class Q_GUI_EXPORT QPlatformIntegration { @@ -98,6 +98,8 @@ public: // Access native handles. The window handle is already available from Wid; virtual QPlatformNativeInterface *nativeInterface() const; + + virtual QPlatformPrinterSupport *printerSupport() const; }; QT_END_NAMESPACE |