added PageLoader and pageController
This commit is contained in:
parent
116fa6777b
commit
03a0e2084a
27 changed files with 265 additions and 193 deletions
|
|
@ -3,5 +3,35 @@ import QtQuick.Controls
|
|||
|
||||
StackView {
|
||||
id: stackView
|
||||
initialItem: "PageSetupWizardStart"
|
||||
|
||||
function gotoPage(page, slide) {
|
||||
if (slide) {
|
||||
stackView.push(PageController.getPagePath(page), {}, StackView.PushTransition)
|
||||
} else {
|
||||
stackView.push(PageController.getPagePath(page), {}, StackView.Immediate)
|
||||
}
|
||||
}
|
||||
|
||||
function closePage() {
|
||||
if (stackView.depth <= 1) {
|
||||
return
|
||||
}
|
||||
|
||||
stackView.pop()
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: PageController
|
||||
function onGoToPage(page, slide) {
|
||||
stackView.gotoPage(page, slide)
|
||||
}
|
||||
|
||||
function onClosePage() {
|
||||
stackView.closePage()
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
PageController.setStartPage()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue