Warning, /plasma-bigscreen/youtube-voice-application/ui/+mediacenter/CategoryBoxHistoryView.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * Copyright 2018 by Aditya Mehra <aix.m@outlook.com> 0003 * 0004 * This program is free software: you can redistribute it and/or modify 0005 * it under the terms of the GNU General Public License as published by 0006 * the Free Software Foundation, either version 3 of the License, or 0007 * (at your option) any later version. 0008 0009 * This program is distributed in the hope that it will be useful, 0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0012 * GNU General Public License for more details. 0013 0014 * You should have received a copy of the GNU General Public License 0015 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0016 */ 0017 0018 import QtQuick 2.9 0019 import QtQuick.Layouts 1.4 0020 import QtGraphicalEffects 1.0 0021 import QtQuick.Controls 2.3 0022 import org.kde.kirigami 2.8 as Kirigami 0023 import org.kde.plasma.core 2.0 as PlasmaCore 0024 import org.kde.plasma.components 3.0 as PlasmaComponents3 0025 import org.kde.plasma.components 2.0 as PlasmaComponents 0026 import Mycroft 1.0 as Mycroft 0027 import "+mediacenter/views" as Views 0028 import "+mediacenter/delegates" as Delegates 0029 0030 Item { 0031 property var historyListModel: sessionData.recentListBlob.recentList 0032 Layout.fillWidth: true 0033 Layout.fillHeight: true 0034 0035 onFocusChanged: { 0036 if(focus){ 0037 historyGridView.forceActiveFocus() 0038 } 0039 } 0040 0041 onHistoryListModelChanged: { 0042 historyGridView.view.forceLayout() 0043 } 0044 0045 Views.BigTileView { 0046 id: historyGridView 0047 anchors { 0048 top: parent.top 0049 left: parent.left 0050 right: parent.right 0051 bottom: parent.bottom 0052 } 0053 focus: true 0054 model: historyListModel 0055 title: count > 0 ? "Watch History" : "No Recent History" 0056 0057 cellWidth: view.width / 4 0058 // FIXME: componentize more all this stuff 0059 cellHeight: cellWidth / 1.8 + Kirigami.Units.gridUnit * 5 0060 delegate: Delegates.ListVideoCard { 0061 width: historyGridView.cellWidth 0062 height: historyGridView.cellHeight 0063 } 0064 KeyNavigation.up: historyCatButton 0065 } 0066 }