From 4d76999df608cf86307f69b287f8ffa60aa4faff Mon Sep 17 00:00:00 2001 From: Anton Thomasson Date: Sun, 4 Oct 2020 18:16:21 +0200 Subject: [PATCH] Support collated copies --- qml/pages/PrinterPage.qml | 23 ++++++++++++----------- qml/pages/utils.js | 17 +++++++++++++++++ translations/harbour-seaprint-de.ts | 20 ++++++++++++++++++++ translations/harbour-seaprint-es.ts | 20 ++++++++++++++++++++ translations/harbour-seaprint-fr.ts | 20 ++++++++++++++++++++ translations/harbour-seaprint-nl.ts | 20 ++++++++++++++++++++ translations/harbour-seaprint-pl.ts | 20 ++++++++++++++++++++ translations/harbour-seaprint-zh_CN.ts | 20 ++++++++++++++++++++ translations/harbour-seaprint.ts | 20 ++++++++++++++++++++ 9 files changed, 169 insertions(+), 11 deletions(-) diff --git a/qml/pages/PrinterPage.qml b/qml/pages/PrinterPage.qml index 499e007..33154d3 100644 --- a/qml/pages/PrinterPage.qml +++ b/qml/pages/PrinterPage.qml @@ -38,17 +38,18 @@ Page { ListModel { id:mod - ListElement {name: "sides"; prettyName: qsTr("Sides"); tag: IppMsg.Enum} - ListElement {name: "media"; prettyName: qsTr("Print media"); tag: IppMsg.Keyword} - ListElement {name: "copies"; prettyName: qsTr("Copies"); tag: IppMsg.Integer} - ListElement {name: "page-ranges"; prettyName: qsTr("Page range"); tag: IppMsg.IntegerRange} - ListElement {name: "print-color-mode"; prettyName: qsTr("Color mode"); tag: IppMsg.Enum} -// ListElement {name: "orientation-requested"; prettyName: qsTr("Orientation"); tag: IppMsg.Enum} - ListElement {name: "print-quality"; prettyName: qsTr("Quality"); tag: IppMsg.Enum} - ListElement {name: "printer-resolution"; prettyName: qsTr("Resolution"); tag: IppMsg.Resolution} - ListElement {name: "document-format"; prettyName: qsTr("Transfer format"); tag: IppMsg.MimeMediaType} - ListElement {name: "media-source"; prettyName: qsTr("Media source"); tag: IppMsg.Keyword} - ListElement {name: "media-col"; prettyName: qsTr("Zero margins"); tag: IppMsg.BeginCollection} + ListElement {name: "sides"; prettyName: qsTr("Sides"); tag: IppMsg.Enum} + ListElement {name: "media"; prettyName: qsTr("Print media"); tag: IppMsg.Keyword} + ListElement {name: "copies"; prettyName: qsTr("Copies"); tag: IppMsg.Integer} + ListElement {name: "multiple-document-handling"; prettyName: qsTr("Collated copies"); tag: IppMsg.Keyword} + ListElement {name: "page-ranges"; prettyName: qsTr("Page range"); tag: IppMsg.IntegerRange} + ListElement {name: "print-color-mode"; prettyName: qsTr("Color mode"); tag: IppMsg.Enum} +// ListElement {name: "orientation-requested"; prettyName: qsTr("Orientation"); tag: IppMsg.Enum} + ListElement {name: "print-quality"; prettyName: qsTr("Quality"); tag: IppMsg.Enum} + ListElement {name: "printer-resolution"; prettyName: qsTr("Resolution"); tag: IppMsg.Resolution} + ListElement {name: "document-format"; prettyName: qsTr("Transfer format"); tag: IppMsg.MimeMediaType} + ListElement {name: "media-source"; prettyName: qsTr("Media source"); tag: IppMsg.Keyword} + ListElement {name: "media-col"; prettyName: qsTr("Zero margins"); tag: IppMsg.BeginCollection} } SilicaListView { diff --git a/qml/pages/utils.js b/qml/pages/utils.js index e172813..a43383c 100644 --- a/qml/pages/utils.js +++ b/qml/pages/utils.js @@ -147,6 +147,20 @@ function ippName(name, value) default: return value } + case "multiple-document-handling": + switch(value) { + case "single-document": + return qsTr("single document"); + case "separate-documents-uncollated-copies": + return qsTr("uncollated"); + case "separate-documents-collated-copies": + return qsTr("collated"); + case "single-document-new-sheet": + return qsTr("single document (new sheet)"); + default: + return value + } + case "print-color-mode": switch(value) { case "auto": @@ -284,6 +298,9 @@ function limitChoices(name, choices, mimeType, ConvertChecker) } case "printer-resolution": return choices.filter(unitsIsDpi); + case "multiple-document-handling" : + // Only collation settings valid, multiple documents not used + return choices.filter(function(elem) {return elem.indexOf("collated") != -1}); default: return choices; } diff --git a/translations/harbour-seaprint-de.ts b/translations/harbour-seaprint-de.ts index f95662b..900371c 100644 --- a/translations/harbour-seaprint-de.ts +++ b/translations/harbour-seaprint-de.ts @@ -418,6 +418,10 @@ Page range Seiten Bereich + + Collated copies + + RangeSetting @@ -694,5 +698,21 @@ Unknown State + + single document + + + + uncollated + + + + collated + + + + single document (new sheet) + + diff --git a/translations/harbour-seaprint-es.ts b/translations/harbour-seaprint-es.ts index f6742c9..ed0c004 100644 --- a/translations/harbour-seaprint-es.ts +++ b/translations/harbour-seaprint-es.ts @@ -418,6 +418,10 @@ Page range + + Collated copies + + RangeSetting @@ -694,5 +698,21 @@ Unknown State + + single document + + + + uncollated + + + + collated + + + + single document (new sheet) + + diff --git a/translations/harbour-seaprint-fr.ts b/translations/harbour-seaprint-fr.ts index d7a76f1..9b701d8 100644 --- a/translations/harbour-seaprint-fr.ts +++ b/translations/harbour-seaprint-fr.ts @@ -418,6 +418,10 @@ Page range + + Collated copies + + RangeSetting @@ -694,5 +698,21 @@ Unknown State + + single document + + + + uncollated + + + + collated + + + + single document (new sheet) + + diff --git a/translations/harbour-seaprint-nl.ts b/translations/harbour-seaprint-nl.ts index 3692b7f..798f366 100644 --- a/translations/harbour-seaprint-nl.ts +++ b/translations/harbour-seaprint-nl.ts @@ -418,6 +418,10 @@ Page range Paginabereik + + Collated copies + + RangeSetting @@ -694,5 +698,21 @@ Unknown State + + single document + + + + uncollated + + + + collated + + + + single document (new sheet) + + diff --git a/translations/harbour-seaprint-pl.ts b/translations/harbour-seaprint-pl.ts index ab9ee80..8ac789b 100644 --- a/translations/harbour-seaprint-pl.ts +++ b/translations/harbour-seaprint-pl.ts @@ -418,6 +418,10 @@ Zero margins + + Collated copies + + RangeSetting @@ -694,5 +698,21 @@ Unknown State + + single document + + + + uncollated + + + + collated + + + + single document (new sheet) + + diff --git a/translations/harbour-seaprint-zh_CN.ts b/translations/harbour-seaprint-zh_CN.ts index 23691e9..4a0bde1 100644 --- a/translations/harbour-seaprint-zh_CN.ts +++ b/translations/harbour-seaprint-zh_CN.ts @@ -418,6 +418,10 @@ Page range + + Collated copies + + RangeSetting @@ -694,5 +698,21 @@ Unknown State + + single document + + + + uncollated + + + + collated + + + + single document (new sheet) + + diff --git a/translations/harbour-seaprint.ts b/translations/harbour-seaprint.ts index 5306555..8b43933 100644 --- a/translations/harbour-seaprint.ts +++ b/translations/harbour-seaprint.ts @@ -418,6 +418,10 @@ Page range + + Collated copies + + RangeSetting @@ -694,5 +698,21 @@ Unknown State + + single document + + + + uncollated + + + + collated + + + + single document (new sheet) + +