TracksView.qml 750 Bytes
Newer Older
Camilo Higuita's avatar
Camilo Higuita committed
1
import QtQuick 2.9
2
import "../view_models/BabeTable"
3
import "../view_models"
4
import "../db/Queries.js" as Q
Camilo Higuita's avatar
Camilo Higuita committed
5 6 7

BabeTable
{
8
    id: tracksViewTable
Camilo Higuita's avatar
Camilo Higuita committed
9
    trackNumberVisible: false
10 11
    trackDuration: true
    trackRating: true
Camilo Higuita's avatar
Camilo Higuita committed
12 13 14
    headerBarVisible: true
    headerBarTitle: count + " tracks"
    headerBarExit: false
Camilo Higuita's avatar
Camilo Higuita committed
15 16
    coverArtVisible: false

17 18 19 20 21

    section.property : "album"
    section.criteria: ViewSection.FullString
    section.delegate: BabeDelegate
    {
Camilo Higuita's avatar
Camilo Higuita committed
22
        id: delegate
23 24 25 26 27
        label: section
        isSection: true
        boldLabel: true
    }

28 29
    function populate()
    {
Camilo Higuita's avatar
Camilo Higuita committed
30
        var map = bae.get(Q.GET.allTracks)
31 32 33 34

        if(map.length > 0)
            for(var i in map)
                tracksViewTable.model.append(map[i])
35
    }
Camilo Higuita's avatar
Camilo Higuita committed
36 37 38
}