Warning, /plasma-bigscreen/wikidata-voice-application/ui/+mediacenter/homepage.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 2.9 0002 import QtQuick.Controls 2.2 0003 import QtQuick.Layouts 1.4 0004 import org.kde.kirigami 2.8 as Kirigami 0005 import Mycroft 1.0 as Mycroft 0006 0007 Mycroft.Delegate { 0008 skillBackgroundSource: Qt.resolvedUrl("books.png") 0009 0010 ColumnLayout { 0011 id: root 0012 anchors.fill: parent 0013 0014 Item { 0015 height: Kirigami.Units.gridUnit * 5 0016 } 0017 0018 ListModel { 0019 id: sampleModel 0020 ListElement {example: "How old is Clint Eastwood"} 0021 ListElement {example: "Where was Abraham Lincoln born"} 0022 ListElement {example: "What is the occupation of Linus Torvalds"} 0023 ListElement {example: "What is Albert Einstein date of birth"} 0024 ListElement {example: "What is Abraham Lincoln date of death"} 0025 ListElement {example: "What is Steve Jobs spouse name"} 0026 } 0027 0028 Rectangle { 0029 Layout.fillWidth: true 0030 Layout.fillHeight: true 0031 color: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.8) 0032 0033 ColumnLayout { 0034 anchors.fill: parent 0035 0036 RowLayout { 0037 Layout.leftMargin: Kirigami.Units.largeSpacing 0038 Layout.fillWidth: true 0039 0040 Image { 0041 Layout.preferredHeight: Kirigami.Units.iconSizes.medium 0042 Layout.preferredWidth: Kirigami.Units.iconSizes.medium 0043 source: "https://d2.alternativeto.net/dist/icons/wikidata_151529.png?width=128&height=128&mode=crop&upscale=false" 0044 } 0045 0046 Kirigami.Heading { 0047 level: 1 0048 Layout.leftMargin: Kirigami.Units.largeSpacing 0049 text: "Wikidata" 0050 } 0051 } 0052 Kirigami.Heading { 0053 level: 3 0054 Layout.leftMargin: Kirigami.Units.largeSpacing 0055 text: "Get current and historic facts & information about a person from Wikidata." 0056 } 0057 0058 Kirigami.Separator { 0059 Layout.fillWidth: true 0060 Layout.preferredHeight: 1 0061 } 0062 0063 Rectangle { 0064 Layout.fillWidth: true 0065 Layout.preferredHeight: hd2.contentHeight + Kirigami.Units.largeSpacing 0066 color: Kirigami.Theme.linkColor 0067 0068 Kirigami.Heading { 0069 id: hd2 0070 level: 3 0071 width: parent.width 0072 anchors.left: parent.left 0073 anchors.leftMargin: Kirigami.Units.largeSpacing 0074 anchors.verticalCenter: parent.verticalCenter 0075 text: "Some examples to get you started, try asking..." 0076 } 0077 } 0078 0079 ListView { 0080 id: skillExampleListView 0081 Layout.fillWidth: true 0082 Layout.fillHeight: true 0083 keyNavigationEnabled: true 0084 focus: true 0085 highlightFollowsCurrentItem: true 0086 snapMode: ListView.SnapToItem 0087 model: sampleModel 0088 delegate: Kirigami.BasicListItem { 0089 id: rootCard 0090 reserveSpaceForIcon: false 0091 label: "Hey Mycroft, " + model.example 0092 Keys.onReturnPressed: { 0093 Mycroft.MycroftController.sendText(model.example) 0094 } 0095 } 0096 } 0097 } 0098 } 0099 0100 Item { 0101 height: Kirigami.Units.gridUnit * 12 0102 } 0103 } 0104 }