1.实现掌静脉注册时保存图片的实现。

This commit is contained in:
luocai
2024-07-15 17:47:19 +08:00
parent e588d4abdf
commit 59281e3a75
10 changed files with 197 additions and 49 deletions

View File

@ -31,13 +31,40 @@ ColumnLayout {
implicitWidth: 100
text: "10"
}
Text {
text: qsTr("持久化")
}
Switch {
id: persistence
checked: true
}
Text {
text: qsTr("保存图片")
}
Switch {
id: extendedMode
}
Button {
text: !App.module ? "注册" : App.module.currentMessageId
=== 0x1d ? "取消" : "注册"
onClicked: App.module.currentMessageId
=== 0x1d ? App.module.reset() : App.enroll(
enrollName.text,
parseInt(enrollTimeout.text))
property bool enrolling: App.module ? (App.module.currentMessageId === 0x1d)
|| (App.module.currentMessageId
=== 0x1e) : false
text: enrolling ? "取消" : "注册"
onClicked: {
if (enrolling) {
App.module.reset()
} else if (extendedMode.checked) {
App.enrollExtended(enrollName.text,
persistence.checked,
parseInt(enrollTimeout.text))
} else {
App.enroll(enrollName.text,
persistence.checked,
parseInt(enrollTimeout.text))
}
}
}
}
}
@ -108,10 +135,6 @@ ColumnLayout {
title: "图片注册"
GridLayout {
columns: 1
Button {
text: "录入图片上报"
onClicked: App.getEnrolledImage("", 60)
}
Button {
text: "图片下发注册"
onClicked: App.uploadImage()
@ -126,6 +149,10 @@ ColumnLayout {
text: "状态查询"
onClicked: App.module.requestCurrentStatus()
}
Button {
text: "ID查询"
onClicked: App.module.requestUniqueId()
}
}
}
}