ReceivingForm.ui.qml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. import QtQuick 2.12
  2. import QtQuick.Controls 2.5
  3. import QtQuick.Layouts 1.3
  4. Page {
  5. width: 1280
  6. height: 470
  7. id: receivingForm
  8. font.capitalization: Font.MixedCase
  9. Connections {
  10. target: _qmlHandler
  11. onReceivingListFile: {
  12. fileList.append({"fileName" : fileName,
  13. "fileSize" : "42 kb",
  14. "fileDecryptable" : "Decryptable?: Yes",
  15. "fileExistsLocally" : existsLocally})
  16. }
  17. onReceivingClearFileList: {
  18. fileList.clear()
  19. }
  20. }
  21. ColumnLayout {
  22. anchors.fill: parent
  23. ScrollView {
  24. Layout.preferredWidth: parent.width
  25. Layout.preferredHeight: 400
  26. ListView {
  27. anchors.fill: parent
  28. model: fileList
  29. clip: true
  30. delegate: ReceivingFileTemplate {
  31. fileNameText: fileName
  32. fileSizeText: fileSize
  33. fileDecryptableText: fileDecryptable
  34. fileExists: fileExistsLocally
  35. }
  36. }
  37. }
  38. ListModel {
  39. id: fileList
  40. }
  41. RowLayout {
  42. Layout.preferredWidth: parent.width
  43. Layout.preferredHeight: 70
  44. Button {
  45. id: receivingListFilesButton
  46. Layout.preferredWidth: 180
  47. Layout.preferredHeight: parent.height
  48. text: qsTr("Refresh File List")
  49. // @disable-check M223
  50. onClicked: {
  51. // @disable-check M223
  52. _qmlHandler.onReceivingListFilesButton()
  53. }
  54. }
  55. }
  56. }
  57. }