ApplicationWindow {
id: root
+ width: container.width * container.scale
+ height: container.height * container.scale
+
Item {
id: player
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
}
}
- ListModel {
- id: playlist_model
- }
+ Item {
+ id: container
+ anchors.centerIn: parent
+ width: 1080
+ height: 1487
+ scale: screenInfo.scale_factor()
ColumnLayout {
anchors.fill: parent
text: 'PLAYLIST'
opacity: 0.5
}
- model: playlist_model
+ model: MediaplayerModel
currentIndex: -1
delegate: MouseArea {
//}
}
onClicked: {
- mediaplayer.picktrack(playlistview.model.get(index).index)
+ mediaplayer.picktrack(playlistview.model[index].index)
}
}
}
}
}
+}