ServerFilesFileTemplateDeletePopup.ui.qml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import QtQuick 2.4
  2. import QtQuick.Controls 2.3
  3. import QtQuick.Layouts 1.3
  4. Popup {
  5. id: confirmDeletePopup
  6. height: 150
  7. dim: true
  8. clip: false
  9. width: 400
  10. modal: true
  11. focus: true
  12. closePolicy: Popup.NoAutoClose
  13. anchors.centerIn: Overlay.overlay
  14. Overlay.modal: Rectangle {
  15. color: "#b5c5c5c5"
  16. }
  17. ColumnLayout {
  18. anchors.fill: parent
  19. Text {
  20. id: confirmDeletePopupConfirmationText
  21. Layout.alignment: Qt.AlignCenter
  22. Layout.preferredHeight: 80
  23. Layout.preferredWidth: parent.width
  24. text: "Are you sure you want to delete this file from the Server?"
  25. verticalAlignment: Text.AlignTop
  26. horizontalAlignment: Text.AlignHCenter
  27. wrapMode: Text.WordWrap
  28. font.pointSize: 15
  29. }
  30. RowLayout {
  31. Layout.preferredHeight: 80
  32. Layout.preferredWidth: parent.width
  33. Button {
  34. id: confirmDeleteButton
  35. Layout.alignment: Qt.AlignCenter
  36. Layout.preferredWidth: 100
  37. text: qsTr("Delete")
  38. // @disable-check M223
  39. onClicked: {
  40. // @disable-check M222
  41. _qmlHandler.onServerFilesConfirmDeleteFileButton(
  42. fileNameText)
  43. }
  44. }
  45. Button {
  46. id: cancelDeleteButton
  47. Layout.alignment: Qt.AlignCenter
  48. Layout.preferredWidth: 100
  49. text: qsTr("Cancel")
  50. // @disable-check M222
  51. onClicked: confirmDeletePopup.close()
  52. }
  53. }
  54. }
  55. }