Warning, /plasma-bigscreen/soundcloud-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.3
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("music.jpg")
0009 fillWidth: true
0010
0011 ColumnLayout {
0012 id: root
0013 anchors.fill: parent
0014
0015 Item {
0016 height: Kirigami.Units.gridUnit * 5
0017 }
0018
0019 ListModel {
0020 id: sampleModel
0021 ListElement {
0022 example: "soundcloud metallica"
0023 title: "metallica"
0024 }
0025 ListElement {
0026 example: "soundcloud electronic dance music"
0027 title: "electronic dance music"
0028 }
0029 ListElement {
0030 example: "soundcloud groove podcast"
0031 title: "groove podcast"
0032 }
0033 ListElement {
0034 example: "soundcloud ambient music"
0035 title: "ambient"
0036 }
0037 ListElement {
0038 example: "soundcloud jazz"
0039 title: "jazz"
0040 }
0041 }
0042
0043 Rectangle {
0044 Layout.fillWidth: true
0045 Layout.fillHeight: true
0046 color: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.8)
0047
0048 ColumnLayout {
0049 anchors.fill: parent
0050
0051 RowLayout {
0052 Layout.leftMargin: Kirigami.Units.largeSpacing
0053 Layout.fillWidth: true
0054
0055 Image {
0056 Layout.preferredHeight: Kirigami.Units.iconSizes.medium
0057 Layout.preferredWidth: Kirigami.Units.iconSizes.medium
0058 source: "https://cdn.iconscout.com/icon/free/png-256/soundcloud-2-101180.png"
0059 }
0060
0061 Kirigami.Heading {
0062 level: 1
0063 Layout.leftMargin: Kirigami.Units.largeSpacing
0064 text: "Soundcloud"
0065 }
0066 }
0067 Kirigami.Heading {
0068 level: 3
0069 Layout.leftMargin: Kirigami.Units.largeSpacing
0070 text: "Explore the latest artists, bands and creators of music & audio on Soundcloud"
0071 }
0072
0073 Kirigami.Separator {
0074 Layout.fillWidth: true
0075 Layout.preferredHeight: 1
0076 }
0077
0078 Rectangle {
0079 Layout.fillWidth: true
0080 Layout.preferredHeight: hd2.contentHeight + Kirigami.Units.largeSpacing
0081 color: Kirigami.Theme.linkColor
0082
0083 Kirigami.Heading {
0084 id: hd2
0085 level: 3
0086 width: parent.width
0087 anchors.left: parent.left
0088 anchors.leftMargin: Kirigami.Units.largeSpacing
0089 anchors.verticalCenter: parent.verticalCenter
0090 text: "Some examples to get you started, try asking..."
0091 }
0092 }
0093
0094 ListView {
0095 id: skillExampleListView
0096 Layout.fillWidth: true
0097 Layout.fillHeight: true
0098 keyNavigationEnabled: true
0099 focus: true
0100 highlightFollowsCurrentItem: true
0101 snapMode: ListView.SnapToItem
0102 model: sampleModel
0103 delegate: Kirigami.BasicListItem {
0104 id: rootCard
0105 reserveSpaceForIcon: false
0106 label: "Hey Mycroft, " + model.example
0107 onClicked: {
0108 triggerGuiEvent("aiix.soundcloud-audio-player.playtitle", {"playtitle": model.title})
0109 }
0110 Keys.onReturnPressed: {
0111 clicked()
0112 }
0113 }
0114 }
0115 }
0116 }
0117
0118 Item {
0119 height: Kirigami.Units.gridUnit * 12
0120 }
0121 }
0122 }