2024-07-06 00:01:03 +02:00
|
|
|
import QtQuick
|
|
|
|
|
import QtQuick.Controls.Material
|
|
|
|
|
import QtQuick.Layouts
|
|
|
|
|
import EVChargerApp
|
|
|
|
|
|
2024-07-12 22:21:41 +02:00
|
|
|
AnimatedStackView {
|
|
|
|
|
id: stackView
|
2024-07-06 00:01:03 +02:00
|
|
|
|
|
|
|
|
function backPressed() {
|
2024-07-12 22:21:41 +02:00
|
|
|
if (stackView.currentItem.backPressed())
|
|
|
|
|
return true
|
|
|
|
|
if (depth > 1) {
|
|
|
|
|
pop()
|
|
|
|
|
return true
|
2024-07-06 00:01:03 +02:00
|
|
|
}
|
2024-07-12 22:21:41 +02:00
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
initialItem: DeviceListScreen {
|
2024-07-18 19:08:01 +02:00
|
|
|
id: deviceListScreen
|
2024-07-12 22:21:41 +02:00
|
|
|
onDeviceSelected: (url, password) => stackView.push(deviceScreenComponent, { url, password })
|
2024-07-06 00:01:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Component {
|
2024-07-12 22:21:41 +02:00
|
|
|
id: deviceScreenComponent
|
2024-07-06 00:01:03 +02:00
|
|
|
|
|
|
|
|
DeviceScreen {
|
2024-07-18 19:08:01 +02:00
|
|
|
onCloseRequested: stackView.pop(deviceListScreen)
|
2024-07-06 00:01:03 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|