diff options
author | John Layt <jlayt@kde.org> | 2013-12-18 21:51:12 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-17 13:45:44 +0100 |
commit | b0428926cece7bc362bc24c2eb1621b9fef737c7 (patch) | |
tree | e5497f1b5c2f7bdacb5e7e0ba9898f9423884e26 /src/printsupport/kernel/qprinterinfo_p.h | |
parent | cf8b8340f3d283830a6aca2f708e839bb70d6d57 (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_p.h')
-rw-r--r-- | src/printsupport/kernel/qprinterinfo_p.h | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/src/printsupport/kernel/qprinterinfo_p.h b/src/printsupport/kernel/qprinterinfo_p.h index 6ae64b5653..7083356e1c 100644 --- a/src/printsupport/kernel/qprinterinfo_p.h +++ b/src/printsupport/kernel/qprinterinfo_p.h @@ -57,32 +57,17 @@ #ifndef QT_NO_PRINTER -#include "QtCore/qlist.h" -#include "QtCore/qpair.h" +#include "qprintdevice_p.h" QT_BEGIN_NAMESPACE class QPrinterInfoPrivate { public: - QPrinterInfoPrivate(const QString& name = QString()) : - name(name), isDefault(false), index(-1), hasPaperSizes(false), - hasPaperNames(false) - {} - ~QPrinterInfoPrivate() - {} + QPrinterInfoPrivate(const QString& id = QString()); + ~QPrinterInfoPrivate(); - QString name; - QString description; - QString location; - QString makeAndModel; - bool isDefault; - int index; // Internal printer plugin use only - - mutable bool hasPaperSizes; - mutable QList<QPrinter::PaperSize> paperSizes; - mutable bool hasPaperNames; - mutable QList<QPair<QString, QSizeF> > paperNames; + QPrintDevice m_printDevice; }; QT_END_NAMESPACE |