Move settings

This commit is contained in:
Anton Thomasson 2020-06-07 14:33:35 +02:00
parent 5df016b0fa
commit dae84a97c9
2 changed files with 24 additions and 23 deletions

View file

@ -82,5 +82,26 @@ ApplicationWindow
defaultValue: 0 defaultValue: 0
property int expectedValue: 1 property int expectedValue: 1
} }
ConfigurationValue
{
id: alwaysConvertSetting
key: "/apps/harbour-seaprint/settings/always-convert"
defaultValue: false
}
ConfigurationValue
{
id: forceIncluDeDocumentFormatSetting
key: "/apps/harbour-seaprint/settings/force-include-document-format"
defaultValue: false
}
ConfigurationValue
{
id: removeRedundantAttributesForRasterSetting
key: "/apps/harbour-seaprint/settings/remove-redundant-raster-attributes"
defaultValue: true
}
} }

View file

@ -3,7 +3,6 @@ import Sailfish.Silica 1.0
import seaprint.mimer 1.0 import seaprint.mimer 1.0
import seaprint.ippmsg 1.0 import seaprint.ippmsg 1.0
import "utils.js" as Utils import "utils.js" as Utils
import Nemo.Configuration 1.0
Page { Page {
id: page id: page
@ -11,27 +10,6 @@ Page {
property var jobParams: new Object(); property var jobParams: new Object();
property string selectedFile property string selectedFile
ConfigurationValue
{
id: alwaysConvert
key: "/apps/harbour-seaprint/settings/always_convert"
defaultValue: false
}
ConfigurationValue
{
id: forceIncluDeDocumentFormat
key: "/apps/harbour-seaprint/settings/force_include_document_format"
defaultValue: false
}
ConfigurationValue
{
id: removeRedundantAttributesForRaster
key: "/apps/harbour-seaprint/settings/remove_redundant_attributes_for_raster"
defaultValue: true
}
Component.onCompleted: { Component.onCompleted: {
console.log(JSON.stringify(printer.attrs)) console.log(JSON.stringify(printer.attrs))
} }
@ -49,7 +27,9 @@ Page {
pageStack.replace(Qt.resolvedUrl("BusyPage.qml"),{printer:printer}, pageStack.replace(Qt.resolvedUrl("BusyPage.qml"),{printer:printer},
PageStackAction.Immediate) PageStackAction.Immediate)
printer.print(jobParams, page.selectedFile, printer.print(jobParams, page.selectedFile,
alwaysConvert.value, forceIncluDeDocumentFormat.value, removeRedundantAttributesForRaster.value) alwaysConvertSetting.value,
forceIncluDeDocumentFormatSetting.value,
removeRedundantAttributesForRasterSetting.value)
} }
} }
} }