2022-05-10 20:10:34 +00:00
|
|
|
import QtQml
|
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls
|
|
|
|
|
|
|
|
import Status.Application
|
|
|
|
import Status.Onboarding
|
|
|
|
|
2022-05-31 21:26:41 +00:00
|
|
|
import Status.Controls.Navigation
|
|
|
|
|
|
|
|
/*! Has entry responsibility for the main workflows
|
|
|
|
*/
|
2022-05-10 20:10:34 +00:00
|
|
|
Item {
|
|
|
|
id: root
|
|
|
|
|
2022-05-31 21:26:41 +00:00
|
|
|
required property ApplicationState appState
|
|
|
|
required property ApplicationController appController
|
|
|
|
|
2022-05-10 20:10:34 +00:00
|
|
|
implicitWidth: d.isViewLoaded ? d.loadedView.implicitWidth : 800
|
|
|
|
implicitHeight: d.isViewLoaded ? d.loadedView.implicitHeight : 600
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
id: d
|
|
|
|
|
|
|
|
readonly property bool isViewLoaded: contentLoader.status === Loader.Ready
|
|
|
|
readonly property Item loadedView: isViewLoaded ? contentLoader.item : null
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: onboardingViewComponent
|
|
|
|
|
|
|
|
OnboardingView {
|
2022-07-15 07:30:16 +00:00
|
|
|
onUserLoggedIn: function (statusAccount) {
|
2022-05-10 20:10:34 +00:00
|
|
|
splashScreenPopup.open()
|
2022-07-15 07:30:16 +00:00
|
|
|
//appController.statusAccount = statusAccount
|
2022-05-10 20:10:34 +00:00
|
|
|
contentLoader.sourceComponent = mainViewComponent
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: mainViewComponent
|
|
|
|
|
|
|
|
MainView {
|
|
|
|
onReady: splashScreenPopup.close()
|
2022-05-31 21:26:41 +00:00
|
|
|
appController: root.appController
|
2022-05-10 20:10:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Popup {
|
|
|
|
id: splashScreenPopup
|
|
|
|
|
|
|
|
onAboutToShow: splashScreenLoader.active = true
|
|
|
|
onClosed: splashScreenLoader.active = false
|
|
|
|
anchors.centerIn: Overlay.overlay
|
|
|
|
|
|
|
|
Loader {
|
|
|
|
id: splashScreenLoader
|
|
|
|
active: false
|
|
|
|
sourceComponent: SplashScreen {
|
|
|
|
id: splasScreen
|
|
|
|
onAnimationFinished: splashScreenPopup.close()
|
|
|
|
}
|
|
|
|
onStatusChanged: if(status === Loader.Ready) item.show()
|
|
|
|
}
|
|
|
|
background: Item {}
|
|
|
|
}
|
|
|
|
|
|
|
|
Loader {
|
|
|
|
id: contentLoader
|
|
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
sourceComponent: onboardingViewComponent
|
|
|
|
}
|
|
|
|
}
|