finished navigation including music player and navigate back
functionality
This commit is contained in:
parent
d6cb29ae7b
commit
6f5c9138a8
12 changed files with 213 additions and 11 deletions
32
LenaPi/models/MusicModel.cpp
Normal file
32
LenaPi/models/MusicModel.cpp
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#include "MusicModel.h"
|
||||
|
||||
MusicModel::MusicModel(QObject *parent) : QObject(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void MusicModel::init(NavigationItemModel *item)
|
||||
{
|
||||
mCurrentItem = item;
|
||||
emit currentItemChanged();
|
||||
}
|
||||
|
||||
void MusicModel::navigateBack()
|
||||
{
|
||||
emit navigateTo(mCurrentItem);
|
||||
}
|
||||
|
||||
void MusicModel::playPause()
|
||||
{
|
||||
mIsPlaying = !mIsPlaying;
|
||||
}
|
||||
|
||||
NavigationItemModel *MusicModel::getCurrentItem()
|
||||
{
|
||||
return mCurrentItem;
|
||||
}
|
||||
|
||||
bool MusicModel::isPlaying()
|
||||
{
|
||||
return mIsPlaying;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue