Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Vvave
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Maui
Vvave
Commits
3f14bad9
Commit
3f14bad9
authored
Jul 20, 2019
by
camilo higuita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more fixes for new page
parent
0cb4a908
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
215 additions
and
204 deletions
+215
-204
main.qml
main.qml
+158
-157
models/basemodel.cpp
models/basemodel.cpp
+3
-0
models/playlists/playlistsmodel.cpp
models/playlists/playlistsmodel.cpp
+2
-0
view_models/BabeTable/PlaylistDialog.qml
view_models/BabeTable/PlaylistDialog.qml
+1
-0
widgets/AlbumsView.qml
widgets/AlbumsView.qml
+2
-0
widgets/MainPlaylist/AlbumsRoll.qml
widgets/MainPlaylist/AlbumsRoll.qml
+1
-1
widgets/MainPlaylist/MainPlaylist.qml
widgets/MainPlaylist/MainPlaylist.qml
+44
-45
widgets/PlaylistsView/PlaylistsView.qml
widgets/PlaylistsView/PlaylistsView.qml
+2
-0
widgets/PlaylistsView/PlaylistsViewModel.qml
widgets/PlaylistsView/PlaylistsViewModel.qml
+2
-1
No files found.
main.qml
View file @
3f14bad9
...
...
@@ -315,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
...
...
@@ -643,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
...
...
@@ -764,162 +765,162 @@ Maui.ApplicationWindow
}
}
//
AlbumsView
//
{
//
id: artistsView
//
holder.emoji: "qrc:/assets/MusicBox.png"
//
holder.isMask: false
//
holder.title : qsTr("No Artists!")
//
holder.body: qsTr("Add new music sources")
//
holder.emojiSize: iconSizes.huge
//
title: count + qsTr(" artists")
//
list.query: Albums.ARTISTS
//
list.sortBy: Albums.ARTIST
//
table.list.sortBy: Tracks.NONE
//
Connections
//
{
//
target: artistsView
//
onRowClicked: Player.addTrack(track)
//
onPlayTrack: Player.quickPlay(track)
//
onAlbumCoverClicked: artistsView.populateTable(undefined, artist)
//
onAlbumCoverPressedAndHold:
//
{
//
var query = Q.GET.artistTracks_.arg(artist)
//
mainPlaylist.list.clear()
//
mainPlaylist.list.sortBy = Tracks.NONE
//
mainPlaylist.list.query = query
//
Player.playAll()
//
}
//
onPlayAll:
//
{
//
var query = Q.GET.artistTracks_.arg(artist)
//
query = query.arg(data.artist)
//
mainPlaylist.list.clear()
//
mainPlaylist.list.sortBy = Tracks.NONE
//
mainPlaylist.list.query = query
//
Player.playAll()
//
}
//
onAppendAll:
//
{
//
var query = Q.GET.artistTracks_.arg(artist)
//
mainPlaylist.list.appendQuery(query)
//
mainPlaylist.listView.positionViewAtEnd()
//
}
//
}
//
}
//
PlaylistsView
//
{
//
id: playlistsView
//
Connections
//
{
//
target: playlistsView
//
onRowClicked: Player.addTrack(track)
//
onQuickPlayTrack: Player.quickPlay(track)
//
onPlayAll:
//
{
//
var query = playlistsView.playlistQuery
//
mainPlaylist.list.clear()
//
mainPlaylist.list.sortBy = Tracks.NONE
//
mainPlaylist.list.query = query
//
Player.playAll()
//
}
//
onAppendAll:
//
{
//
var query = playlistsView.playlistQuery
//
mainPlaylist.list.appendQuery(query)
//
mainPlaylist.listView.positionViewAtEnd()
//
}
//
onPlaySync:
//
{
//
var query = playlistsView.playlistQuery
//
mainPlaylist.list.appendQuery(query)
//
Player.playAll()
//
root.sync = true
//
root.syncPlaylist = playlist
//
root.infoMsg = qsTr("Syncing to ") + playlist
//
}
//
}
//
}
//
SearchTable
//
{
//
id: searchView
//
Connections
//
{
//
target: searchView
//
onRowClicked: Player.addTrack(searchView.list.get(index))
//
onQuickPlayTrack: Player.quickPlay(searchView.list.get(index))
//
onPlayAll:
//
{
//
mainPlaylist.list.clear()
//
var tracks = searchView.list.getAll()
//
for(var i in tracks)
//
Player.appendTrack(tracks[i])
//
Player.playAll()
//
}
//
onAppendAll: Player.appendAll(searchView.list.getAll())
//
onArtworkDoubleClicked:
//
{
//
var query = Q.GET.albumTracks_.arg(
//
searchView.searchTable.model.get(
//
index).album)
//
query = query.arg(searchView.searchTable.model.get(
//
index).artist)
//
mainPlaylist.list.clear()
//
mainPlaylist.list.sortBy = Tracks.NONE
//
mainPlaylist.list.query = query
//
Player.playAll()
//
}
//
}
//
}
//
FoldersView
//
{
//
id: foldersView
//
Connections
//
{
//
target: foldersView.list
//
onRowClicked: Player.addTrack(foldersView.list.model.get(index))
//
onQuickPlayTrack: Player.quickPlay(foldersView.list.model.get(index))
//
onPlayAll:
//
{
//
mainPlaylist.list.clear()
//
// mainPlaylist.list.sortBy = Tracks.NONE
//
mainPlaylist.list.query = foldersView.list.list.query
//
Player.playAll()
//
}
//
onAppendAll:
//
{
//
var query = foldersView.list.list.query
//
mainPlaylist.list.appendQuery(query)
//
mainPlaylist.listView.positionViewAtEnd()
//
}
//
onQueueTrack: Player.queueTracks([foldersView.list.model.get(index)], index)
//
}
//
}
AlbumsView
{
id
:
artistsView
holder.emoji
:
"
qrc:/assets/MusicBox.png
"
holder.isMask
:
false
holder.title
:
qsTr
(
"
No Artists!
"
)
holder.body
:
qsTr
(
"
Add new music sources
"
)
holder.emojiSize
:
iconSizes
.
huge
title
:
count
+
qsTr
(
"
artists
"
)
list.query
:
Albums
.
ARTISTS
list.sortBy
:
Albums
.
ARTIST
table.list.sortBy
:
Tracks
.
NONE
Connections
{
target
:
artistsView
onRowClicked
:
Player
.
addTrack
(
track
)
onPlayTrack
:
Player
.
quickPlay
(
track
)
onAlbumCoverClicked
:
artistsView
.
populateTable
(
undefined
,
artist
)
onAlbumCoverPressedAndHold
:
{
var
query
=
Q
.
GET
.
artistTracks_
.
arg
(
artist
)
mainPlaylist
.
list
.
clear
()
mainPlaylist
.
list
.
sortBy
=
Tracks
.
NONE
mainPlaylist
.
list
.
query
=
query
Player
.
playAll
()
}
onPlayAll
:
{
var
query
=
Q
.
GET
.
artistTracks_
.
arg
(
artist
)
query
=
query
.
arg
(
data
.
artist
)
mainPlaylist
.
list
.
clear
()
mainPlaylist
.
list
.
sortBy
=
Tracks
.
NONE
mainPlaylist
.
list
.
query
=
query
Player
.
playAll
()
}
onAppendAll
:
{
var
query
=
Q
.
GET
.
artistTracks_
.
arg
(
artist
)
mainPlaylist
.
list
.
appendQuery
(
query
)
mainPlaylist
.
listView
.
positionViewAtEnd
()
}
}
}
PlaylistsView
{
id
:
playlistsView
Connections
{
target
:
playlistsView
onRowClicked
:
Player
.
addTrack
(
track
)
onQuickPlayTrack
:
Player
.
quickPlay
(
track
)
onPlayAll
:
{
var
query
=
playlistsView
.
playlistQuery
mainPlaylist
.
list
.
clear
()
mainPlaylist
.
list
.
sortBy
=
Tracks
.
NONE
mainPlaylist
.
list
.
query
=
query
Player
.
playAll
()
}
onAppendAll
:
{
var
query
=
playlistsView
.
playlistQuery
mainPlaylist
.
list
.
appendQuery
(
query
)
mainPlaylist
.
listView
.
positionViewAtEnd
()
}
onPlaySync
:
{
var
query
=
playlistsView
.
playlistQuery
mainPlaylist
.
list
.
appendQuery
(
query
)
Player
.
playAll
()
root
.
sync
=
true
root
.
syncPlaylist
=
playlist
root
.
infoMsg
=
qsTr
(
"
Syncing to
"
)
+
playlist
}
}
}
SearchTable
{
id
:
searchView
Connections
{
target
:
searchView
onRowClicked
:
Player
.
addTrack
(
searchView
.
list
.
get
(
index
))
onQuickPlayTrack
:
Player
.
quickPlay
(
searchView
.
list
.
get
(
index
))
onPlayAll
:
{
mainPlaylist
.
list
.
clear
()
var
tracks
=
searchView
.
list
.
getAll
()
for
(
var
i
in
tracks
)
Player
.
appendTrack
(
tracks
[
i
])
Player
.
playAll
()
}
onAppendAll
:
Player
.
appendAll
(
searchView
.
list
.
getAll
())
onArtworkDoubleClicked
:
{
var
query
=
Q
.
GET
.
albumTracks_
.
arg
(
searchView
.
searchTable
.
model
.
get
(
index
).
album
)
query
=
query
.
arg
(
searchView
.
searchTable
.
model
.
get
(
index
).
artist
)
mainPlaylist
.
list
.
clear
()
mainPlaylist
.
list
.
sortBy
=
Tracks
.
NONE
mainPlaylist
.
list
.
query
=
query
Player
.
playAll
()
}
}
}
FoldersView
{
id
:
foldersView
Connections
{
target
:
foldersView
.
list
onRowClicked
:
Player
.
addTrack
(
foldersView
.
list
.
model
.
get
(
index
))
onQuickPlayTrack
:
Player
.
quickPlay
(
foldersView
.
list
.
model
.
get
(
index
))
onPlayAll
:
{
mainPlaylist
.
list
.
clear
()
// mainPlaylist.list.sortBy = Tracks.NONE
mainPlaylist
.
list
.
query
=
foldersView
.
list
.
list
.
query
Player
.
playAll
()
}
onAppendAll
:
{
var
query
=
foldersView
.
list
.
list
.
query
mainPlaylist
.
list
.
appendQuery
(
query
)
mainPlaylist
.
listView
.
positionViewAtEnd
()
}
onQueueTrack
:
Player
.
queueTracks
([
foldersView
.
list
.
model
.
get
(
index
)],
index
)
}
}
// CloudView
// {
...
...
models/basemodel.cpp
View file @
3f14bad9
...
...
@@ -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
()
...
...
models/playlists/playlistsmodel.cpp
View file @
3f14bad9
...
...
@@ -80,6 +80,8 @@ void PlaylistsModel::setList()
this
->
list
<<
this
->
db
->
getPlaylists
();
this
->
list
<<
this
->
defaultPlaylists
();
qDebug
()
<<
this
->
list
;
// this->sortList();
emit
this
->
postListChanged
();
}
...
...
view_models/BabeTable/PlaylistDialog.qml
View file @
3f14bad9
...
...
@@ -14,6 +14,7 @@ Maui.Dialog
property
var
tracks
:
[]
maxHeight
:
400
*
unit
page.padding
:
space
.
medium
ColumnLayout
{
...
...
widgets/AlbumsView.qml
View file @
3f14bad9
...
...
@@ -102,6 +102,8 @@ BabeGrid
maxHeight
:
maxWidth
maxWidth
:
unit
*
600
defaultButtons
:
false
page.padding
:
0
// verticalAlignment: Qt.AlignBottom
ColumnLayout
...
...
widgets/MainPlaylist/AlbumsRoll.qml
View file @
3f14bad9
...
...
@@ -108,7 +108,7 @@ ListView
{
anchors.fill
:
parent
preventStealing
:
true
parent
:
applicationWindow
().
overlay
.
parent
//
parent: applicationWindow().overlay.parent
onPressed
:
{
...
...
widgets/MainPlaylist/MainPlaylist.qml
View file @
3f14bad9
...
...
@@ -51,51 +51,50 @@ Maui.Page
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
:
Item
{
id
:
footerBg
clip
:
true
height
:
footBar
.
implicitHeight
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
...
...
widgets/PlaylistsView/PlaylistsView.qml
View file @
3f14bad9
...
...
@@ -44,6 +44,7 @@ ColumnLayout
BabeList
{
id
:
playlistViewModelFilter
// headBarExitIcon: "go-previous"
headBar.leftContent
:
ToolButton
{
icon.name
:
"
go-previous
"
...
...
@@ -58,6 +59,7 @@ ColumnLayout
Connections
{
target
:
delegate
onClicked
:
{}
}
}
...
...
widgets/PlaylistsView/PlaylistsViewModel.qml
View file @
3f14bad9
...
...
@@ -19,6 +19,8 @@ BabeList
id
:
control
property
alias
list
:
_playlistsList
signal
playSync
(
int
index
)
title
:
"
Playlists
"
Maui.NewDialog
...
...
@@ -30,7 +32,6 @@ BabeList
rejectButton.visible
:
false
}
signal
playSync
(
int
index
)
headBar.rightContent
:
Kirigami.ActionToolBar
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment