12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- import QtQuick 2.4
- import QtQuick.Controls 2.3
- import QtQuick.Layouts 1.3
- Popup {
- id: popup
- height: 200
- dim: true
- clip: false
- width: 400
- modal: true
- focus: true
- closePolicy: Popup.NoAutoClose
- ColumnLayout {
- anchors.fill: parent
- Text {
- Layout.alignment: Qt.AlignCenter
- id: popupText
- color: "#ffffff"
- text: qsTr("Enter the IP to connect:")
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: 20
- }
- TextField {
- Layout.alignment: Qt.AlignCenter
- id: popupIpInput
- text: qsTr("")
- placeholderText: "Enter IP"
- horizontalAlignment: Text.AlignHCenter
- validator: RegExpValidator {
- regExp: /^(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))$/
- }
- }
- Text {
- id: popupStatusText
- color: "#df3f3f"
- text: qsTr("Text field for status")
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- Layout.alignment: Qt.AlignCenter
- font.pixelSize: 20
- }
- Button {
- Layout.alignment: Qt.AlignCenter
- id: popupConnectButton
- text: qsTr("Connect")
- enabled: popupIpInput.acceptableInput
- font.pointSize: 16
- // @disable-check M223
- onClicked: {
- // @disable-check M222
- _qmlHandler.onIpPopupEnterIp(popupIpInput.text)
- // @disable-check M222
- popup.close()
- }
- }
- }
- }
|