From 093813698cf716e845e2ab3a9e6e6584206d18e8 Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Tue, 19 Nov 2019 12:29:32 +0100 Subject: 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 --- mobile-widgets/qml/Export.qml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'mobile-widgets/qml') 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() + } } } } -- cgit v1.2.3-70-g09d2