Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit da775957 authored by Camilo Higuita's avatar Camilo Higuita

startusing newdialog from mauikit

parent 1213c49e
......@@ -25,6 +25,7 @@ var GET = {
tags : "select distinct tag from tags where context = 'tag' limit 1000",
trackTags : "select distinct tag from tracks_tags where context = 'tag' and tag collate nocase not in (select artist from artists) and tag in (select tag from tracks_tags group by tag having count(url) > 1) order by tag collate nocase limit 1000",
albumTags_: "select distinct tag from albums_tags where context = 'tag' and album = \"%1\" and artist = \"%2\"",
artistTags_: "select distinct tag from artists_tags where context = 'tag' and artist = \"%1\"",
colorTracks_: "select t.*, al.artwork from tracks t inner join albums al on al.album = t.album and al.artist = t.artist where t.art = \"%1\""
......
......@@ -966,6 +966,10 @@ Maui.ApplicationWindow
var query = Q.GET.artistTracks_.arg(artist)
artistsView.table.headBarTitle = artist
artistsView.populateTable(query)
var tagq = Q.GET.artistTags_.arg(artist)
artistsView.tagBar.populate(bae.get(tagq))
}
onAlbumCoverPressedAndHold:
......
......@@ -27,7 +27,6 @@
<file>widgets/InfoView/InfoView.qml</file>
<file>widgets/InfoView/LyricsView.qml</file>
<file>widgets/PlaylistsView/PlaylistsViewModel.qml</file>
<file>widgets/PlaylistsView/AddPlaylistDialog.qml</file>
<file>utils/Props.js</file>
<file>assets/face-sleeping.svg</file>
<file>assets/face-laughing.svg</file>
......
import QtQuick 2.0
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import "../../view_models/BabeDialog"
BabeDialog
{
id: newPlaylistDialogRoot
title: "New Playlist"
standardButtons: Dialog.Save | Dialog.Cancel
height: parent.height * 0.3
ColumnLayout
{
spacing: 20
anchors.fill: parent
TextField
{
id: newPlaylistField
Layout.fillWidth: true
Layout.margins: contentMargins
width: parent.width
color: textColor
onAccepted:
{
addPlaylist()
close()
}
}
}
onOpened: newPlaylistField.forceActiveFocus()
onAccepted: addPlaylist()
function addPlaylist()
{
var title = newPlaylistField.text.trim()
if(bae.addPlaylist(title))
model.insert(9, {playlist: title})
list.positionViewAtEnd()
}
}
......@@ -17,9 +17,11 @@ BabeList
headBarExit: false
headBarTitle: "Playlists"
AddPlaylistDialog
Maui.NewDialog
{
id:newPlaylistDialog
id: newPlaylistDialog
title: qsTr("New Plasylist...")
onFinished: addPlaylist(text)
}
signal playSync(int index)
......@@ -126,4 +128,12 @@ BabeList
}
}
}
function addPlaylist(text)
{
var title = text.trim()
if(bae.addPlaylist(title))
model.insert(9, {playlist: title})
list.positionViewAtEnd()
}
}
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