SendingForm.ui.qml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. import QtQuick 2.12
  2. import QtQuick.Controls 2.5
  3. import QtQuick.Dialogs 1.0
  4. Page {
  5. width: 1280
  6. height: 470
  7. font.capitalization: Font.MixedCase
  8. title: qsTr("Sending")
  9. Connections {
  10. target: _qmlHandler
  11. onSendingSetFileUrlText: {
  12. sendingSelectedFileText.text = signalText
  13. }
  14. onSendingEnableSendButton: {
  15. sendingSendFileButton.enabled = true
  16. }
  17. }
  18. Button {
  19. id: sendingClearFileButton
  20. x: 900
  21. y: 40
  22. width: 260
  23. height: 90
  24. text: qsTr("Clear Selection")
  25. font.pointSize: 16
  26. }
  27. Button {
  28. id: sendingSelectFileButton
  29. x: 120
  30. y: 40
  31. width: 260
  32. height: 90
  33. text: qsTr("Select File")
  34. font.pointSize: 16
  35. // @disable-check M223
  36. onClicked: {
  37. // @disable-check M222
  38. sendingFileDialog.open()
  39. }
  40. }
  41. Text {
  42. id: sendingSelectedFileText
  43. x: 54
  44. y: 186
  45. width: 1172
  46. height: 52
  47. color: "#ffffff"
  48. text: qsTr("Selected File: None")
  49. verticalAlignment: Text.AlignVCenter
  50. horizontalAlignment: Text.AlignHCenter
  51. font.pixelSize: 23
  52. }
  53. FileDialog {
  54. id: sendingFileDialog
  55. title: "Please choose a file"
  56. folder: shortcuts.home
  57. // @disable-check M223
  58. onAccepted: {
  59. // @disable-check M222
  60. _qmlHandler.onSendingSelectFileButton(sendingFileDialog.fileUrl)
  61. }
  62. }
  63. Button {
  64. id: sendingSendFileButton
  65. x: 510
  66. y: 304
  67. enabled: false
  68. width: 260
  69. height: 90
  70. text: qsTr("Send File")
  71. font.pointSize: 16
  72. // @disable-check M223
  73. onClicked: {
  74. // @disable-check M222
  75. _qmlHandler.onSendingSendFileButton()
  76. }
  77. }
  78. }