summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2019-11-19 12:29:32 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-03 21:30:39 -0800
commit093813698cf716e845e2ab3a9e6e6584206d18e8 (patch)
tree079ee77f7e37cf02fd72558e6ffe0d93d9cf0e33 /mobile-widgets
parent5307cbc1c79ee4dfd163c57e427e02c362d5998b (diff)
downloadsubsurface-093813698cf716e845e2ab3a9e6e6584206d18e8.tar.gz
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>
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qml/Export.qml20
1 files changed, 20 insertions, 0 deletions
diff --git a/mobile-widgets/qml/Export.qml b/mobile-widgets/qml/Export.qml
index 542f163af..c364ad209 100644
--- a/mobile-widgets/qml/Export.qml
+++ b/mobile-widgets/qml/Export.qml
@@ -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()
+ }
}
}
}