31 lines
621 B
QML
31 lines
621 B
QML
import QtQuick
|
|
import QtQuick.Controls.Material
|
|
import QtQuick.Layouts
|
|
import EVChargerApp
|
|
|
|
AnimatedStackView {
|
|
id: stackView
|
|
|
|
function backPressed() {
|
|
if (stackView.currentItem.backPressed())
|
|
return true
|
|
if (depth > 1) {
|
|
pop()
|
|
return true
|
|
}
|
|
return false
|
|
}
|
|
|
|
initialItem: DeviceListScreen {
|
|
onDeviceSelected: (url, password) => stackView.push(deviceScreenComponent, { url, password })
|
|
}
|
|
|
|
Component {
|
|
id: deviceScreenComponent
|
|
|
|
DeviceScreen {
|
|
onCloseRequested: stackView.pop()
|
|
}
|
|
}
|
|
}
|