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
0cb4a908
Commit
0cb4a908
authored
Jul 20, 2019
by
camilo higuita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
work for new mauikit simple rpage
parent
fc9431d5
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
262 additions
and
300 deletions
+262
-300
main.qml
main.qml
+162
-165
services/web/YouTube.qml
services/web/YouTube.qml
+11
-5
services/web/YoutubeViewer.qml
services/web/YoutubeViewer.qml
+7
-4
view_models/BabeGrid/BabeGrid.qml
view_models/BabeGrid/BabeGrid.qml
+6
-6
view_models/BabeList.qml
view_models/BabeList.qml
+0
-3
view_models/BabeTable/BabeTable.qml
view_models/BabeTable/BabeTable.qml
+0
-1
widgets/AlbumsView.qml
widgets/AlbumsView.qml
+12
-20
widgets/FoldersView.qml
widgets/FoldersView.qml
+0
-3
widgets/MainPlaylist/MainPlaylist.qml
widgets/MainPlaylist/MainPlaylist.qml
+50
-58
widgets/PlaylistsView/PlaylistsView.qml
widgets/PlaylistsView/PlaylistsView.qml
+6
-19
widgets/PlaylistsView/PlaylistsViewModel.qml
widgets/PlaylistsView/PlaylistsViewModel.qml
+1
-5
widgets/SearchView/SearchTable.qml
widgets/SearchView/SearchTable.qml
+6
-3
widgets/SettingsView/SourcesDialog.qml
widgets/SettingsView/SourcesDialog.qml
+1
-5
widgets/TracksView.qml
widgets/TracksView.qml
+0
-3
No files found.
main.qml
View file @
0cb4a908
...
...
@@ -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.foot
BarItem
:
ColumnLayout
page.foot
er
:
ColumnLayout
{
id
:
_footerLayout
...
...
@@ -722,7 +719,7 @@ Maui.ApplicationWindow
holder.title
:
"
No Albums!
"
holder.body
:
"
Add new music sources
"
holder.emojiSize
:
iconSizes
.
huge
headBarT
itle
:
count
+
qsTr
(
"
albums
"
)
t
itle
:
count
+
qsTr
(
"
albums
"
)
list.query
:
Albums
.
ALBUMS
list.sortBy
:
Albums
.
ALBUM
...
...
@@ -767,162 +764,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
headBarT
itle
:
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
// t
itle: 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
// {
...
...
@@ -1033,10 +1030,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:
// {
...
...
services/web/YouTube.qml
View file @
0cb4a908
...
...
@@ -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
...
...
services/web/YoutubeViewer.qml
View file @
0cb4a908
...
...
@@ -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
:
[
...
...
view_models/BabeGrid/BabeGrid.qml
View file @
0cb4a908
...
...
@@ -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
}
...
...
view_models/BabeList.qml
View file @
0cb4a908
...
...
@@ -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
...
...
view_models/BabeTable/BabeTable.qml
View file @
0cb4a908
...
...
@@ -58,7 +58,6 @@ BabeList
//headBar.middleStrech: false
headBar.leftSretch
:
false
headBar.rightContent
:
Kirigami.ActionToolBar
{
position
:
Controls
.
ToolBar
.
Header
...
...
widgets/AlbumsView.qml
View file @
0cb4a908
...
...
@@ -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
.
headBarT
itle
=
album
albumsView
.
table
.
t
itle
=
album
tagq
=
Q
.
GET
.
albumTags_
.
arg
(
album
)
}
else
if
(
artist
&&
album
===
undefined
)
{
query
=
Q
.
GET
.
artistTracks_
.
arg
(
artist
)
artistsView
.
table
.
headBarT
itle
=
artist
artistsView
.
table
.
t
itle
=
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
))
...
...
widgets/FoldersView.qml
View file @
0cb4a908
...
...
@@ -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!
"
...
...
widgets/MainPlaylist/MainPlaylist.qml
View file @
0cb4a908
...
...
@@ -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
footBar
Item
:
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