Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/VLC/modules/gui/qt/medialibrary/qml/   (VLC Media Plyer ©)  Datei vom 23.9.2026 mit Größe 3 kB image not shown  

Quelle  MusicGenresDisplay.qml  Sprache: unbekannt

 
Spracherkennung für: .qml vermutete Sprache: Cobol {Cobol[34] Masm[30] Fortran[24]} [Methode: maximale Elemente, drei Dimensionen]

/*****************************************************************************
 * Copyright (C) 2019 VLC authors and VideoLAN
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * ( at your option ) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *****************************************************************************/
import QtQuick
import QtQml.Models
import VLC.MainInterface
import VLC.MediaLibrary

import VLC.Util
import VLC.Widgets as Widgets
import VLC.Style

Widgets.PageLoader {
    id: root

    pageModel: [{
        name: "all",
        default: true,
        component: genresComponent
    }, {
        name: "albums",
        component: albumGenreComponent
    }]

    property int displayMarginBeginning: 0
    property int displayMarginEnd: 0

    property bool enableBeginningFade: true
    property bool enableEndFade: true

    Component {
        id: genresComponent

        Widgets.PageExt {
            id: genrePage

            title: qsTr("Genres")

            /* List View */
            MusicGenres {
                id: genresView

                anchors.fill: parent

                focus: true

                displayMarginBeginning: root.displayMarginBeginning
                displayMarginEnd: root.displayMarginEnd

                enableBeginningFade: root.enableBeginningFade
                enableEndFade: root.enableEndFade

                searchPattern: genrePage.search.pattern
                sortOrder: genrePage.sort.order
                sortCriteria: genrePage.sort.criteria

                onShowAlbumView: (id, name, reason) => {
                    History.push([...root.pagePrefix, "albums"], { parentId: id, genreName: name }, reason)
                }
            }
        }
    }

    Component {
        id: albumGenreComponent

        Widgets.PageExt {
            id: albumGenrePage
            property string genreName: ""
            property alias parentId: albumsView.parentId

            title: qsTr("Genres - %1").arg(genreName)

            /* List View */
            MusicAlbums {
                id: albumsView

                anchors.fill: parent

                focus: true

                searchPattern: albumGenrePage.search.pattern
                sortOrder: albumGenrePage.sort.order
                sortCriteria: albumGenrePage.sort.criteria

                onCurrentIndexChanged: History.viewProp.initialIndex = currentIndex
            }

            displayMarginBeginning: root.displayMarginBeginning
            displayMarginEnd: root.displayMarginEnd

            enableBeginningFade: root.enableBeginningFade
            enableEndFade: root.enableEndFade
        }
    }
}

[Dauer der Verarbeitung: 0.3 Sekunden, vorverarbeitet 2026-10-24]