InvalidConfigPopup.ui.qml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. import QtQuick 2.4
  2. import QtQuick.Controls 2.3
  3. import QtQuick.Layouts 1.3
  4. import QtQuick.Dialogs 1.0
  5. Popup {
  6. id: popup
  7. height: 150
  8. dim: true
  9. clip: false
  10. width: 650
  11. modal: true
  12. focus: true
  13. closePolicy: Popup.NoAutoClose
  14. anchors.centerIn: Overlay.overlay
  15. Overlay.modal: Rectangle {
  16. color: "#b5c5c5c5"
  17. }
  18. Connections {
  19. target: _qmlHandler
  20. onInvalidConfigPopupClose: {
  21. popup.close()
  22. }
  23. onInvalidConfigPopupOpen: {
  24. popup.open()
  25. }
  26. }
  27. ColumnLayout {
  28. anchors.fill: parent
  29. Text {
  30. Layout.alignment: Qt.AlignCenter
  31. Layout.preferredWidth: parent.width
  32. Layout.preferredHeight: 50
  33. id: invalidConfigPopupText
  34. text: qsTr("Configuration file invalid!\nWarning: Creating the default config will overwrite your config file!")
  35. wrapMode: Text.WordWrap
  36. horizontalAlignment: Text.AlignHCenter
  37. verticalAlignment: Text.AlignVCenter
  38. font.pixelSize: 20
  39. }
  40. RowLayout {
  41. Layout.alignment: Qt.AlignCenter
  42. Layout.preferredWidth: parent.width
  43. Layout.preferredHeight: 50
  44. Button {
  45. Layout.alignment: Qt.AlignCenter
  46. Layout.preferredHeight: parent.height
  47. Layout.preferredWidth: 200
  48. id: invalidConfigPopupQuitButton
  49. text: qsTr("Quit")
  50. font.pointSize: 16
  51. // @disable-check M223
  52. onClicked: {
  53. // @disable-check M222
  54. _qmlHandler.onInvalidConfigPopupQuitButton()
  55. }
  56. }
  57. Button {
  58. Layout.alignment: Qt.AlignCenter
  59. Layout.preferredHeight: parent.height
  60. Layout.preferredWidth: 200
  61. id: invalidCliPathPopupContinueButton
  62. text: qsTr("Create Default")
  63. font.pointSize: 16
  64. // @disable-check M223
  65. onClicked: {
  66. // @disable-check M222
  67. _qmlHandler.onInvalidConfigPopupCreateDefaultButton()
  68. popup.close()
  69. }
  70. }
  71. }
  72. }
  73. }