Commit e72ebd93 authored by Camilo Higuita's avatar Camilo Higuita

long press on album to quick play

parent f97109a8
......@@ -9,6 +9,7 @@ ColumnLayout
id: babeAlbumRoot
signal albumClicked(int index)
signal albumPressed(int index)
property int albumSize : 150
property int borderRadius : 2
property int albumRadius : 0
......@@ -125,11 +126,9 @@ ColumnLayout
MouseArea
{
anchors.fill: parent
onClicked:
{
parent.GridView.view.currentIndex = index
albumClicked(index)
}
onClicked: albumClicked(index)
onPressAndHold: albumPressed(index)
}
}
......
......@@ -30,6 +30,7 @@ Pane
property alias gridModel: gridModel
property alias grid: grid
signal albumCoverClicked(string album, string artist)
signal albumCoverPressed(string album, string artist)
signal bgClicked()
width: 500
......@@ -130,6 +131,13 @@ Pane
albumCoverClicked(album, artist)
grid.currentIndex = index
}
onAlbumPressed:
{
var album = grid.model.get(index).album
var artist = grid.model.get(index).artist
albumCoverPressed(album, artist)
}
}
}
......
......@@ -164,6 +164,15 @@ BabeGrid
drawerList.model.append(map[i])
}
onAlbumCoverPressed:
{
var query = Q.GET.albumTracks_.arg(album)
query = query.arg(artist)
var map = bae.get(query)
playAlbum(map)
}
function populate()
{
......
......@@ -146,6 +146,13 @@ BabeGrid
}
onAlbumCoverPressed:
{
var query = Q.GET.artistTracks_.arg(artist)
var map = bae.get(query)
playAlbum(map)
}
function populate()
{
var map = bae.get(Q.GET.allArtistsAsc)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment