|
@@ -11,56 +11,51 @@ Page {
|
|
|
Connections {
|
|
|
target: _qmlHandler
|
|
|
onReceivingListFile: {
|
|
|
- receivingFileList.append(fileName)
|
|
|
- receivingFlickable.contentY = receivingFileList.height - receivingFlickable.height
|
|
|
+ fileList.append({"fileName" : fileName,
|
|
|
+ "fileSize" : "42 kb",
|
|
|
+ "fileDecryptable" : "Decryptable?: Yes",
|
|
|
+ "fileExistsLocally" : existsLocally})
|
|
|
}
|
|
|
|
|
|
onReceivingClearFileList: {
|
|
|
- receivingFileList.text = ""
|
|
|
+ fileList.clear()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
ColumnLayout {
|
|
|
anchors.fill: parent
|
|
|
|
|
|
- Flickable {
|
|
|
- id: receivingFlickable
|
|
|
- flickableDirection: Flickable.VerticalFlick
|
|
|
- Layout.preferredHeight: 400
|
|
|
+ ScrollView {
|
|
|
Layout.preferredWidth: parent.width
|
|
|
+ Layout.preferredHeight: 400
|
|
|
|
|
|
- TextArea.flickable: TextArea {
|
|
|
- selectByMouse: true
|
|
|
- readOnly: true
|
|
|
- id: receivingFileList
|
|
|
- wrapMode: TextArea.Wrap
|
|
|
- text: qsTr("")
|
|
|
- font.pointSize: 15
|
|
|
- }
|
|
|
+ ListView {
|
|
|
+ anchors.fill: parent
|
|
|
+ model: fileList
|
|
|
+ clip: true
|
|
|
|
|
|
- ScrollBar.vertical: ScrollBar {
|
|
|
+ delegate: ReceivingFileTemplate {
|
|
|
+ fileNameText: fileName
|
|
|
+ fileSizeText: fileSize
|
|
|
+ fileDecryptableText: fileDecryptable
|
|
|
+ fileExists: fileExistsLocally
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ ListModel {
|
|
|
+ id: fileList
|
|
|
+ }
|
|
|
+
|
|
|
RowLayout {
|
|
|
Layout.preferredWidth: parent.width
|
|
|
Layout.preferredHeight: 70
|
|
|
|
|
|
- TextField {
|
|
|
- id: receivingFileNameField
|
|
|
- selectByMouse: true
|
|
|
- Layout.preferredWidth: 880
|
|
|
- Layout.preferredHeight: parent.height
|
|
|
- placeholderText: "Enter File Name to download..."
|
|
|
- text: qsTr("")
|
|
|
- font.pixelSize: 20
|
|
|
- }
|
|
|
-
|
|
|
Button {
|
|
|
id: receivingListFilesButton
|
|
|
Layout.preferredWidth: 180
|
|
|
Layout.preferredHeight: parent.height
|
|
|
- text: qsTr("List Files")
|
|
|
+ text: qsTr("Refresh File List")
|
|
|
|
|
|
// @disable-check M223
|
|
|
onClicked: {
|
|
@@ -68,26 +63,6 @@ Page {
|
|
|
_qmlHandler.onReceivingListFilesButton()
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- Button {
|
|
|
- id: receivingGetFileButton
|
|
|
- Layout.preferredWidth: 180
|
|
|
- Layout.preferredHeight: parent.height
|
|
|
- text: qsTr("Download")
|
|
|
-
|
|
|
- enabled: receivingFileNameField.text != ""
|
|
|
-
|
|
|
- // @disable-check M223
|
|
|
- onClicked: {
|
|
|
- // @disable-check M223
|
|
|
- if (receivingFileNameField.text != "") {
|
|
|
- // @disable-check M222
|
|
|
- _qmlHandler.onReceivingGetFileButton(
|
|
|
- receivingFileNameField.text)
|
|
|
- receivingFileNameField.text = ""
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
}
|