From 75ffb131ed13183ef65a04e12d7506dedc0f1aaa Mon Sep 17 00:00:00 2001 From: Martin Klapetek Date: Thu, 12 Sep 2013 15:19:00 +0200 Subject: Add CUPS Page Set options to print support Adds combobox to select CUPS Page Set option (even/odd pages) into the Unix print dialog [ChangeLog][QtPrintSupport][QPrintDialog] Added support for setting CUPS Page Set (even/odd pages only) in the print dialog. Change-Id: I27dd846f58c164039fe2759064aafdf726a1287e Reviewed-by: John Layt --- src/printsupport/kernel/qcups_p.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/printsupport/kernel/qcups_p.h') diff --git a/src/printsupport/kernel/qcups_p.h b/src/printsupport/kernel/qcups_p.h index 8e82b35e12..412c50cfac 100644 --- a/src/printsupport/kernel/qcups_p.h +++ b/src/printsupport/kernel/qcups_p.h @@ -114,6 +114,13 @@ public: TopSecret }; + // Enum for valid page set + enum PageSet { + AllPages = 0, //CUPS Default + OddPages, + EvenPages + }; + static bool isAvailable(); static int cupsVersion() { return isAvailable() ? CUPS_VERSION_MAJOR*10000+CUPS_VERSION_MINOR*100+CUPS_VERSION_PATCH : 0; } int availablePrintersCount() const; @@ -143,6 +150,7 @@ public: static void setJobBilling(QPrinter *printer, const QString &jobBilling = QString()); static void setJobPriority(QPrinter *printer, int priority = 50); static void setBannerPages(QPrinter *printer, const BannerPage startBannerPage, const BannerPage endBannerPage); + static void setPageSet(QPrinter *printer, const PageSet pageSet); static bool printerHasPPD(const char *printerName); @@ -174,6 +182,7 @@ QT_END_NAMESPACE Q_DECLARE_METATYPE(QCUPSSupport::JobHoldUntil) Q_DECLARE_METATYPE(QCUPSSupport::BannerPage) +Q_DECLARE_METATYPE(QCUPSSupport::PageSet) #endif // QT_NO_CUPS -- cgit v1.2.3