Add settings page
This commit is contained in:
parent
3bf59f0141
commit
40fe4c2b90
9 changed files with 319 additions and 7 deletions
|
@ -41,6 +41,7 @@ DISTFILES += qml/harbour-seaprint.qml \
|
||||||
qml/pages/BusyPage.qml \
|
qml/pages/BusyPage.qml \
|
||||||
qml/pages/DebugPage.qml \
|
qml/pages/DebugPage.qml \
|
||||||
qml/pages/NagScreen.qml \
|
qml/pages/NagScreen.qml \
|
||||||
|
qml/pages/SettingsPage.qml \
|
||||||
rpm/harbour-seaprint.changes.in \
|
rpm/harbour-seaprint.changes.in \
|
||||||
rpm/harbour-seaprint.changes.run.in \
|
rpm/harbour-seaprint.changes.run.in \
|
||||||
rpm/harbour-seaprint.spec \
|
rpm/harbour-seaprint.spec \
|
||||||
|
|
|
@ -83,6 +83,13 @@ ApplicationWindow
|
||||||
property int expectedValue: 1
|
property int expectedValue: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ConfigurationValue
|
||||||
|
{
|
||||||
|
id: considerAdditionalFormatsSetting
|
||||||
|
key: "/apps/harbour-seaprint/settings/consider-additional-formats"
|
||||||
|
defaultValue: true
|
||||||
|
}
|
||||||
|
|
||||||
ConfigurationValue
|
ConfigurationValue
|
||||||
{
|
{
|
||||||
id: alwaysConvertSetting
|
id: alwaysConvertSetting
|
||||||
|
@ -104,11 +111,5 @@ ApplicationWindow
|
||||||
defaultValue: true
|
defaultValue: true
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigurationValue
|
|
||||||
{
|
|
||||||
id: considerAdditionalFormatsSetting
|
|
||||||
key: "/apps/harbour-seaprint/settings/consider-additional-formats"
|
|
||||||
defaultValue: true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,6 +79,10 @@ Page {
|
||||||
text: qsTr("About SeaPrint")
|
text: qsTr("About SeaPrint")
|
||||||
onClicked: pageStack.push(Qt.resolvedUrl("AboutPage.qml"))
|
onClicked: pageStack.push(Qt.resolvedUrl("AboutPage.qml"))
|
||||||
}
|
}
|
||||||
|
MenuItem {
|
||||||
|
text: qsTr("Settings")
|
||||||
|
onClicked: pageStack.push(Qt.resolvedUrl("SettingsPage.qml"))
|
||||||
|
}
|
||||||
MenuItem {
|
MenuItem {
|
||||||
text: qsTr("Add by URL")
|
text: qsTr("Add by URL")
|
||||||
enabled: wifi.connected
|
enabled: wifi.connected
|
||||||
|
|
71
qml/pages/SettingsPage.qml
Normal file
71
qml/pages/SettingsPage.qml
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
import QtQuick 2.0
|
||||||
|
import Sailfish.Silica 1.0
|
||||||
|
|
||||||
|
Page {
|
||||||
|
SilicaFlickable {
|
||||||
|
anchors.fill: parent
|
||||||
|
contentHeight: column.height
|
||||||
|
|
||||||
|
Column {
|
||||||
|
id: column
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
width: parent.width - 2*Theme.paddingLarge
|
||||||
|
spacing: Theme.paddingLarge
|
||||||
|
|
||||||
|
PageHeader{}
|
||||||
|
|
||||||
|
TextSwitch {
|
||||||
|
text: qsTr("Show nag-screen")
|
||||||
|
description: qsTr("Display the warning page about optional dependencies not being installed, if they are not installed.")
|
||||||
|
checked: nagScreenSetting.value != nagScreenSetting.expectedValue
|
||||||
|
onCheckedChanged: {
|
||||||
|
if(checked)
|
||||||
|
{
|
||||||
|
nagScreenSetting.value=0
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nagScreenSetting.value = nagScreenSetting.expectedValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TextSwitch {
|
||||||
|
text: qsTr("Consider additional formats")
|
||||||
|
description: qsTr("Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF.")
|
||||||
|
checked: considerAdditionalFormatsSetting.value
|
||||||
|
onCheckedChanged: {
|
||||||
|
considerAdditionalFormatsSetting.value = checked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TextSwitch {
|
||||||
|
text: qsTr("Always convert to raster format")
|
||||||
|
description: qsTr("Force conversion to PWG/URF raster format. This is mainly intended for testing.")
|
||||||
|
checked: alwaysConvertSetting.value
|
||||||
|
onCheckedChanged: {
|
||||||
|
alwaysConvertSetting.value = checked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TextSwitch {
|
||||||
|
text: qsTr("Force-include document format")
|
||||||
|
description: qsTr("Force the document-format attribute to be included. Some printers have trouble recognizing certain formats, sometimes it helps to include this atribute even if the printer does not claim to support it.")
|
||||||
|
checked: forceIncluDeDocumentFormatSetting.value
|
||||||
|
onCheckedChanged: {
|
||||||
|
forceIncluDeDocumentFormatSetting.value = checked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TextSwitch {
|
||||||
|
text: qsTr("Remove redundant attributes")
|
||||||
|
description: qsTr("Remove redundant IPP attributes, if they are also conveyed in the transfer format. Some printers reject the job even if the settings are consistent.")
|
||||||
|
checked: removeRedundantConvertAttrsSetting.value
|
||||||
|
onCheckedChanged: {
|
||||||
|
removeRedundantConvertAttrsSetting.value = checked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -202,6 +202,10 @@
|
||||||
<source>Choose file</source>
|
<source>Choose file</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Settings</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>IppPrinter</name>
|
<name>IppPrinter</name>
|
||||||
|
@ -323,6 +327,49 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>SettingsPage</name>
|
||||||
|
<message>
|
||||||
|
<source>Show nag-screen</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Consider additional formats</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Always convert to raster format</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Force conversion to PWG/URF raster format. This is mainly intended for testing.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Force-include document format</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Force the document-format attribute to be included. Some printers have trouble recognizing certain formats, sometimes it helps to include this atribute even if the printer does not claim to support it.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Remove redundant attributes</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Remove redundant IPP attributes, if they are also conveyed in the transfer format. Some printers reject the job even if the settings are consistent.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Display the warning page about optional dependencies not being installed, if they are not installed.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>utils</name>
|
<name>utils</name>
|
||||||
<message>
|
<message>
|
||||||
|
|
|
@ -202,6 +202,10 @@
|
||||||
<source>Choose file</source>
|
<source>Choose file</source>
|
||||||
<translation type="unfinished">Elegir archivo</translation>
|
<translation type="unfinished">Elegir archivo</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Settings</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>IppPrinter</name>
|
<name>IppPrinter</name>
|
||||||
|
@ -323,6 +327,49 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>SettingsPage</name>
|
||||||
|
<message>
|
||||||
|
<source>Show nag-screen</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Consider additional formats</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Always convert to raster format</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Force conversion to PWG/URF raster format. This is mainly intended for testing.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Force-include document format</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Force the document-format attribute to be included. Some printers have trouble recognizing certain formats, sometimes it helps to include this atribute even if the printer does not claim to support it.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Remove redundant attributes</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Remove redundant IPP attributes, if they are also conveyed in the transfer format. Some printers reject the job even if the settings are consistent.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Display the warning page about optional dependencies not being installed, if they are not installed.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>utils</name>
|
<name>utils</name>
|
||||||
<message>
|
<message>
|
||||||
|
|
|
@ -202,6 +202,10 @@
|
||||||
<source>Choose file</source>
|
<source>Choose file</source>
|
||||||
<translation type="unfinished">Choisir un fichier</translation>
|
<translation type="unfinished">Choisir un fichier</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Settings</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>IppPrinter</name>
|
<name>IppPrinter</name>
|
||||||
|
@ -323,6 +327,49 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>SettingsPage</name>
|
||||||
|
<message>
|
||||||
|
<source>Show nag-screen</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Consider additional formats</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Always convert to raster format</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Force conversion to PWG/URF raster format. This is mainly intended for testing.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Force-include document format</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Force the document-format attribute to be included. Some printers have trouble recognizing certain formats, sometimes it helps to include this atribute even if the printer does not claim to support it.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Remove redundant attributes</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Remove redundant IPP attributes, if they are also conveyed in the transfer format. Some printers reject the job even if the settings are consistent.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Display the warning page about optional dependencies not being installed, if they are not installed.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>utils</name>
|
<name>utils</name>
|
||||||
<message>
|
<message>
|
||||||
|
|
|
@ -202,6 +202,10 @@
|
||||||
<source>Choose file</source>
|
<source>Choose file</source>
|
||||||
<translation type="unfinished">选择文件</translation>
|
<translation type="unfinished">选择文件</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Settings</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>IppPrinter</name>
|
<name>IppPrinter</name>
|
||||||
|
@ -323,6 +327,49 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>SettingsPage</name>
|
||||||
|
<message>
|
||||||
|
<source>Show nag-screen</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Consider additional formats</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Always convert to raster format</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Force conversion to PWG/URF raster format. This is mainly intended for testing.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Force-include document format</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Force the document-format attribute to be included. Some printers have trouble recognizing certain formats, sometimes it helps to include this atribute even if the printer does not claim to support it.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Remove redundant attributes</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Remove redundant IPP attributes, if they are also conveyed in the transfer format. Some printers reject the job even if the settings are consistent.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Display the warning page about optional dependencies not being installed, if they are not installed.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>utils</name>
|
<name>utils</name>
|
||||||
<message>
|
<message>
|
||||||
|
|
|
@ -202,6 +202,10 @@
|
||||||
<source>Choose file</source>
|
<source>Choose file</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Settings</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>IppPrinter</name>
|
<name>IppPrinter</name>
|
||||||
|
@ -323,6 +327,49 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>SettingsPage</name>
|
||||||
|
<message>
|
||||||
|
<source>Show nag-screen</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Consider additional formats</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Always convert to raster format</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Force conversion to PWG/URF raster format. This is mainly intended for testing.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Force-include document format</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Force the document-format attribute to be included. Some printers have trouble recognizing certain formats, sometimes it helps to include this atribute even if the printer does not claim to support it.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Remove redundant attributes</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Remove redundant IPP attributes, if they are also conveyed in the transfer format. Some printers reject the job even if the settings are consistent.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Display the warning page about optional dependencies not being installed, if they are not installed.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>utils</name>
|
<name>utils</name>
|
||||||
<message>
|
<message>
|
||||||
|
|
Loading…
Reference in a new issue