Warning, /multimedia/audiotube/src/contents/ui/NavigationBar.qml is written in an unsupported language. File is not indexed.

0001 // SPDX-FileCopyrightText: 2022 Mathis BrĂ¼chert <jbb@kaidan.im>
0002 //
0003 // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0004 
0005 import QtQuick 2.12
0006 import QtQuick.Controls 2.4
0007 import QtQuick.Layouts 1.2
0008 import org.kde.kirigami 2.20 as Kirigami
0009 
0010 import org.kde.ytmusic 1.0
0011 
0012 Kirigami.NavigationTabBar {
0013     id: root
0014     anchors.bottom: parent.bottom
0015     width:parent.width
0016     Kirigami.Theme.backgroundColor: "transparent"
0017     Kirigami.Theme.textColor: "white"
0018     Kirigami.Theme.highlightedTextColor: "white"
0019 
0020     actions: [
0021         Kirigami.Action {
0022             icon.name: "file-library-symbolic"
0023             text: i18n("Library")
0024             checked: pageStack.currentItem && pageStack.currentItem.objectName == "libraryPage"
0025             onTriggered: {
0026                 pageStack.clear()
0027                 pageStack.replace("qrc:/LibraryPage.qml")
0028                 applicationWindow().showSearch = false
0029 
0030 
0031             }
0032         },
0033         Kirigami.Action {
0034             icon.name: "search"
0035             text: i18n("Search")
0036             checked: pageStack.currentItem && pageStack.currentItem.objectName == "searchPage"
0037             onTriggered: {
0038                 pageStack.clear()
0039                 pageStack.replace("qrc:/SearchHistoryPage.qml",)
0040                 applicationWindow().showSearch = true
0041                 applicationWindow().searchField.forceActiveFocus();
0042             }
0043 
0044         },
0045         Kirigami.Action {
0046             icon.name: "non-starred-symbolic"
0047             text: i18n("Favourites")
0048             checked: pageStack.currentItem && pageStack.currentItem.objectName == "favourites"
0049             onTriggered: {
0050                 pageStack.clear()
0051                 pageStack.replace("qrc:/PlaybackHistory.qml", {
0052                                                 "dataModel": Library.favourites,
0053                                                 "title": i18n("Favourites"),
0054                                                 "objectName": "favourites"})
0055                 applicationWindow().showSearch = false
0056             }
0057         },
0058         Kirigami.Action {
0059             icon.name: "edit-undo-history"
0060             text: i18n("Played Songs")
0061             checked: pageStack.currentItem && pageStack.currentItem.objectName == "history"
0062             onTriggered: {
0063                 pageStack.clear()
0064                 pageStack.replace("qrc:/PlaybackHistory.qml", {
0065                                                 "dataModel": Library.playbackHistory,
0066                                                 "title": i18n("Played Songs"),
0067                                                 "objectName": "history"})
0068                 applicationWindow().showSearch = false
0069 
0070             }
0071         },
0072         Kirigami.Action {
0073             icon.name: "amarok_playlist"
0074             text: i18n("Playlists")
0075             checked: pageStack.currentItem && pageStack.currentItem.objectName == "playlists"
0076             onTriggered: {
0077                 pageStack.clear()
0078                 pageStack.replace("qrc:/LocalPlaylistsPage.qml", {
0079                   "objectName": "playlists"
0080                 })
0081                 applicationWindow().showSearch = false
0082 
0083             }
0084         }
0085     ]
0086 }