SendingForm.ui.qml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. onSendingDisableSendButton: {
  18. sendingSendFileButton.enabled = false
  19. }
  20. }
  21. Button {
  22. id: sendingClearFileButton
  23. x: 900
  24. y: 40
  25. width: 260
  26. height: 90
  27. text: qsTr("Clear Selection")
  28. enabled: sendingSendFileButton.enabled
  29. font.pointSize: 16
  30. // @disable-check M223
  31. onClicked: {
  32. // @disable-check M222
  33. _qmlHandler.onSendingClearSelectionButton()
  34. }
  35. }
  36. Button {
  37. id: sendingSelectFileButton
  38. x: 120
  39. y: 40
  40. width: 260
  41. height: 90
  42. text: qsTr("Select File")
  43. font.pointSize: 16
  44. // @disable-check M223
  45. onClicked: {
  46. // @disable-check M222
  47. sendingFileDialog.open()
  48. }
  49. }
  50. Text {
  51. id: sendingSelectedFileText
  52. x: 54
  53. y: 186
  54. width: 1172
  55. height: 52
  56. color: "#ffffff"
  57. text: qsTr("Selected File: None")
  58. verticalAlignment: Text.AlignVCenter
  59. horizontalAlignment: Text.AlignHCenter
  60. font.pixelSize: 23
  61. }
  62. FileDialog {
  63. id: sendingFileDialog
  64. title: "Please choose a file"
  65. folder: shortcuts.home
  66. // @disable-check M223
  67. onAccepted: {
  68. // @disable-check M222
  69. _qmlHandler.onSendingSelectFileButton(sendingFileDialog.fileUrl)
  70. }
  71. }
  72. Button {
  73. id: sendingSendFileButton
  74. x: 510
  75. y: 304
  76. enabled: false
  77. width: 260
  78. height: 90
  79. text: qsTr("Send File")
  80. font.pointSize: 16
  81. // @disable-check M223
  82. onClicked: {
  83. // @disable-check M222
  84. _qmlHandler.onSendingSendFileButton()
  85. }
  86. }
  87. }