2024-06-13 15:41:40 +08:00
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls
|
|
|
|
import QtQuick.Layouts
|
|
|
|
import Analyser
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
ConnectionItem {}
|
|
|
|
|
|
|
|
GroupBox {
|
|
|
|
title: "命令"
|
|
|
|
Layout.columnSpan: 2
|
|
|
|
enabled: App.connected
|
|
|
|
GridLayout {
|
|
|
|
columns: 2
|
|
|
|
GroupBox {
|
|
|
|
title: "注册用户"
|
|
|
|
GridLayout {
|
|
|
|
columns: 2
|
|
|
|
Text {
|
|
|
|
text: qsTr("用户姓名")
|
|
|
|
}
|
|
|
|
TextField {
|
|
|
|
id: enrollName
|
|
|
|
implicitWidth: 100
|
|
|
|
}
|
|
|
|
Text {
|
|
|
|
text: qsTr("超时时间")
|
|
|
|
}
|
|
|
|
TextField {
|
|
|
|
id: enrollTimeout
|
|
|
|
implicitWidth: 100
|
|
|
|
text: "10"
|
|
|
|
}
|
|
|
|
Button {
|
|
|
|
text: "注册"
|
|
|
|
onClicked: App.enroll(enrollName.text,
|
|
|
|
parseInt(enrollTimeout.text))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
GroupBox {
|
|
|
|
title: "识别用户"
|
|
|
|
GridLayout {
|
|
|
|
columns: 2
|
|
|
|
Text {
|
|
|
|
text: qsTr("超时时间(s)")
|
|
|
|
}
|
|
|
|
TextField {
|
|
|
|
id: verifyTimeout
|
|
|
|
implicitWidth: 80
|
|
|
|
text: "10"
|
|
|
|
}
|
|
|
|
Text {
|
|
|
|
text: qsTr("持续识别")
|
|
|
|
}
|
|
|
|
Switch {
|
|
|
|
checked: App.persistenceMode
|
|
|
|
onToggled: App.persistenceMode = !App.persistenceMode
|
|
|
|
}
|
|
|
|
Text {
|
|
|
|
text: qsTr("识别间隔(s)")
|
|
|
|
}
|
|
|
|
TextField {
|
|
|
|
id: verifyIntetval
|
|
|
|
implicitWidth: 80
|
|
|
|
text: App.persistenceVerifyInterval
|
|
|
|
}
|
|
|
|
Item {}
|
|
|
|
Button {
|
|
|
|
text: App.isVerifying?"停止": "识别"
|
|
|
|
onClicked: {
|
|
|
|
if(App.isVerifying){
|
|
|
|
App.module.reset()
|
|
|
|
}else {
|
|
|
|
App.persistenceVerifyInterval = parseInt(
|
|
|
|
verifyIntetval.text)
|
|
|
|
App.verify(parseInt(verifyTimeout.text))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
GroupBox {
|
|
|
|
title: "删除用户"
|
|
|
|
GridLayout {
|
|
|
|
columns: 2
|
|
|
|
Text {
|
|
|
|
text: qsTr("用户ID")
|
|
|
|
}
|
|
|
|
TextField {
|
|
|
|
id: deleteUserId
|
|
|
|
implicitWidth: 100
|
|
|
|
}
|
|
|
|
Button {
|
|
|
|
text: "删除"
|
|
|
|
onClicked: App.deleteUser(parseInt(deleteUserId.text))
|
|
|
|
}
|
|
|
|
Button {
|
|
|
|
text: "删除所有"
|
|
|
|
onClicked: App.deleteAll()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-06-19 16:02:58 +08:00
|
|
|
GroupBox {
|
|
|
|
title: "图片注册"
|
|
|
|
GridLayout {
|
|
|
|
columns: 1
|
|
|
|
Button {
|
|
|
|
text: "录入图片上报"
|
|
|
|
onClicked: App.getEnrolledImage("",60)
|
|
|
|
}
|
|
|
|
Button {
|
|
|
|
text: "图片下发注册"
|
2024-06-20 21:28:30 +08:00
|
|
|
onClicked: App.uploadImage()
|
2024-06-19 16:02:58 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-06-13 15:41:40 +08:00
|
|
|
Button {
|
|
|
|
text: "复位"
|
|
|
|
onClicked: App.module.reset()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|