added basic usi for music player. No model yet.
This commit is contained in:
parent
bf145a9be9
commit
ef018332b9
9 changed files with 57 additions and 2 deletions
|
|
@ -33,6 +33,12 @@ bool NavigationListModel::isBackVisible()
|
|||
return mIsBackVisible;
|
||||
}
|
||||
|
||||
void NavigationListModel::navigateTo(NavigationItemModel *item)
|
||||
{
|
||||
if(!item) return;
|
||||
setModelItems(item->getSiblings());
|
||||
}
|
||||
|
||||
void NavigationListModel::navigateBack()
|
||||
{
|
||||
if(!mIsBackVisible || mItems.isEmpty()) return;
|
||||
|
|
@ -40,5 +46,5 @@ void NavigationListModel::navigateBack()
|
|||
auto item = qobject_cast<NavigationItemModel*>(mItems.at(0));
|
||||
if(!item || item->getParentItem()->isRoot()) return;
|
||||
|
||||
setModelItems(item->getParentItem()->getSiblings());
|
||||
navigateTo(item->getParentItem());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue