118 lines
2.9 KiB
QML
118 lines
2.9 KiB
QML
|
import QtQuick
|
||
|
import QtQuick.Controls
|
||
|
import AntiClipSettings
|
||
|
|
||
|
Popup {
|
||
|
id: root
|
||
|
parent: Overlay.overlay
|
||
|
anchors.centerIn: Overlay.overlay
|
||
|
|
||
|
Rectangle {
|
||
|
width: parent.width
|
||
|
height: parent.height
|
||
|
color: "white"
|
||
|
border.color: "lightgray"
|
||
|
radius: 10
|
||
|
|
||
|
Column {
|
||
|
anchors.centerIn: parent
|
||
|
spacing: 10
|
||
|
padding: 20
|
||
|
|
||
|
Row {
|
||
|
spacing: 10
|
||
|
|
||
|
Text {
|
||
|
text: "模式"
|
||
|
font.pointSize: 14
|
||
|
width: 100
|
||
|
}
|
||
|
|
||
|
RadioButton {
|
||
|
id: dhcpMode
|
||
|
text: "DHCP"
|
||
|
checked: App.currentNetworkInfomation.dhcp
|
||
|
}
|
||
|
|
||
|
RadioButton {
|
||
|
id: staticMode
|
||
|
text: "静态IP"
|
||
|
checked: !App.currentNetworkInfomation.dhcp
|
||
|
}
|
||
|
}
|
||
|
|
||
|
Row {
|
||
|
spacing: 5
|
||
|
|
||
|
Text {
|
||
|
text: "设备IP"
|
||
|
font.pointSize: 14
|
||
|
width: 100
|
||
|
}
|
||
|
|
||
|
TextField {
|
||
|
id: ipInput
|
||
|
width: 350
|
||
|
height: 30
|
||
|
text: App.currentNetworkInfomation.ip
|
||
|
}
|
||
|
}
|
||
|
|
||
|
Row {
|
||
|
spacing: 5
|
||
|
Text {
|
||
|
width: 100
|
||
|
text: "子网掩码"
|
||
|
font.pointSize: 14
|
||
|
}
|
||
|
|
||
|
TextField {
|
||
|
id: netmaskInput
|
||
|
width: 350
|
||
|
height: 30
|
||
|
text: App.currentNetworkInfomation.netmask
|
||
|
}
|
||
|
}
|
||
|
|
||
|
Row {
|
||
|
spacing: 5
|
||
|
|
||
|
Row {
|
||
|
spacing: 5
|
||
|
|
||
|
Text {
|
||
|
text: "设备网关"
|
||
|
font.pointSize: 14
|
||
|
width: 100
|
||
|
}
|
||
|
}
|
||
|
|
||
|
TextField {
|
||
|
id: gatewayInput
|
||
|
width: 350
|
||
|
height: 30
|
||
|
text: App.currentNetworkInfomation.gateway
|
||
|
}
|
||
|
}
|
||
|
|
||
|
Row {
|
||
|
spacing: 20
|
||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||
|
|
||
|
Button {
|
||
|
text: "保存"
|
||
|
onClicked: {
|
||
|
App.updateNetworkInfomation(dhcpMode.checked,ipInput.text,netmaskInput.text,gatewayInput.text);
|
||
|
networkPopup.close()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
Button {
|
||
|
text: "取消"
|
||
|
onClicked: root.close()
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|