Warning, /plasma-bigscreen/youtube-voice-application/ui/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 Mycroft 1.0 as Mycroft 0024 import "+android/views" as Views 0025 import "+android/delegates" as Delegates 0026 0027 Item { 0028 property var historyListModel: sessionData.recentListBlob.recentList 0029 Layout.fillWidth: true 0030 Layout.fillHeight: true 0031 0032 onFocusChanged: { 0033 if(focus){ 0034 historyGridView.forceActiveFocus() 0035 } 0036 } 0037 0038 onHistoryListModelChanged: { 0039 historyGridView.view.forceLayout() 0040 } 0041 0042 Views.BigTileView { 0043 id: historyGridView 0044 anchors { 0045 top: parent.top 0046 left: parent.left 0047 right: parent.right 0048 bottom: parent.bottom 0049 } 0050 focus: true 0051 model: historyListModel 0052 title: count > 0 ? "Watch History" : "No Recent History" 0053 0054 cellWidth: view.width / 2 0055 // FIXME: componentize more all this stuff 0056 cellHeight: cellWidth / 1.8 + Kirigami.Units.gridUnit * 5 0057 delegate: Delegates.ListVideoCard { 0058 width: historyGridView.cellWidth 0059 height: historyGridView.cellHeight 0060 } 0061 KeyNavigation.up: historyCatButton 0062 } 0063 }