summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qprinterinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting/qprinterinfo.cpp')
-rw-r--r--src/gui/painting/qprinterinfo.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/gui/painting/qprinterinfo.cpp b/src/gui/painting/qprinterinfo.cpp
index a7ddc85a54..0049bd248a 100644
--- a/src/gui/painting/qprinterinfo.cpp
+++ b/src/gui/painting/qprinterinfo.cpp
@@ -30,6 +30,9 @@
#ifndef QT_NO_PRINTER
+#include <private/qguiapplication_p.h>
+#include <QtGui/QPlatformPrinterSupport>
+
QT_BEGIN_NAMESPACE
QPrinterInfoPrivate QPrinterInfoPrivate::shared_null;
@@ -168,6 +171,29 @@ bool QPrinterInfo::isDefault() const
On Mac OS X 10.3, this function always returns an empty list.
*/
+#ifdef Q_WS_QPA
+QList<QPrinter::PaperSize> QPrinterInfo::supportedPaperSizes() const
+{
+ const Q_D(QPrinterInfo);
+ if (!isNull() && !d->hasPaperSizes) {
+ d->paperSizes = QGuiApplicationPrivate::platformIntegration()->printerSupport()->supportedPaperSizes(*this);
+ d->hasPaperSizes = true;
+ }
+ return d->paperSizes;
+}
+
+QList<QPrinterInfo> QPrinterInfo::availablePrinters()
+{
+ return QGuiApplicationPrivate::platformIntegration()->printerSupport()->availablePrinters();
+}
+
+QPrinterInfo QPrinterInfo::defaultPrinter()
+{
+ return QGuiApplicationPrivate::platformIntegration()->printerSupport()->defaultPrinter();
+}
+
+#endif //Q_WS_QPA
+
QT_END_NAMESPACE
#endif // QT_NO_PRINTER