Warning, /multimedia/plasmatube/src/ui/videoplayer/VideoQueueView.qml is written in an unsupported language. File is not indexed.

0001 // SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
0002 // SPDX-License-Identifier: GPL-3.0-or-later
0003 
0004 import QtQuick
0005 import QtQuick.Layouts
0006 import QtQuick.Controls as QQC2
0007 import org.kde.kirigami as Kirigami
0008 import Qt5Compat.GraphicalEffects
0009 
0010 import org.kde.plasmatube
0011 import "../components/utils.js" as Utils
0012 import "../"
0013 import "../components"
0014 
0015 QQC2.Control {
0016     id: root
0017 
0018     topPadding: 0
0019     bottomPadding: 0
0020     leftPadding: 0
0021     rightPadding: 0
0022 
0023     Kirigami.Theme.colorSet: Kirigami.Theme.Window
0024     Kirigami.Theme.inherit: false
0025 
0026     background: Rectangle {
0027         anchors.fill: parent
0028         color: Kirigami.Theme.backgroundColor
0029     }
0030 
0031     contentItem: ColumnLayout {
0032         spacing: 0
0033 
0034         QQC2.ToolBar {
0035             Layout.fillWidth: true
0036 
0037             QQC2.ToolButton {
0038                 text: i18nc("@action:button Clear playlist", "Clear")
0039                 onClicked: {
0040                     PlasmaTube.videoController.videoQueue.clear();
0041                     applicationWindow().closePlayer();
0042                 }
0043             }
0044         }
0045 
0046         QQC2.ScrollView {
0047             Layout.fillWidth: true
0048             Layout.fillHeight: true
0049 
0050             ListView {
0051                 model: PlasmaTube.videoController.videoQueue
0052 
0053                 delegate: VideoListItem {
0054                     id: videoDelegate
0055 
0056                     width: ListView.view.width
0057                     height: implicitHeight
0058 
0059                     vid: model.id
0060                     thumbnail: model.thumbnail
0061                     liveNow: model.liveNow
0062                     length: model.length
0063                     title: model.title
0064                     author: model.author
0065                     authorId: model.authorId
0066                     description: model.description
0067                     viewCount: model.viewCount
0068                     publishedText: model.publishedText
0069                     watched: model.watched
0070                     highlighted: model.playing
0071 
0072                     onPressed: PlasmaTube.videoController.videoQueue.playInQueue(model.index)
0073                 }
0074             }
0075         }
0076     }
0077 }