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
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
......@@ -87,8 +87,8 @@ Maui.Page
target: albumDelegate
onClicked:
{
var album = grid.model.get(index).album
var artist = grid.model.get(index).artist
var album = _albumsList.get(index).album
var artist = _albumsList.get(index).artist
albumCoverClicked(album, artist)
grid.currentIndex = index
}
......
......@@ -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
......
......@@ -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
......@@ -103,8 +102,6 @@ BabeGrid
maxHeight: maxWidth
maxWidth: unit * 600
defaultButtons: false
page.margins: 0
// verticalAlignment: Qt.AlignBottom
ColumnLayout
......@@ -121,14 +118,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 +156,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 +184,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 +209,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!"
......
......@@ -29,8 +29,6 @@ Maui.Page
signal coverDoubleClicked(var tracks)
signal coverPressed(var tracks)
focus: true
margins: 0
headBar.visible: false
PlaylistMenu
......@@ -45,59 +43,59 @@ 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
{
id: footerBg
clip : true
height: footBar.implicitHeight
color: "transparent"
Image
{
id: artworkBg
height: parent.height
width: parent.width
sourceSize.width: parent.width
sourceSize.height: parent.height
fillMode: Image.PreserveAspectCrop
cache: true
antialiasing: true
smooth: true
asynchronous: true
source: "file://"+encodeURIComponent(currentArtwork)
}
FastBlur
{
id: fastBlur
anchors.fill: parent
y:1
source: artworkBg
radius: 100
transparentBorder: false
cached: true
z:1
clip: true
Rectangle
{
anchors.fill: parent
color: viewBackgroundColor
opacity: 0.85
}
}
}
// footBar.background: Rectangle
// {
// id: footerBg
// clip : true
// height: footBar.implicitHeight
// color: "transparent"
// Image
// {
// id: artworkBg
// height: parent.height
// width: parent.width
// sourceSize.width: parent.width
// sourceSize.height: parent.height
// fillMode: Image.PreserveAspectCrop
// cache: true
// antialiasing: true
// smooth: true
// asynchronous: true
// source: "file://"+encodeURIComponent(currentArtwork)
// }
// FastBlur
// {
// id: fastBlur
// anchors.fill: parent
// y:1
// source: artworkBg
// radius: 100
// transparentBorder: false
// cached: true
// z:1
// clip: true
// Rectangle
// {
// anchors.fill: parent
// color: viewBackgroundColor
// opacity: 0.85
// }
// }
// }
ColumnLayout
......@@ -155,12 +153,6 @@ Maui.Page
// 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,11 @@ ColumnLayout
BabeList
{
id: playlistViewModelFilter
headBarExitIcon: "go-previous"
headBar.leftContent: ToolButton
{
icon.name: "go-previous"
onClicked: playlistSwipe.currentIndex = 0
}
model : ListModel {}
delegate: Maui.LabelDelegate
......@@ -60,14 +58,10 @@ ColumnLayout
Connections
{
target: delegate
onClicked: {}
}
}
onExit: playlistSwipe.currentIndex = 0
}
}
ColorTagsBar
......@@ -75,9 +69,7 @@ ColumnLayout
Layout.fillWidth: true
height: rowHeightAlt
recSize: isMobile ? iconSize : 16
onColorClicked: populate(Q.GET.colorTracks_.arg(color.toLowerCase()))
}
Maui.Dialog
......@@ -87,7 +79,6 @@ ColumnLayout
maxHeight: maxWidth
maxWidth: unit * 600
defaultButtons: false
page.margins: 0
BabeTable
{
......@@ -99,10 +90,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 +143,6 @@ ColumnLayout
// }
// ]
section.criteria: ViewSection.FullString
section.delegate: Maui.LabelDelegate
{
......
......@@ -19,9 +19,7 @@ BabeList
id: control
property alias list: _playlistsList
headBarExit: false
headBarTitle: "Playlists"
title: "Playlists"
Maui.NewDialog
{
......@@ -33,8 +31,6 @@ BabeList
}
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