54 property int animDuration: 150
72 property var _clearItems: []
86 function presentItem(item) {
87 if(typeof item.presentAsRoot ==
"boolean" && item.presentAsRoot) {
88 if(safeReplace(null, item))
109 function closeAction() {
110 if(_presenterStack.currentItem &&
111 typeof _presenterStack.currentItem.closeAction ==
"function") {
112 if(_presenterStack.currentItem.closeAction())
116 if(_presenterStack.safePop())
134 function safePop(item, operation) {
135 var resItem = pop(item, operation)
137 _clearItems.push(resItem);
157 function safeReplace(target, item, properties, operation) {
159 for(var i = depth -1; i >= 0; i--) {
160 var cItem =
get(i, StackView.ForceLoad);
161 _clearItems.push(cItem);
165 if(replace(target, item, properties, operation))
172 function clearWaitingItems() {
173 _clearItems.forEach(
function(item) {
174 if(typeof item.afterPop ==
"function")
181 pushEnter: Transition {
184 easing.type: Easing.InOutQuad
187 duration: _presenterStack.animDuration
193 duration: _presenterStack.opDuration
196 pushExit: Transition {
198 duration: _presenterStack.animDuration
203 Qt.callLater(clearWaitingItems)
206 popEnter: Transition {
208 duration: _presenterStack.animDuration
211 popExit: Transition {
214 easing.type: Easing.InOutQuad
217 duration: _presenterStack.animDuration
219 SequentialAnimation {
221 duration: _presenterStack.animDuration - _presenterStack.opDuration
228 duration: _presenterStack.opDuration
234 Qt.callLater(clearWaitingItems)
237 replaceEnter: pushEnter
238 replaceExit: pushExit
int opDuration
The duration of the fade out.