Commit 6823eb7c authored by Camilo Higuita's avatar Camilo Higuita

watch out for repeated signal ids/names and fixes

parent 81829ef8
......@@ -162,12 +162,7 @@ ApplicationWindow
{
id: tracksView
onRowClicked: Player.appendTrack(model.get(index))
onPlayTrack:
{
Player.appendTrack(model.get(index))
Player.playAt(mainPlaylist.list.count-1)
currentView = 0
}
onQuickPlayTrack: Player.quickPlay(model.get(index))
}
AlbumsView
......
......@@ -47,18 +47,28 @@ Pane
cellWidth: albumSize + albumSpacing
cellHeight: parseInt(albumSize+(albumSize*0.6))
highlightFollowsCurrentItem: false
focus: true
boundsBehavior: Flickable.StopAtBounds
flickableDirection: Flickable.AutoFlickDirection
snapMode: GridView.SnapToRow
// flow: GridView.FlowTopToBottom
// maximumFlickVelocity: albumSize*8
model: gridModel
SystemPalette { id: myPalette; colorGroup: SystemPalette.Active }
// highlight: Rectangle
// {
// id: highlight
// width: albumSize
// height: albumSize
// color: myPalette.highlight
// radius: 4
// }
// highlight: Rectangle
// {
// id: highlight
// width: albumSize
// height: albumSize
// color: myPalette.highlight
// radius: 4
// }
// onWidthChanged:
// {
......@@ -90,7 +100,7 @@ Pane
}
}
// ScrollBar.vertical: ScrollBar{}
ScrollBar.vertical: ScrollBar{ visible: !(Qt.platform.os === android)}
}
}
......@@ -5,6 +5,7 @@ import QtQuick.Layouts 1.3
ListView
{
SystemPalette { id: myPalette; colorGroup: SystemPalette.Active }
id: list
property int currentRow : -1
property bool trackNumberVisible
......@@ -13,7 +14,7 @@ ListView
property alias holder : holder
signal rowClicked(int index)
signal rowPressed(int index)
signal playTrack(int index)
signal quickPlayTrack(int index)
signal queueTrack(int index)
width: 320
......@@ -27,7 +28,6 @@ ListView
focus: true
boundsBehavior: Flickable.StopAtBounds
id: list
flickableDirection: Flickable.AutoFlickDirection
snapMode: ListView.SnapToItem
......@@ -141,7 +141,7 @@ ListView
onPressAndHold:
{
if(Qt.platform.os === "linux")
playTrack(currentIndex)
list.quickPlayTrack(currentIndex)
}
onClicked:
......@@ -150,7 +150,7 @@ ListView
currentIndex = index
}
onPlayTrack: list.playTrack(index)
onPlay: list.quickPlayTrack(index)
onMenuClicked:
{
currentRow = index
......
......@@ -7,7 +7,7 @@ import "../utils"
ItemDelegate
{
id: delegate
signal playTrack()
signal play()
signal menuClicked()
property string textColor: bae.foregroundColor()
......@@ -45,7 +45,7 @@ ItemDelegate
Layout.rowSpan: 2
visible: quickPlay
Icon { text: MdiFont.Icon.playCircle }
onClicked: playTrack()
onClicked: delegate.play()
}
Label
......
......@@ -60,13 +60,13 @@ BabeGrid
onClicked:
{
drawer.close()
var data = albumsViewGrid.gridModel.get(albumsViewGrid.grid.currentIndex)
var query = "select * from tracks where album = \""+data.album+"\" and artist = \""+data.artist+"\" order by track asc"
var tracks = bae.get(query)
playAlbum(tracks)
drawer.close()
albumsViewGrid.playAlbum(tracks)
}
}
......@@ -84,7 +84,7 @@ BabeGrid
var data = albumsView.gridModel.get(albumsViewGrid.grid.currentIndex)
var query = "select * from tracks where album = \""+data.album+"\" and artist = \""+data.artist+"\""
var tracks = bae.get(query)
appendAlbum(tracks)
albumsViewGrid.appendAlbum(tracks)
drawer.close()
}
......@@ -131,7 +131,7 @@ BabeGrid
albumsViewGrid.rowClicked(model.get(index))
}
onPlayTrack:
onQuickPlayTrack:
{
drawer.close()
albumsViewGrid.playTrack(model.get(index))
......
......@@ -53,12 +53,13 @@ BabeGrid
onClicked:
{
drawer.close()
var data = artistsViewGrid.gridModel.get(artistsViewGrid.grid.currentIndex)
var query = "select * from tracks where artist = \""+data.artist+"\""
var tracks = bae.get(query)
playAlbum(tracks)
drawer.close()
}
}
ToolButton
......@@ -125,20 +126,20 @@ BabeGrid
onRowClicked:
{
artistsViewGrid.rowClicked(model.get(index))
drawer.close()
artistsViewGrid.rowClicked(model.get(index))
}
onPlayTrack:
onQuickPlayTrack:
{
artistsViewGrid.playTrack(model.get(index))
drawer.close()
artistsViewGrid.playTrack(model.get(index))
}
onQueueTrack:
{
artistsViewGrid.queueTrack(model.get(index))
drawer.close()
artistsViewGrid.queueTrack(model.get(index))
}
}
}
......
......@@ -37,6 +37,7 @@ Page
BabeHolder
{
id: lyricsHolder
anchors.fill: parent
visible: lyrics ? false : true
message: "Couldn't find the lyrics!"
}
......
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