summaryrefslogtreecommitdiffstats
path: root/src/printsupport/kernel/qprinterinfo.h
diff options
context:
space:
mode:
authorJohn Layt <jlayt@kde.org>2013-12-18 21:51:12 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-17 13:45:44 +0100
commitb0428926cece7bc362bc24c2eb1621b9fef737c7 (patch)
treee5497f1b5c2f7bdacb5e7e0ba9898f9423884e26 /src/printsupport/kernel/qprinterinfo.h
parentcf8b8340f3d283830a6aca2f708e839bb70d6d57 (diff)
QPrinterInfo - Switch to QPlatformPrintDevice
Change the QPrinterInfo implementation to use QPlatformPrintDevice as the backend. Remove all the old QPrinterInfo related code from the QPA plugin. Add public api to QPrinterInfo to support some features from QPlatformPrintDevice. [ChangeLog][QtPrintSupport][QPrinterInfo] Added new public api for isRemote(), state(), defaultPageSize(), supportedPageSizes(), supportsCustomPageSizes(), minimumPhysicalPageSize(), maximumPhysicalPageSize(), supportedResolutions(), availablePrinterNames(), and defaultPrinterName(). The use of availablePrinters() is discouraged due to performance concerns. Task-number: QTBUG-35248 Change-Id: Ic38323a930549ad67bf04a1a6bb43d623dfe6a33 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/printsupport/kernel/qprinterinfo.h')
-rw-r--r--src/printsupport/kernel/qprinterinfo.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/src/printsupport/kernel/qprinterinfo.h b/src/printsupport/kernel/qprinterinfo.h
index 0dc19c1da7..73ec48dfe7 100644
--- a/src/printsupport/kernel/qprinterinfo.h
+++ b/src/printsupport/kernel/qprinterinfo.h
@@ -42,9 +42,11 @@
#ifndef QPRINTERINFO_H
#define QPRINTERINFO_H
+#include <QtPrintSupport/qprinter.h>
+
#include <QtCore/QList>
#include <QtCore/QPair>
-#include <QtPrintSupport/QPrinter>
+#include <QtGui/qpagesize.h>
QT_BEGIN_NAMESPACE
@@ -69,12 +71,31 @@ public:
bool isNull() const;
bool isDefault() const;
+ bool isRemote() const;
+
+ QPrinter::PrinterState state() const;
+
+ QList<QPageSize> supportedPageSizes() const;
+ QPageSize defaultPageSize() const;
+
+ bool supportsCustomPageSizes() const;
- QList<QPrinter::PaperSize> supportedPaperSizes() const;
- QList<QPair<QString, QSizeF> > supportedSizesWithNames() const;
+ QPageSize minimumPhysicalPageSize() const;
+ QPageSize maximumPhysicalPageSize() const;
+#if QT_DEPRECATED_SINCE(5,3)
+ QT_DEPRECATED QList<QPrinter::PaperSize> supportedPaperSizes() const;
+ QT_DEPRECATED QList<QPair<QString, QSizeF> > supportedSizesWithNames() const;
+#endif // QT_DEPRECATED_SINCE(5,3)
+
+ QList<int> supportedResolutions() const;
+
+ static QStringList availablePrinterNames();
static QList<QPrinterInfo> availablePrinters();
+
+ static QString defaultPrinterName();
static QPrinterInfo defaultPrinter();
+
static QPrinterInfo printerInfo(const QString &printerName);
private: