Commit 0ae0267c authored by camilo higuita's avatar camilo higuita

Merge remote-tracking branch 'kde/new-simpler-page'

parents 43eec168 43fb73d9
......@@ -152,14 +152,11 @@ Maui.ApplicationWindow
/* UI */
altToolBars: false
accentColor: babeColor
// headBarFGColor: altColorText
// headBarBGColor: "#212121"
// altColorText: darkTextColor
floatingBar: false
headBar.spacing: space.big
headBar.middleContent : Kirigami.ActionToolBar
{
......@@ -250,7 +247,7 @@ Maui.ApplicationWindow
footBar.visible: !mainlistEmpty
footBar.implicitHeight: footBar.visible ? toolBarHeight * 1.2 : 0
page.footBarItem: ColumnLayout
page.footer: ColumnLayout
{
id: _footerLayout
......@@ -318,6 +315,7 @@ Maui.ApplicationWindow
{
icon.name: "headphones"
visible: _drawer.modal
checked: _drawer.visible
icon.color: _drawer.visible ? babeColor : textColor
onClicked: _drawer.visible = !_drawer.visible
Kirigami.Theme.highlightColor: babeColor
......@@ -646,7 +644,7 @@ Maui.ApplicationWindow
globalDrawer: Maui.GlobalDrawer
{
id: _drawer
width: Kirigami.Units.gridUnit * 18
width: Math.min(Kirigami.Units.gridUnit * 18, root.width)
height: root.height - root.headBar.implicitHeight - root.footBar.implicitHeight
modal: !isWide
......@@ -722,7 +720,7 @@ Maui.ApplicationWindow
holder.title : "No Albums!"
holder.body: "Add new music sources"
holder.emojiSize: iconSizes.huge
headBarTitle: count + qsTr(" albums")
title: count + qsTr(" albums")
list.query: Albums.ALBUMS
list.sortBy: Albums.ALBUM
......@@ -776,7 +774,7 @@ Maui.ApplicationWindow
holder.title : qsTr("No Artists!")
holder.body: qsTr("Add new music sources")
holder.emojiSize: iconSizes.huge
headBarTitle: count + qsTr(" artists")
title: count + qsTr(" artists")
list.query: Albums.ARTISTS
list.sortBy: Albums.ARTIST
table.list.sortBy: Tracks.NONE
......@@ -1033,10 +1031,10 @@ Maui.ApplicationWindow
{
target: vvave
onRefreshTables: H.refreshCollection(size)
onRefreshTracks: H.refreshTracks()
onRefreshAlbums: H.refreshAlbums()
onRefreshArtists: H.refreshArtists()
// onRefreshTables: H.refreshCollection(size)
// onRefreshTracks: H.refreshTracks()
// onRefreshAlbums: H.refreshAlbums()
// onRefreshArtists: H.refreshArtists()
// onCoverReady:
// {
......
......@@ -114,7 +114,10 @@ void BaseModel::setList(BaseList *value)
QVariantMap BaseModel::get(const int &index) const
{
if(this->mList)
return this->mList->get(index);
return QVariantMap();
}
void BaseModel::clear()
......
......@@ -80,6 +80,8 @@ void PlaylistsModel::setList()
this->list << this->db->getPlaylists();
this->list << this->defaultPlaylists();
qDebug()<< this->list;
// this->sortList();
emit this->postListChanged();
}
......
......@@ -11,7 +11,6 @@ Maui.Page
id: youtubeViewRoot
property var searchRes : []
clip: true
margins: 0
property alias viewer : youtubeViewer
property int openVideo : 0
headBar.visible: false
......@@ -178,9 +177,6 @@ Maui.Page
id: youtubeTable
trackNumberVisible: false
headBar.visible: true
headBarExit: true
headBarExitIcon: "edit-clear"
headBarTitle: "YouTube"
holder.emoji: "qrc:/assets/Astronaut.png"
holder.isMask: false
holder.title : "No Results!"
......@@ -189,7 +185,6 @@ Maui.Page
coverArtVisible: true
trackDuration: true
trackRating: true
onExit: clearSearch()
isArtworkRemote: true
allowMenu: false
......@@ -198,6 +193,17 @@ Maui.Page
// appendBtn.visible: false
// playAllBtn.visible: false
headBar.leftContent: ToolButton
{
icon.name: "edit-clear"
onClicked: clearSearch()
}
headBar.middleContent: Label
{
text: "YouTube"
}
headBar.rightContent: ToolButton
{
id: menuBtn
......
......@@ -12,11 +12,14 @@ Maui.Page
property alias webView: webViewer.item
property bool wasPlaying: false
property var currentYt : ({})
margins: 0
headBarExitIcon: "go-previous"
onExit: stackView.pop(youtubeTable)
headBarTitle: currentYt ? currentYt.title : "YouTube"
title: currentYt ? currentYt.title : "YouTube"
headBar.leftContent: ToolButton
{
icon.name: "go-previous"
onClicked: stackView.pop(youtubeTable)
}
headBar.rightContent: [
......
......@@ -30,8 +30,8 @@ Maui.Page
signal albumCoverPressed(string album, string artist)
signal bgClicked()
margins: space.medium
topMargin: space.big
// margins: space.medium
// topMargin: space.big
MouseArea
{
......@@ -61,8 +61,8 @@ Maui.Page
id: grid
onAreaClicked: bgClicked()
adaptContent: true
width: parent.width
height: parent.height
anchors.fill: parent
anchors.topMargin: space.big
itemSize: albumCoverSize
spacing: albumSpacing
......
......@@ -24,7 +24,6 @@ Maui.Page
signal pulled()
focus: true
margins: 0
Maui.Holder
{
......@@ -33,8 +32,6 @@ Maui.Page
focus: true
}
Maui.ListBrowser
{
id: babeList
......
......@@ -58,7 +58,6 @@ BabeList
//headBar.middleStrech: false
headBar.leftSretch: false
headBar.rightContent: Kirigami.ActionToolBar
{
position: Controls.ToolBar.Header
......@@ -91,78 +90,78 @@ BabeList
onTriggered: list.sortBy = Tracks.TITLE
}
// Kirigami.Action
// {
// text: qsTr("Track")
// checkable: true
// checked: list.sortBy === Tracks.TRACK
// onTriggered: list.sortBy = Tracks.TRACK
// }
// Kirigami.Action
// {
// text: qsTr("Artist")
// checkable: true
// checked: list.sortBy === Tracks.ARTIST
// onTriggered: list.sortBy = Tracks.ARTIST
// }
// Kirigami.Action
// {
// text: qsTr("Album")
// checkable: true
// checked: list.sortBy === Tracks.ALBUM
// onTriggered: list.sortBy = Tracks.ALBUM
// }
// Kirigami.Action
// {
// text: qsTr("Most played")
// checkable: true
// checked: list.sortBy === Tracks.COUNT
// onTriggered: list.sortBy = Tracks.COUNT
// }
// Kirigami.Action
// {
// text: qsTr("Rate")
// checkable: true
// checked: list.sortBy === Tracks.RATE
// onTriggered: list.sortBy = Tracks.RATE
// }
// Kirigami.Action
// {
// text: qsTr("Fav")
// checkable: true
// checked: list.sortBy === Tracks.FAV
// onTriggered: list.sortBy = Tracks.FAV
// }
// Kirigami.Action
// {
// text: qsTr("Release date")
// checkable: true
// checked: list.sortBy === Tracks.RELEASEDATE
// onTriggered: list.sortBy = Tracks.RELEASEDATE
// }
// Kirigami.Action
// {
// text: qsTr("Add date")
// checkable: true
// checked: list.sortBy === Tracks.ADDDATE
// onTriggered: list.sortBy = Tracks.ADDDATE
// }
// Kirigami.Action
// {
// text: qsTr("Group")
// checkable: true
// checked: group
// onTriggered: group = !group
// }
Kirigami.Action
{
text: qsTr("Track")
checkable: true
checked: list.sortBy === Tracks.TRACK
onTriggered: list.sortBy = Tracks.TRACK
}
Kirigami.Action
{
text: qsTr("Artist")
checkable: true
checked: list.sortBy === Tracks.ARTIST
onTriggered: list.sortBy = Tracks.ARTIST
}
Kirigami.Action
{
text: qsTr("Album")
checkable: true
checked: list.sortBy === Tracks.ALBUM
onTriggered: list.sortBy = Tracks.ALBUM
}
Kirigami.Action
{
text: qsTr("Most played")
checkable: true
checked: list.sortBy === Tracks.COUNT
onTriggered: list.sortBy = Tracks.COUNT
}
Kirigami.Action
{
text: qsTr("Rate")
checkable: true
checked: list.sortBy === Tracks.RATE
onTriggered: list.sortBy = Tracks.RATE
}
Kirigami.Action
{
text: qsTr("Fav")
checkable: true
checked: list.sortBy === Tracks.FAV
onTriggered: list.sortBy = Tracks.FAV
}
Kirigami.Action
{
text: qsTr("Release date")
checkable: true
checked: list.sortBy === Tracks.RELEASEDATE
onTriggered: list.sortBy = Tracks.RELEASEDATE
}
Kirigami.Action
{
text: qsTr("Add date")
checkable: true
checked: list.sortBy === Tracks.ADDDATE
onTriggered: list.sortBy = Tracks.ADDDATE
}
Kirigami.Action
{
text: qsTr("Group")
checkable: true
checked: group
onTriggered: group = !group
}
},
Kirigami.Action
......
......@@ -14,6 +14,7 @@ Maui.Dialog
property var tracks : []
maxHeight: 400 * unit
page.padding: space.medium
ColumnLayout
{
......
......@@ -22,7 +22,7 @@ BabeGrid
property var tracks: []
property alias table : albumsViewTable
property alias tagBar : tagBar
// property alias tagBar : tagBar
signal rowClicked(var track)
signal playTrack(var track)
......@@ -37,7 +37,6 @@ BabeGrid
// topPadding: space.large
onAlbumCoverPressed: albumCoverPressedAndHold(album, artist)
headBar.visible: false
headBarExit: false
// headBar.rightContent: Kirigami.ActionToolBar
// {
// Layout.fillWidth: true
......@@ -102,8 +101,10 @@ BabeGrid
parent: parent
maxHeight: maxWidth
maxWidth: unit * 600
widthHint: 1
heightHint: 1
defaultButtons: false
page.margins: 0
page.padding: 0
// verticalAlignment: Qt.AlignBottom
......@@ -121,14 +122,12 @@ BabeGrid
trackNumberVisible: true
trackRating: true
headBar.visible: true
headBarExit: false
coverArtVisible: true
quickPlayVisible: true
focus: true
list.sortBy: Tracks.TRACK
headBar.plegable: false
holder.emoji: "qrc:/assets/ElectricPlug.png"
holder.isMask: false
holder.title : "Oops!"
......@@ -161,21 +160,17 @@ BabeGrid
albumDialog.close()
albumsViewGrid.appendAll(currentAlbum, currentArtist)
}
}
Maui.TagsBar
{
id: tagBar
visible:false
Layout.fillWidth: true
allowEditMode: false
onTagClicked: H.searchFor("tag:"+tag)
}
// Maui.TagsBar
// {
// id: tagBar
// visible:false
// Layout.fillWidth: true
// allowEditMode: false
// onTagClicked: H.searchFor("tag:"+tag)
// }
}
}
function populateTable(album, artist)
......@@ -193,13 +188,13 @@ BabeGrid
{
query = Q.GET.albumTracks_.arg(album)
query = query.arg(artist)
albumsView.table.headBarTitle = album
albumsView.table.title = album
tagq = Q.GET.albumTags_.arg(album)
}else if(artist && album === undefined)
{
query = Q.GET.artistTracks_.arg(artist)
artistsView.table.headBarTitle = artist
artistsView.table.title = artist
tagq = Q.GET.artistTags_.arg(artist)
}
......@@ -218,6 +213,7 @@ BabeGrid
function filter(tracks)
{
var matches = []
for(var i = 0; i<tracks.length; i++)
matches.push(find(tracks[i].album))
......
......@@ -46,14 +46,11 @@ Item
maxHeight: maxWidth
maxWidth: unit * 600
defaultButtons: false
page.margins: 0
BabeTable
{
id: _filterList
anchors.fill: parent
coverArtVisible: true
headBarExit: false
holder.emoji: "qrc:/assets/MusicCloud.png"
holder.isMask: false
holder.title : "No Tracks!"
......
......@@ -108,7 +108,7 @@ ListView
{
anchors.fill : parent
preventStealing: true
parent: applicationWindow().overlay.parent
// parent: applicationWindow().overlay.parent
onPressed:
{
......
......@@ -29,8 +29,6 @@ Maui.Page
signal coverDoubleClicked(var tracks)
signal coverPressed(var tracks)
focus: true
margins: 0
headBar.visible: false
PlaylistMenu
......@@ -45,20 +43,19 @@ Maui.Page
footBar.visible: !mainlistEmpty
footBar.implicitHeight: toolBarHeight * 1.3
footBarItem: AlbumsRoll
footBar.middleContent: AlbumsRoll
{
anchors.fill : parent
anchors.leftMargin: space.small
anchors.rightMargin: space.small
// height: toolBarHeight * 1.3
Layout.fillWidth: true
Layout.fillHeight: true
id: albumsRoll
}
footBar.background: Rectangle
footBar.background: Item
{
id: footerBg
clip : true
height: footBar.implicitHeight
color: "transparent"
Image
{
......@@ -154,13 +151,7 @@ Maui.Page
// if(autoplay)
// Player.playAt(0)
}
}
Kirigami.Separator
{
Layout.fillWidth: true
color: borderColor
}
}
}
// function goFocusMode()
......
......@@ -4,15 +4,11 @@ import QtQuick.Controls 2.2
import org.kde.kirigami 2.6 as Kirigami
import org.kde.mauikit 1.0 as Maui
import "../../view_models/BabeTable"
import "../../view_models"
import "../../db/Queries.js" as Q
import "../../utils/Help.js" as H
ColumnLayout
{
id: control
......@@ -36,7 +32,6 @@ ColumnLayout
Layout.fillHeight: true
Layout.fillWidth: true
interactive: false
clip: true
......@@ -49,8 +44,12 @@ ColumnLayout
BabeList
{
id: playlistViewModelFilter
headBarExitIcon: "go-previous"
// headBarExitIcon: "go-previous"
headBar.leftContent: ToolButton
{
icon.name: "go-previous"
onClicked: playlistSwipe.currentIndex = 0
}
model : ListModel {}
delegate: Maui.LabelDelegate
......@@ -64,10 +63,7 @@ ColumnLayout
onClicked: {}
}
}
onExit: playlistSwipe.currentIndex = 0
}
}
ColorTagsBar
......@@ -75,9 +71,7 @@ ColumnLayout
Layout.fillWidth: true
height: rowHeightAlt
recSize: isMobile ? iconSize : 16
onColorClicked: populate(Q.GET.colorTracks_.arg(color.toLowerCase()))
}
Maui.Dialog
......@@ -87,7 +81,6 @@ ColumnLayout
maxHeight: maxWidth
maxWidth: unit * 600
defaultButtons: false
page.margins: 0
BabeTable
{
......@@ -99,10 +92,7 @@ ColumnLayout
trackRating: true
trackDuration: false
headBar.visible: !holder.visible
headBarExit: false
headBarTitle: playlistViewModel.list.get(playlistViewModel.currentIndex).playlist
title: playlistViewModel.list.get(playlistViewModel.currentIndex).playlist
holder.emoji: "qrc:/assets/Electricity.png"
holder.isMask: false
holder.title : playlistViewModel.model.get(playlistViewModel.currentIndex).playlist
......@@ -155,7 +145,6 @@ ColumnLayout
// }
// ]
section.criteria: ViewSection.FullString
section.delegate: Maui.LabelDelegate
{
......
......@@ -19,9 +19,9 @@ BabeList
id: control
property alias list: _playlistsList
signal playSync(int index)
headBarExit: false
headBarTitle: "Playlists"
title: "Playlists"
Maui.NewDialog
{
......@@ -32,9 +32,6 @@ BabeList
rejectButton.visible: false
}
signal playSync(int index)
headBar.plegable: false
headBar.rightContent: Kirigami.ActionToolBar
{
......
......@@ -22,8 +22,6 @@ BabeTable
trackNumberVisible: false
headBar.visible: count
headBarExit: true
headBarExitIcon: "edit-clear"
holder.emoji: "qrc:/assets/BugSearch.png"
holder.isMask: false
holder.title : "No search results!"
......@@ -32,7 +30,12 @@ BabeTable
coverArtVisible: true
trackDuration: true
trackRating: true
onExit: clearSearch()
headBar.leftContent: ToolButton
{
icon.name: "edit-clear"
onClicked: clearSearch()
}
footBar.drawBorder: false
footBar.middleContent: Maui.TextField
......
......@@ -11,7 +11,6 @@ Maui.Dialog
maxWidth: unit * 600
maxHeight: unit * 500
page.margins: 0
defaultButtons: true
acceptButton.text: qsTr("Add")
rejectButton.text: qsTr("Remove")
......@@ -71,14 +70,11 @@ Maui.Dialog
id: sources
anchors.fill: parent
headBar.visible: false
headBarExit: false
headBarTitle: qsTr("Sources")
title: qsTr("Sources")
Layout.fillWidth: true
Layout.fillHeight: true
width: parent.width
onExit: close()
ListModel { id: listModel }
model: listModel
......
......@@ -12,15 +12,12 @@ BabeTable
trackDuration: true
trackRating: true
headBar.visible: !holder.visible
// headBarTitle: count + " tracks"
headBarExit: false
coverArtVisible: false
holder.emoji: "qrc:/assets/MusicCloud.png"
holder.isMask: false
holder.title : "No Tracks!"
holder.body: "Add new music sources"
holder.emojiSize: iconSizes.huge
list.query: Q.GET.allTracks
}
......
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