diff options
author | John Layt <jlayt@kde.org> | 2012-06-01 19:49:45 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-09 01:46:36 +0200 |
commit | 14f45e535b4ef4cf169c3e0db817ac519b51b401 (patch) | |
tree | b3709a54368419e8ee7ac8351e83a2b9c64aff3c /src/printsupport/kernel/qplatformprintersupport.h | |
parent | 80ceba9a367a59da549b8680780ca5d160d16274 (diff) |
QtPrintSupport - Add CUPS printer and options queries to plugin
Implement initial support in the CUPS plugin for directly calling CUPS
to obtain printer list and basic printer info rather than QCupsSupport.
Add api to the plugin to return any options for a printer, usually IPP
options as implemented for CUPS, but whatever applies for the host
print system.
Future changes will add support for returning the PPD options. This
api may eventually be added to QPrinterInfo, but not in 5.0.
Change-Id: I6c8bae4c9295009599e6ab31382f5fff4c93981f
Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
Diffstat (limited to 'src/printsupport/kernel/qplatformprintersupport.h')
-rw-r--r-- | src/printsupport/kernel/qplatformprintersupport.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/printsupport/kernel/qplatformprintersupport.h b/src/printsupport/kernel/qplatformprintersupport.h index e922b5fb25..018ec05c03 100644 --- a/src/printsupport/kernel/qplatformprintersupport.h +++ b/src/printsupport/kernel/qplatformprintersupport.h @@ -53,6 +53,7 @@ #include <QtPrintSupport/qprinter.h> #include <QtCore/qlist.h> +#include <QtCore/qhash.h> QT_BEGIN_HEADER @@ -60,6 +61,8 @@ QT_BEGIN_NAMESPACE #ifndef QT_NO_PRINTER +typedef QHash<QString, QString> PrinterOptions; + class QPrintEngine; class Q_PRINTSUPPORT_EXPORT QPlatformPrinterSupport @@ -76,6 +79,9 @@ public: virtual QPrinterInfo defaultPrinter(); virtual QPrinterInfo printerInfo(const QString &printerName); + virtual QString printerOption(const QPrinterInfo &printer, const QString &key) const; + virtual PrinterOptions printerOptions(const QPrinterInfo &printer) const; + static QPrinter::PaperSize convertQSizeFToPaperSize(const QSizeF &sizef); static QSizeF convertPaperSizeToQSizeF(QPrinter::PaperSize paperSize); |