Index: sources/gui/qml/components/StackItem.qml =================================================================== diff -u -r07e0c7bd409782cab96a4ae761ee3f819bdb8639 -r2d2917978a4e25eb79a0fb71851b6124171d8072 --- sources/gui/qml/components/StackItem.qml (.../StackItem.qml) (revision 07e0c7bd409782cab96a4ae761ee3f819bdb8639) +++ sources/gui/qml/components/StackItem.qml (.../StackItem.qml) (revision 2d2917978a4e25eb79a0fb71851b6124171d8072) @@ -30,12 +30,20 @@ width : Variables.applicationWidth height: Variables.applicationHeight + /*! + * \brief prints out the list of the items in the stack by their index position in the stack. + */ function info() { for( var i = 0; i < _stackView.depth; i++ ) { console.debug("index:", i, _stackView.get(i)) } } + /*! + * \brief page function gets the screen vScreen and tries to find the screen in the stack. + * if the page found will pop the items on stack down to that screen. + * otherwise adds that screen on top of the stack + */ function page(vScreen) { if (stackView.find(function(screen) { return screen === vScreen; @@ -48,11 +56,17 @@ info() } + /*! + * \brief pops the screen vScreen from the top of the stack + */ function pop (vScreen) { _stackView.pop(vScreen) info() } + /*! + * \brief pushes the screen vScreen on the top of the stack + */ function push (vScreen) { if ( _stackView.currentItem === vScreen) { console.debug("same current screen didn't push" , vScreen.name) @@ -63,6 +77,12 @@ info() } + /*! + * \brief replaces the current item of the stack (top) with the vScreen, if the vReplaces hasn't been passed + * otherwise will replace the screen vScreen with the screen vReplaced. + * \note it doens't check if the screen vReplaced exists in the stack, + * and it needs to be in the stack to be replaced. + */ function replace(vScreen, vReplaced) { if (vReplaced === undefined) { _stackView.replace(_stackView.currentItem, vScreen)