SmartLockerTools/Analyser/qml/OperationItem.qml

70 lines
1.8 KiB
QML
Raw Normal View History

2024-08-07 11:45:13 +08:00
import QtCore
2024-06-13 15:41:40 +08:00
import QtQuick
import QtQuick.Controls
2024-08-07 11:45:13 +08:00
import QtQuick.Dialogs
2024-06-13 15:41:40 +08:00
import QtQuick.Layouts
import Analyser
2024-08-08 17:05:32 +08:00
Item {
id: root
ColumnLayout {
anchors.fill: parent
ConnectionItem {}
2024-08-16 11:34:21 +08:00
Column {
Text{
width: 50
text: "烧录版本: "+ (App.module!==null? App.module.verison:"")
}
Text{
width: 50
text: "OTA版本: "+(App.module!==null?App.module.otaVerison:"")
}
}
2024-09-25 18:44:04 +08:00
TabBar {
id: operationBar
Layout.fillWidth: true
TabButton {
text: "注册/识别"
}
TabButton {
text: "删除/其它"
2024-07-31 16:08:38 +08:00
}
2024-06-13 15:41:40 +08:00
}
2024-09-25 18:44:04 +08:00
StackLayout {
currentIndex: operationBar.currentIndex
EnrollVerifyOperations {
enabled: App.connected
}
ExtendedOperations {
}
}
2024-06-13 15:41:40 +08:00
}
2024-08-07 11:45:13 +08:00
FileDialog {
id: fileDialog
nameFilters: ["图片 (*.jpg *.yuv)"]
currentFolder: StandardPaths.standardLocations(
StandardPaths.DesktopLocation)[0]
onAccepted: {
var fileUrl = fileDialog.selectedFile.toString()
var localFilePath = fileUrl.startsWith(
"file:///") ? fileUrl.substring(8) : fileUrl
imagePath.text = localFilePath
}
}
2024-08-05 17:42:27 +08:00
Loader {
id: loader
source: "OtaPage.qml"
active: false
onLoaded: {
if (loader.item && loader.item.open) {
2024-08-07 11:45:13 +08:00
loader.item.open()
loader.item.onClose = () => {
loader.active = false
2024-08-05 17:42:27 +08:00
}
}
}
}
2024-06-13 15:41:40 +08:00
}