Add saveFileAs() && init setting page.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Controls.Material 2.2
|
||||
import QtQuick.Dialogs 1.2
|
||||
|
||||
Item {
|
||||
property bool openOnFinished: false
|
||||
@@ -14,9 +15,22 @@ Item {
|
||||
opacity: 0.4
|
||||
}
|
||||
|
||||
FileDialog {
|
||||
id: locationDialog
|
||||
title: "Please choose a location"
|
||||
folder: shortcuts.home
|
||||
selectFolder: true
|
||||
|
||||
onAccepted: currentRoom.downloadFile(eventId, folder + "/" + currentRoom.fileNameToDownload(eventId))
|
||||
|
||||
}
|
||||
|
||||
onDownloadedChanged: {
|
||||
if (downloaded && openOnFinished)
|
||||
openSavedFile()
|
||||
if (downloaded && openOnFinished) openSavedFile()
|
||||
}
|
||||
|
||||
function saveFileAs() {
|
||||
locationDialog.open()
|
||||
}
|
||||
|
||||
function downloadAndOpen()
|
||||
|
||||
Reference in New Issue
Block a user