ReceivingForm.ui.qml 1.7 KB

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