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

work for new mauikit simple rpage

parent fc9431d5
This diff is collapsed.
...@@ -11,7 +11,6 @@ Maui.Page ...@@ -11,7 +11,6 @@ Maui.Page
id: youtubeViewRoot id: youtubeViewRoot
property var searchRes : [] property var searchRes : []
clip: true clip: true
margins: 0
property alias viewer : youtubeViewer property alias viewer : youtubeViewer
property int openVideo : 0 property int openVideo : 0
headBar.visible: false headBar.visible: false
...@@ -178,9 +177,6 @@ Maui.Page ...@@ -178,9 +177,6 @@ Maui.Page
id: youtubeTable id: youtubeTable
trackNumberVisible: false trackNumberVisible: false
headBar.visible: true headBar.visible: true
headBarExit: true
headBarExitIcon: "edit-clear"
headBarTitle: "YouTube"
holder.emoji: "qrc:/assets/Astronaut.png" holder.emoji: "qrc:/assets/Astronaut.png"
holder.isMask: false holder.isMask: false
holder.title : "No Results!" holder.title : "No Results!"
...@@ -189,7 +185,6 @@ Maui.Page ...@@ -189,7 +185,6 @@ Maui.Page
coverArtVisible: true coverArtVisible: true
trackDuration: true trackDuration: true
trackRating: true trackRating: true
onExit: clearSearch()
isArtworkRemote: true isArtworkRemote: true
allowMenu: false allowMenu: false
...@@ -198,6 +193,17 @@ Maui.Page ...@@ -198,6 +193,17 @@ Maui.Page
// appendBtn.visible: false // appendBtn.visible: false
// playAllBtn.visible: false // playAllBtn.visible: false
headBar.leftContent: ToolButton
{
icon.name: "edit-clear"
onClicked: clearSearch()
}
headBar.middleContent: Label
{
text: "YouTube"
}
headBar.rightContent: ToolButton headBar.rightContent: ToolButton
{ {
id: menuBtn id: menuBtn
......
...@@ -12,11 +12,14 @@ Maui.Page ...@@ -12,11 +12,14 @@ Maui.Page
property alias webView: webViewer.item property alias webView: webViewer.item
property bool wasPlaying: false property bool wasPlaying: false
property var currentYt : ({}) property var currentYt : ({})
margins: 0
headBarExitIcon: "go-previous" title: currentYt ? currentYt.title : "YouTube"
onExit: stackView.pop(youtubeTable)
headBarTitle: currentYt ? currentYt.title : "YouTube" headBar.leftContent: ToolButton
{
icon.name: "go-previous"
onClicked: stackView.pop(youtubeTable)
}
headBar.rightContent: [ headBar.rightContent: [
......
...@@ -30,8 +30,8 @@ Maui.Page ...@@ -30,8 +30,8 @@ Maui.Page
signal albumCoverPressed(string album, string artist) signal albumCoverPressed(string album, string artist)
signal bgClicked() signal bgClicked()
margins: space.medium // margins: space.medium
topMargin: space.big // topMargin: space.big
MouseArea MouseArea
{ {
...@@ -61,8 +61,8 @@ Maui.Page ...@@ -61,8 +61,8 @@ Maui.Page
id: grid id: grid
onAreaClicked: bgClicked() onAreaClicked: bgClicked()
adaptContent: true adaptContent: true
width: parent.width anchors.fill: parent
height: parent.height anchors.topMargin: space.big
itemSize: albumCoverSize itemSize: albumCoverSize
spacing: albumSpacing spacing: albumSpacing
...@@ -87,8 +87,8 @@ Maui.Page ...@@ -87,8 +87,8 @@ Maui.Page
target: albumDelegate target: albumDelegate
onClicked: onClicked:
{ {
var album = grid.model.get(index).album var album = _albumsList.get(index).album
var artist = grid.model.get(index).artist var artist = _albumsList.get(index).artist
albumCoverClicked(album, artist) albumCoverClicked(album, artist)
grid.currentIndex = index grid.currentIndex = index
} }
......
...@@ -24,7 +24,6 @@ Maui.Page ...@@ -24,7 +24,6 @@ Maui.Page
signal pulled() signal pulled()
focus: true focus: true
margins: 0
Maui.Holder Maui.Holder
{ {
...@@ -33,8 +32,6 @@ Maui.Page ...@@ -33,8 +32,6 @@ Maui.Page
focus: true focus: true
} }
Maui.ListBrowser Maui.ListBrowser
{ {
id: babeList id: babeList
......
...@@ -58,7 +58,6 @@ BabeList ...@@ -58,7 +58,6 @@ BabeList
//headBar.middleStrech: false //headBar.middleStrech: false
headBar.leftSretch: false headBar.leftSretch: false
headBar.rightContent: Kirigami.ActionToolBar headBar.rightContent: Kirigami.ActionToolBar
{ {
position: Controls.ToolBar.Header position: Controls.ToolBar.Header
......
...@@ -22,7 +22,7 @@ BabeGrid ...@@ -22,7 +22,7 @@ BabeGrid
property var tracks: [] property var tracks: []
property alias table : albumsViewTable property alias table : albumsViewTable
property alias tagBar : tagBar // property alias tagBar : tagBar
signal rowClicked(var track) signal rowClicked(var track)
signal playTrack(var track) signal playTrack(var track)
...@@ -37,7 +37,6 @@ BabeGrid ...@@ -37,7 +37,6 @@ BabeGrid
// topPadding: space.large // topPadding: space.large
onAlbumCoverPressed: albumCoverPressedAndHold(album, artist) onAlbumCoverPressed: albumCoverPressedAndHold(album, artist)
headBar.visible: false headBar.visible: false
headBarExit: false
// headBar.rightContent: Kirigami.ActionToolBar // headBar.rightContent: Kirigami.ActionToolBar
// { // {
// Layout.fillWidth: true // Layout.fillWidth: true
...@@ -103,8 +102,6 @@ BabeGrid ...@@ -103,8 +102,6 @@ BabeGrid
maxHeight: maxWidth maxHeight: maxWidth
maxWidth: unit * 600 maxWidth: unit * 600
defaultButtons: false defaultButtons: false
page.margins: 0
// verticalAlignment: Qt.AlignBottom // verticalAlignment: Qt.AlignBottom
ColumnLayout ColumnLayout
...@@ -121,14 +118,12 @@ BabeGrid ...@@ -121,14 +118,12 @@ BabeGrid
trackNumberVisible: true trackNumberVisible: true
trackRating: true trackRating: true
headBar.visible: true headBar.visible: true
headBarExit: false
coverArtVisible: true coverArtVisible: true
quickPlayVisible: true quickPlayVisible: true
focus: true focus: true
list.sortBy: Tracks.TRACK list.sortBy: Tracks.TRACK
headBar.plegable: false headBar.plegable: false
holder.emoji: "qrc:/assets/ElectricPlug.png" holder.emoji: "qrc:/assets/ElectricPlug.png"
holder.isMask: false holder.isMask: false
holder.title : "Oops!" holder.title : "Oops!"
...@@ -161,21 +156,17 @@ BabeGrid ...@@ -161,21 +156,17 @@ BabeGrid
albumDialog.close() albumDialog.close()
albumsViewGrid.appendAll(currentAlbum, currentArtist) albumsViewGrid.appendAll(currentAlbum, currentArtist)
} }
} }
Maui.TagsBar // Maui.TagsBar
{ // {
id: tagBar // id: tagBar
visible:false // visible:false
Layout.fillWidth: true // Layout.fillWidth: true
allowEditMode: false // allowEditMode: false
onTagClicked: H.searchFor("tag:"+tag) // onTagClicked: H.searchFor("tag:"+tag)
} // }
} }
} }
function populateTable(album, artist) function populateTable(album, artist)
...@@ -193,13 +184,13 @@ BabeGrid ...@@ -193,13 +184,13 @@ BabeGrid
{ {
query = Q.GET.albumTracks_.arg(album) query = Q.GET.albumTracks_.arg(album)
query = query.arg(artist) query = query.arg(artist)
albumsView.table.headBarTitle = album albumsView.table.title = album
tagq = Q.GET.albumTags_.arg(album) tagq = Q.GET.albumTags_.arg(album)
}else if(artist && album === undefined) }else if(artist && album === undefined)
{ {
query = Q.GET.artistTracks_.arg(artist) query = Q.GET.artistTracks_.arg(artist)
artistsView.table.headBarTitle = artist artistsView.table.title = artist
tagq = Q.GET.artistTags_.arg(artist) tagq = Q.GET.artistTags_.arg(artist)
} }
...@@ -218,6 +209,7 @@ BabeGrid ...@@ -218,6 +209,7 @@ BabeGrid
function filter(tracks) function filter(tracks)
{ {
var matches = [] var matches = []
for(var i = 0; i<tracks.length; i++) for(var i = 0; i<tracks.length; i++)
matches.push(find(tracks[i].album)) matches.push(find(tracks[i].album))
......
...@@ -46,14 +46,11 @@ Item ...@@ -46,14 +46,11 @@ Item
maxHeight: maxWidth maxHeight: maxWidth
maxWidth: unit * 600 maxWidth: unit * 600
defaultButtons: false defaultButtons: false
page.margins: 0
BabeTable BabeTable
{ {
id: _filterList id: _filterList
anchors.fill: parent anchors.fill: parent
coverArtVisible: true coverArtVisible: true
headBarExit: false
holder.emoji: "qrc:/assets/MusicCloud.png" holder.emoji: "qrc:/assets/MusicCloud.png"
holder.isMask: false holder.isMask: false
holder.title : "No Tracks!" holder.title : "No Tracks!"
......
...@@ -29,8 +29,6 @@ Maui.Page ...@@ -29,8 +29,6 @@ Maui.Page
signal coverDoubleClicked(var tracks) signal coverDoubleClicked(var tracks)
signal coverPressed(var tracks) signal coverPressed(var tracks)
focus: true focus: true
margins: 0
headBar.visible: false headBar.visible: false
PlaylistMenu PlaylistMenu
...@@ -45,59 +43,59 @@ Maui.Page ...@@ -45,59 +43,59 @@ Maui.Page
footBar.visible: !mainlistEmpty footBar.visible: !mainlistEmpty
footBar.implicitHeight: toolBarHeight * 1.3 footBar.implicitHeight: toolBarHeight * 1.3
footBarItem: AlbumsRoll footBar.middleContent: AlbumsRoll
{ {
anchors.fill : parent // height: toolBarHeight * 1.3
anchors.leftMargin: space.small Layout.fillWidth: true
anchors.rightMargin: space.small Layout.fillHeight: true
id: albumsRoll id: albumsRoll
} }
footBar.background: Rectangle // footBar.background: Rectangle
{ // {
id: footerBg // id: footerBg
clip : true // clip : true
height: footBar.implicitHeight // height: footBar.implicitHeight
color: "transparent" // color: "transparent"
Image // Image
{ // {
id: artworkBg // id: artworkBg
height: parent.height // height: parent.height
width: parent.width // width: parent.width
sourceSize.width: parent.width // sourceSize.width: parent.width
sourceSize.height: parent.height // sourceSize.height: parent.height
fillMode: Image.PreserveAspectCrop // fillMode: Image.PreserveAspectCrop
cache: true // cache: true
antialiasing: true // antialiasing: true
smooth: true // smooth: true
asynchronous: true // asynchronous: true
source: "file://"+encodeURIComponent(currentArtwork) // source: "file://"+encodeURIComponent(currentArtwork)
} // }
FastBlur // FastBlur
{ // {
id: fastBlur // id: fastBlur
anchors.fill: parent // anchors.fill: parent
y:1 // y:1
source: artworkBg // source: artworkBg
radius: 100 // radius: 100
transparentBorder: false // transparentBorder: false
cached: true // cached: true
z:1 // z:1
clip: true // clip: true
Rectangle // Rectangle
{ // {
anchors.fill: parent // anchors.fill: parent
color: viewBackgroundColor // color: viewBackgroundColor
opacity: 0.85 // opacity: 0.85
} // }
} // }
} // }
ColumnLayout ColumnLayout
...@@ -154,13 +152,7 @@ Maui.Page ...@@ -154,13 +152,7 @@ Maui.Page
// if(autoplay) // if(autoplay)
// Player.playAt(0) // Player.playAt(0)
} }
} }
Kirigami.Separator
{
Layout.fillWidth: true
color: borderColor
}
} }
// function goFocusMode() // function goFocusMode()
......
...@@ -4,15 +4,11 @@ import QtQuick.Controls 2.2 ...@@ -4,15 +4,11 @@ import QtQuick.Controls 2.2
import org.kde.kirigami 2.6 as Kirigami import org.kde.kirigami 2.6 as Kirigami
import org.kde.mauikit 1.0 as Maui import org.kde.mauikit 1.0 as Maui
import "../../view_models/BabeTable" import "../../view_models/BabeTable"
import "../../view_models" import "../../view_models"
import "../../db/Queries.js" as Q import "../../db/Queries.js" as Q
import "../../utils/Help.js" as H import "../../utils/Help.js" as H
ColumnLayout ColumnLayout
{ {
id: control id: control
...@@ -36,7 +32,6 @@ ColumnLayout ...@@ -36,7 +32,6 @@ ColumnLayout
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
interactive: false interactive: false
clip: true clip: true
...@@ -49,8 +44,11 @@ ColumnLayout ...@@ -49,8 +44,11 @@ ColumnLayout
BabeList BabeList
{ {
id: playlistViewModelFilter id: playlistViewModelFilter
headBar.leftContent: ToolButton
headBarExitIcon: "go-previous" {
icon.name: "go-previous"
onClicked: playlistSwipe.currentIndex = 0
}
model : ListModel {} model : ListModel {}
delegate: Maui.LabelDelegate delegate: Maui.LabelDelegate
...@@ -60,14 +58,10 @@ ColumnLayout ...@@ -60,14 +58,10 @@ ColumnLayout
Connections Connections
{ {
target: delegate target: delegate
onClicked: {} onClicked: {}
} }
} }
onExit: playlistSwipe.currentIndex = 0
} }
} }
ColorTagsBar ColorTagsBar
...@@ -75,9 +69,7 @@ ColumnLayout ...@@ -75,9 +69,7 @@ ColumnLayout
Layout.fillWidth: true Layout.fillWidth: true
height: rowHeightAlt height: rowHeightAlt
recSize: isMobile ? iconSize : 16 recSize: isMobile ? iconSize : 16
onColorClicked: populate(Q.GET.colorTracks_.arg(color.toLowerCase())) onColorClicked: populate(Q.GET.colorTracks_.arg(color.toLowerCase()))
} }
Maui.Dialog Maui.Dialog
...@@ -87,7 +79,6 @@ ColumnLayout ...@@ -87,7 +79,6 @@ ColumnLayout
maxHeight: maxWidth maxHeight: maxWidth
maxWidth: unit * 600 maxWidth: unit * 600
defaultButtons: false defaultButtons: false
page.margins: 0
BabeTable BabeTable
{ {
...@@ -99,10 +90,7 @@ ColumnLayout ...@@ -99,10 +90,7 @@ ColumnLayout
trackRating: true trackRating: true
trackDuration: false trackDuration: false
headBar.visible: !holder.visible headBar.visible: !holder.visible
headBarExit: false title: playlistViewModel.list.get(playlistViewModel.currentIndex).playlist
headBarTitle: playlistViewModel.list.get(playlistViewModel.currentIndex).playlist
holder.emoji: "qrc:/assets/Electricity.png" holder.emoji: "qrc:/assets/Electricity.png"
holder.isMask: false holder.isMask: false
holder.title : playlistViewModel.model.get(playlistViewModel.currentIndex).playlist holder.title : playlistViewModel.model.get(playlistViewModel.currentIndex).playlist
...@@ -155,7 +143,6 @@ ColumnLayout ...@@ -155,7 +143,6 @@ ColumnLayout
// } // }
// ] // ]
section.criteria: ViewSection.FullString section.criteria: ViewSection.FullString
section.delegate: Maui.LabelDelegate section.delegate: Maui.LabelDelegate
{ {
......
...@@ -19,9 +19,7 @@ BabeList ...@@ -19,9 +19,7 @@ BabeList
id: control id: control
property alias list: _playlistsList property alias list: _playlistsList
title: "Playlists"
headBarExit: false
headBarTitle: "Playlists"
Maui.NewDialog Maui.NewDialog
{ {
...@@ -33,8 +31,6 @@ BabeList ...@@ -33,8 +31,6 @@ BabeList
} }
signal playSync(int index) signal playSync(int index)
headBar.plegable: false
headBar.rightContent: Kirigami.ActionToolBar headBar.rightContent: Kirigami.ActionToolBar
{ {
......
...@@ -22,8 +22,6 @@ BabeTable ...@@ -22,8 +22,6 @@ BabeTable
trackNumberVisible: false trackNumberVisible: false
headBar.visible: count headBar.visible: count
headBarExit: true
headBarExitIcon: "edit-clear"
holder.emoji: "qrc:/assets/BugSearch.png" holder.emoji: "qrc:/assets/BugSearch.png"
holder.isMask: false holder.isMask: false
holder.title : "No search results!" holder.title : "No search results!"
...@@ -32,7 +30,12 @@ BabeTable ...@@ -32,7 +30,12 @@ BabeTable
coverArtVisible: true coverArtVisible: true
trackDuration: true trackDuration: true
trackRating: true trackRating: true
onExit: clearSearch()
headBar.leftContent: ToolButton
{
icon.name: "edit-clear"
onClicked: clearSearch()
}
footBar.drawBorder: false footBar.drawBorder: false
footBar.middleContent: Maui.TextField footBar.middleContent: Maui.TextField
......
...@@ -11,7 +11,6 @@ Maui.Dialog ...@@ -11,7 +11,6 @@ Maui.Dialog
maxWidth: unit * 600 maxWidth: unit * 600
maxHeight: unit * 500 maxHeight: unit * 500
page.margins: 0
defaultButtons: true defaultButtons: true
acceptButton.text: qsTr("Add") acceptButton.text: qsTr("Add")
rejectButton.text: qsTr("Remove") rejectButton.text: qsTr("Remove")
...@@ -71,14 +70,11 @@ Maui.Dialog ...@@ -71,14 +70,11 @@ Maui.Dialog
id: sources id: sources
anchors.fill: parent anchors.fill: parent
headBar.visible: false headBar.visible: false
headBarExit: false title: qsTr("Sources")
headBarTitle: qsTr("Sources")
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
width: parent.width width: parent.width
onExit: close()
ListModel { id: listModel } ListModel { id: listModel }
model: listModel model: listModel
......
...@@ -12,15 +12,12 @@ BabeTable ...@@ -12,15 +12,12 @@ BabeTable
trackDuration: true trackDuration: true
trackRating: true trackRating: true
headBar.visible: !holder.visible headBar.visible: !holder.visible
// headBarTitle: count + " tracks"
headBarExit: false
coverArtVisible: false coverArtVisible: false
holder.emoji: "qrc:/assets/MusicCloud.png" holder.emoji: "qrc:/assets/MusicCloud.png"
holder.isMask: false holder.isMask: false
holder.title : "No Tracks!" holder.title : "No Tracks!"
holder.body: "Add new music sources" holder.body: "Add new music sources"
holder.emojiSize: iconSizes.huge holder.emojiSize: iconSizes.huge
list.query: Q.GET.allTracks 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