123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- import QtQuick 2.4
- import QtQuick.Controls 2.3
- import QtQuick.Layouts 1.3
- import QtQuick.Dialogs 1.0
- Popup {
- id: popup
- height: 200
- dim: true
- clip: false
- width: 800
- modal: true
- focus: true
- closePolicy: Popup.NoAutoClose
- anchors.centerIn: Overlay.overlay
- Connections {
- target: _qmlHandler
- onInvalidCliPathPopupClose: {
- popup.close()
- }
- onInvalidCliPathPopupOpen: {
- popup.open()
- }
- }
- ColumnLayout {
- anchors.fill: parent
- Text {
- Layout.alignment: Qt.AlignCenter
- Layout.preferredWidth: parent.width
- Layout.preferredHeight: 50
- id: invalidCliPathPopupText
- color: "#ffffff"
- text: qsTr("Invalid CLI-Path: CLI could not be found on the location specified in the config file.\nPlease specify the new location of the CLI:")
- wrapMode: Text.WordWrap
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: 20
- }
- RowLayout {
- Layout.alignment: Qt.AlignCenter
- Layout.preferredWidth: parent.width
- Layout.preferredHeight: 50
- Text {
- Layout.alignment: Qt.AlignCenter
- Layout.preferredHeight: parent.height
- Layout.preferredWidth: 600
- id: invalidCliPathPopupCliPath
- color: "#ffffff"
- text: qsTr("Select CLI Path >>>")
- horizontalAlignment: Text.AlignLeft
- font.italic: true
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: 20
- }
- Button {
- Layout.alignment: Qt.AlignLeft
- Layout.preferredHeight: parent.height
- Layout.preferredWidth: 150
- id: invalicCliPathPopupSelectCliButton
- height: 50
- text: qsTr("Select CLI")
- font.pointSize: 16
- // @disable-check M223
- onClicked: {
- // @disable-check M222
- invalidCliPathPopupDialog.open()
- }
- }
- }
- RowLayout {
- Layout.alignment: Qt.AlignCenter
- Layout.preferredWidth: parent.width
- Layout.preferredHeight: 50
- Button {
- Layout.alignment: Qt.AlignCenter
- Layout.preferredHeight: parent.height
- Layout.preferredWidth: 200
- id: invalidCliPathPopupQuitButton
- text: qsTr("Quit")
- font.pointSize: 16
- // @disable-check M223
- onClicked: {
- // @disable-check M222
- _qmlHandler.onInvalidCliPathPopupQuitButton()
- }
- }
- Button {
- Layout.alignment: Qt.AlignCenter
- Layout.preferredHeight: parent.height
- Layout.preferredWidth: 200
- id: invalidCliPathPopupContinueButton
- text: qsTr("Continue")
- enabled: invalidCliPathPopupText.text == "Select CLI Path >>>" ? false : true
- font.pointSize: 16
- // @disable-check M223
- onClicked: {
- // @disable-check M222
- _qmlHandler.onInvalidCliPathPopupContinueButton(
- invalidCliPathPopupCliPath.text)
- popup.close()
- }
- }
- }
- }
- FileDialog {
- id: invalidCliPathPopupDialog
- nameFilters: ["CLI file (ccats-cli)"]
- title: "Please select the CLI File"
- folder: shortcuts.home
- // @disable-check M223
- onAccepted: {
- // @disable-check M222
- var path = invalidCliPathPopupDialog.fileUrl.toString()
- path = path.replace(/^(file:\/{2})/,"");
- invalidCliPathPopupCliPath.text = path
- }
- }
- }
|