Commit 4f004aa6 authored by Camilo Higuita's avatar Camilo Higuita

cleaning up and almost ready for release

parent e86852c9
This diff is collapsed.
......@@ -20,7 +20,6 @@
<file>utils/BabeIcon.qml</file>
<file>view_models/BabeScrollBar.qml</file>
<file>assets/bars.gif</file>
<file>view_models/FolderPicker/FolderPickerList.qml</file>
<file>view_models/BabeGrid/BabeAlbum.qml</file>
<file>view_models/BabeGrid/BabeGrid.qml</file>
<file>view_models/BabeTable/TableDelegate.qml</file>
......
......@@ -90,11 +90,11 @@ BabeSettings::BabeSettings(QObject *parent) : QObject(parent)
{
if(size > 0)
{
// this->collectionWatcher();
// emit refreshTables({{BAE::TABLEMAP[TABLE::TRACKS], true},
// {BAE::TABLEMAP[TABLE::ALBUMS], true},
// {BAE::TABLEMAP[TABLE::ARTISTS], true},
// {BAE::TABLEMAP[TABLE::PLAYLISTS], true}});
this->collectionWatcher();
emit refreshTables({{BAE::TABLEMAP[TABLE::TRACKS], true},
{BAE::TABLEMAP[TABLE::ALBUMS], true},
{BAE::TABLEMAP[TABLE::ARTISTS], true},
{BAE::TABLEMAP[TABLE::PLAYLISTS], true}});
// this->startBrainz(true, 1500);
......
......@@ -13,11 +13,12 @@ function playTrack(track)
player.play()
root.playIcon.iconName = "media-playback-pause"
var artwork = root.currentTrack.artwork
// root.mainPlaylist.list.currentItem.playingIndicator = true
root.currentArtwork = artwork && artwork.length>0 && artwork !== "NONE" ? artwork : bae.loadCover(root.currentTrack.url)
root.currentBabe = bae.trackBabe(root.currentTrack.url)
if(!root.isMobile)
{
root.title = root.currentTrack.title + " - " +root.currentTrack.artist
......
......@@ -10,7 +10,7 @@ Item
property alias delegate : babeList.delegate
property alias count : babeList.count
property alias currentIndex : babeList.currentIndex
property alias currentItem : babeList.currentItem
property alias holder : holder
property alias headerBarRight : headerBarActionsRight.children
......@@ -70,7 +70,7 @@ Item
BabeButton
{
Layout.alignment : Qt.AlignLeft
Layout.leftMargin: contentMargins-6
Layout.leftMargin: contentMargins
width: rowHeight
visible: headerBarExit
anim : true
......@@ -82,7 +82,7 @@ Item
{
id: headerBarActionsLeft
Layout.alignment : Qt.AlignLeft
Layout.leftMargin: headerBarExit ? 0 : contentMargins-6
Layout.leftMargin: headerBarExit ? 0 : contentMargins
}
......@@ -105,7 +105,7 @@ Item
{
id: headerBarActionsRight
Layout.alignment : Qt.AlignRight
Layout.rightMargin: contentMargins-6
Layout.rightMargin: contentMargins
}
}
......
......@@ -126,7 +126,7 @@ BabeList
{
currentIndex = index
contextMenu.rate = bae.getTrackStars(model.get(currentIndex).url)
contextMenu.babe = model.get(currentIndex).babe == "1" ? true : false
contextMenu.babe = bae.trackBabe(model.get(currentIndex).url)
if(root.isMobile) contextMenu.open()
else
contextMenu.popup()
......
......@@ -83,7 +83,7 @@ BabeDialog
onOpened:
{
newPlaylistField.clear()
playlistsList.clearTable()
playlistsList.list.clearTable()
var playlists = bae.get(Q.GET.playlists)
if(playlists.length > 0)
for(var i in playlists)
......
......@@ -37,7 +37,7 @@ BabePopup
headerBarExit: true
headerBarVisible: true
headerBarTitle: ""
headerBarTitle: "Select"
headerBarLeft: [
......@@ -83,7 +83,7 @@ BabePopup
target: delegate
onClicked:
{
currentIndex = index
dirList.currentIndex = index
currentUrl = dirList.model.get(index).url
currentName = dirList.model.get(index).name
pathClicked(currentUrl)
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import ".."
BabeList
{
id: list
width: parent.width
property int currentRow : -1
property string currentUrl
property string currentName
signal rowClicked(int index)
signal rowPressed(int index)
ListModel { id: listModel }
model: listModel
delegate: BabeDelegate
{
id: delegate
label : name
Connections
{
target: delegate
onClicked:
{
currentIndex = index
list.rowClicked(index)
}
}
}
}
......@@ -34,7 +34,6 @@ ToolBar
Kirigami.Separator
{
Rectangle
{
anchors.fill: parent
......@@ -56,9 +55,9 @@ ToolBar
BabeButton
{
id: settingsView
iconName: /*"headphones"*/ /*"media-optical-audio"*/ "application-menu"
iconName: "application-menu"
iconColor: settingsDrawer.visible ? babeColor : textColor/*(pageStack.wideMode || pageStack.currentIndex === 0 ) && !isMobile ? accentColor : textColor*/
onClicked: settingsViewClicked()/*playlistViewClicked()*/
onClicked: settingsViewClicked()
hoverEnabled: !isMobile
ToolTip.delay: 1000
......@@ -150,6 +149,7 @@ ToolBar
{
Layout.fillWidth: true
}
BabeButton
{
id: searchView
......
......@@ -18,24 +18,17 @@ Item
id: mainPlaylistRoot
property alias artwork : artwork
property alias cover : cover
property alias list : list.list
property alias list : table.list
property alias table: table
property alias infoView : infoView
property alias contextMenu : table.contextMenu
property alias headerMenu : table.headerMenu
property alias stack : stackView
signal coverDoubleClicked(var tracks)
signal coverPressed(var tracks)
// Component.onCompleted:
// {
// if(list.count>0)
// root.width = coverSize
// else
// root.width = coverSize*3
// }
PlaylistMenu
{
......@@ -43,7 +36,7 @@ Item
onClearOut: Player.clearOutPlaylist()
onHideCover: cover.visible = !cover.visible
onClean: Player.cleanPlaylist()
onSaveToClicked: list.saveList()
onSaveToClicked: table.saveList()
}
Rectangle
......@@ -185,17 +178,16 @@ Item
BabeButton
{
id: infoBtn
anchors.centerIn: parent
iconName: stackView.currentItem === list ? "documentinfo" : "arrow-left"
iconName: stackView.currentItem === table ? "documentinfo" : "arrow-left"
onClicked:
{
if( stackView.currentItem !== list)
if( stackView.currentItem !== table)
{
cover.visible = true
stackView.pop(list) }
stackView.pop(table) }
else {
cover.visible = false
stackView.push(infoView)
......@@ -204,19 +196,7 @@ Item
}
}
Label
{
id: currentTrackInfo
Layout.maximumWidth: parent.width*0.7
Layout.fillWidth:true
Layout.alignment: Qt.AlignCenter
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
text: currentTrack ? (currentTrack.title ? currentTrack.title + " - " + currentTrack.artist : "--- - "+currentTrack.artist) : ""
color: foregroundColor
font.pointSize: 8
elide: Text.ElideRight
}
Item
{
......@@ -284,7 +264,7 @@ Item
initialItem: BabeTable
{
id: list
id: table
headerBarVisible: false
quickPlayVisible: false
coverArtVisible: true
......
......@@ -38,6 +38,6 @@ BabeDialog
var title = newPlaylistField.text.trim()
if(bae.addPlaylist(title))
model.append({playlist: title})
positionViewAtEnd()
list.positionViewAtEnd()
}
}
......@@ -30,7 +30,7 @@ BabeList
z: -999
}
headerBarRight: BabeButton
headerBarLeft: BabeButton
{
id : createPlaylistBtn
anim : true
......@@ -38,7 +38,7 @@ BabeList
onClicked : newPlaylistDialog.open()
}
headerBarLeft: BabeButton
headerBarRight: BabeButton
{
id: removePlaylist
iconName: "list-remove"
......
......@@ -77,7 +77,7 @@ Kirigami.GlobalDrawer
text: "Icon size"
Kirigami.Action
{
text: "16"
text: iconSizes.small
onTriggered :
{
bae.saveSetting("ICON_SIZE", text, "BABE")
......@@ -87,7 +87,7 @@ Kirigami.GlobalDrawer
Kirigami.Action
{
text: isMobile ? "24" : "22"
text: iconSizes.medium
onTriggered :
{
bae.saveSetting("ICON_SIZE", text, "BABE")
......@@ -97,7 +97,7 @@ Kirigami.GlobalDrawer
Kirigami.Action
{
text: "32"
text: iconSizes.big
onTriggered :
{
bae.saveSetting("ICON_SIZE", text, "BABE")
......
......@@ -53,10 +53,7 @@ BabePopup
onExit: close()
ListModel { id: listModel
ListElement {url: "hahahaha"}
}
ListModel { id: listModel }
model: listModel
......@@ -68,7 +65,7 @@ BabePopup
Connections
{
target: delegate
onClicked: sources.list.currentIndex = index
onClicked: sources.currentIndex = index
}
}
......@@ -97,9 +94,9 @@ BabePopup
Component.onCompleted:
{
var map = bae.get("select url from folders order by addDate desc")
var map = bae.get("select url from folders order by strftime(\"%s\", addDate) desc")
for(var i in map)
listModel.append(map[i])
model.append(map[i])
}
}
......
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