diff options
author | Matt Ranostay <matt.ranostay@konsulko.com> | 2018-06-29 19:45:11 -0700 |
---|---|---|
committer | Matt Ranostay <matt.ranostay@konsulko.com> | 2018-06-29 20:03:36 -0700 |
commit | 52808e4ca68eeabaccbdef4566e1ecf9bf4c9db3 (patch) | |
tree | e8ce5659138a532bdbe8602a686719ef1a4ddab1 /app/MediaPlayer.qml | |
parent | 04ae48a26ece6b6e21010f3d187f173837f99c23 (diff) |
mediaplayer: qml: switch to libqtappfw Qt model generationflounder_5.99.2flounder/5.99.25.99.2
Remove playlist creation logic out of QML and use a Qt model
generated from libqtappfw
Bug-AGL: SPEC-1430
Change-Id: I716de188fce85d824c0bf519964e0b58b9ed8f3f
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'app/MediaPlayer.qml')
-rw-r--r-- | app/MediaPlayer.qml | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/app/MediaPlayer.qml b/app/MediaPlayer.qml index 7dfaf06..99ed3ea 100644 --- a/app/MediaPlayer.qml +++ b/app/MediaPlayer.qml @@ -133,20 +133,6 @@ ApplicationWindow { Connections { target: mediaplayer - onPlaylistChanged: { - playlist_model.clear(); - - for (var i = 0; i < playlist.list.length; i++) { - var item = playlist.list[i] - - playlist_model.append({ "index": item.index, "artist": item.artist ? item.artist : '', "title": item.title ? item.title : '' }) - - if (item.selected) { - playlistview.currentIndex = i - } - } - } - onMetadataChanged: { player.title = metadata.title player.album = metadata.album @@ -182,10 +168,6 @@ ApplicationWindow { } } - ListModel { - id: playlist_model - } - ColumnLayout { anchors.fill: parent Item { @@ -392,7 +374,7 @@ ApplicationWindow { text: 'PLAYLIST' opacity: 0.5 } - model: playlist_model + model: MediaplayerModel currentIndex: -1 delegate: MouseArea { @@ -423,7 +405,7 @@ ApplicationWindow { //} } onClicked: { - mediaplayer.picktrack(playlistview.model.get(index).index) + mediaplayer.picktrack(playlistview.model[index].index) } } |