InvalidConfigPopup.ui.qml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. Connections {
  16. target: _qmlHandler
  17. onInvalidConfigPopupClose: {
  18. popup.close()
  19. }
  20. onInvalidConfigPopupOpen: {
  21. popup.open()
  22. }
  23. }
  24. ColumnLayout {
  25. anchors.fill: parent
  26. Text {
  27. Layout.alignment: Qt.AlignCenter
  28. Layout.preferredWidth: parent.width
  29. Layout.preferredHeight: 50
  30. id: invalidConfigPopupText
  31. color: "#ffffff"
  32. text: qsTr("Configuration file invalid!\nWarning: Creating the default config will overwrite your config file!")
  33. wrapMode: Text.WordWrap
  34. horizontalAlignment: Text.AlignHCenter
  35. verticalAlignment: Text.AlignVCenter
  36. font.pixelSize: 20
  37. }
  38. RowLayout {
  39. Layout.alignment: Qt.AlignCenter
  40. Layout.preferredWidth: parent.width
  41. Layout.preferredHeight: 50
  42. Button {
  43. Layout.alignment: Qt.AlignCenter
  44. Layout.preferredHeight: parent.height
  45. Layout.preferredWidth: 200
  46. id: invalidConfigPopupQuitButton
  47. text: qsTr("Quit")
  48. font.pointSize: 16
  49. // @disable-check M223
  50. onClicked: {
  51. // @disable-check M222
  52. _qmlHandler.onInvalidConfigPopupQuitButton()
  53. }
  54. }
  55. Button {
  56. Layout.alignment: Qt.AlignCenter
  57. Layout.preferredHeight: parent.height
  58. Layout.preferredWidth: 200
  59. id: invalidCliPathPopupContinueButton
  60. text: qsTr("Create Default")
  61. font.pointSize: 16
  62. // @disable-check M223
  63. onClicked: {
  64. // @disable-check M222
  65. _qmlHandler.onInvalidConfigPopupCreateDefaultButton()
  66. popup.close()
  67. }
  68. }
  69. }
  70. }
  71. }