mobile-widgets/qml: add filedialog to export page

All exports are to file except 2 which are upload to web.

Integrate standard qml filedialog for all exports (minus 2).

Signed-off-by: Jan Iversen <jan@casacondor.com>
This commit is contained in:
jan Iversen 2019-11-19 12:29:32 +01:00 committed by Dirk Hohndel
parent 5307cbc1c7
commit 093813698c

View file

@ -12,6 +12,20 @@ Kirigami.ScrollablePage {
property int selectedExport: ExportType.EX_DIVE_XML
FileDialog {
id: saveAsDialog
folder: shortcuts.documents
selectFolder: true
title: radioGroup.current.text
onAccepted: {
manager.exportToFile(selectedExport, fileUrls, anonymize.checked)
close()
}
onRejected: {
close()
}
}
ColumnLayout {
width: parent.width
spacing: 1
@ -149,6 +163,12 @@ Kirigami.ScrollablePage {
SsrfButton {
text: qsTr("Next")
onClicked: {
if (selectedExport === ExportType.EX_DIVELOGS_DE ||
selectedExport === ExportType.EX_DIVESHARE) {
console.log("Upload TO BE DONE, You chose: " + selectedExport)
} else {
saveAsDialog.open()
}
}
}
}