Warning, /plasma-bigscreen/soundcloud-voice-application/ui/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 QtGraphicalEffects 1.0 0005 import org.kde.kirigami 2.12 as Kirigami 0006 import Mycroft 1.0 as Mycroft 0007 0008 Mycroft.Delegate { 0009 id: delegateSoundHome 0010 skillBackgroundSource: Qt.resolvedUrl("music.jpg") 0011 leftPadding: 0 0012 rightPadding: 0 0013 bottomPadding: 0 0014 topPadding: 0 0015 focus: true 0016 0017 Component.onCompleted: { 0018 delegateSoundHome.forceActiveFocus() 0019 } 0020 0021 ListModel { 0022 id: sampleModel 0023 0024 ListElement { 0025 example: "soundcloud metallica" 0026 title: "metallica" 0027 } 0028 ListElement { 0029 example: "soundcloud electronic dance music" 0030 title: "electronic dance music" 0031 } 0032 ListElement { 0033 example: "soundcloud groove podcast" 0034 title: "groove podcast" 0035 } 0036 ListElement { 0037 example: "soundcloud ambient music" 0038 title: "ambient" 0039 } 0040 ListElement { 0041 example: "soundcloud jazz" 0042 title: "jazz" 0043 } 0044 } 0045 0046 Rectangle { 0047 id: headerBar 0048 anchors.top: parent.top 0049 anchors.left: parent.left 0050 anchors.right: parent.right 0051 height: Kirigami.Units.gridUnit * 2 0052 color: "#303030" 0053 layer.enabled: true 0054 layer.effect: DropShadow { 0055 transparentBorder: true 0056 horizontalOffset: 0 0057 verticalOffset: 2 0058 } 0059 0060 RowLayout { 0061 width: parent.width 0062 height: parent.height 0063 anchors.verticalCenter: parent.verticalCenter 0064 0065 ToolButton { 0066 Kirigami.Theme.colorSet: Kirigami.Theme.Button 0067 Layout.preferredWidth: Kirigami.Units.iconSizes.smallMedium 0068 Layout.preferredHeight: Kirigami.Units.iconSizes.smallMedium 0069 Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter 0070 flat: true 0071 0072 contentItem: Image { 0073 anchors.centerIn: parent 0074 width: Kirigami.Units.iconSizes.smallMedium 0075 height: Kirigami.Units.iconSizes.smallMedium 0076 source: "images/back.png" 0077 } 0078 0079 onClicked: { 0080 delegateSoundHome.parent.backRequested() 0081 } 0082 } 0083 0084 Kirigami.Heading { 0085 id: headingLabel 0086 level: 2 0087 text: "Soundcloud" 0088 Layout.fillWidth: true 0089 horizontalAlignment: Text.AlignHCenter 0090 } 0091 } 0092 } 0093 0094 Rectangle { 0095 anchors.top: headerBar.bottom 0096 anchors.left: parent.left 0097 anchors.right: parent.right 0098 anchors.bottom: parent.bottom 0099 color: Qt.rgba(0, 0, 0, 0.7) 0100 0101 ColumnLayout { 0102 id: root 0103 anchors.fill: parent 0104 0105 Kirigami.Heading { 0106 level: 2 0107 font.bold: true 0108 text: "What can it do" 0109 } 0110 0111 Label { 0112 Layout.fillWidth: true 0113 wrapMode: Text.WordWrap 0114 font.pointSize: Kirigami.Theme.defaultFont.pointSize * 0.9 0115 text: "Explore the latest artists, bands and creators of music & audio on Soundcloud" 0116 } 0117 0118 Item { 0119 Layout.preferredHeight: Kirigami.Units.largeSpacing 0120 } 0121 0122 Kirigami.Heading { 0123 level: 2 0124 font.bold: true 0125 text: "Examples" 0126 } 0127 0128 ListView { 0129 id: skillExampleListView 0130 Layout.fillWidth: true 0131 Layout.fillHeight: true 0132 focus: false 0133 clip: true 0134 model: sampleModel 0135 spacing: Kirigami.Units.smallSpacing 0136 delegate: Kirigami.AbstractListItem { 0137 id: rootCard 0138 0139 background: Kirigami.ShadowedRectangle { 0140 color: rootCard.pressed ? Kirigami.Theme.highlightColor : Kirigami.Theme.backgroundColor 0141 radius: Kirigami.Units.smallSpacing 0142 } 0143 0144 contentItem: Label { 0145 anchors.left: parent.left 0146 anchors.right: parent.right 0147 anchors.rightMargin: Kirigami.Units.largeSpacing 0148 anchors.leftMargin: Kirigami.Units.largeSpacing 0149 wrapMode: Text.WordWrap 0150 verticalAlignment: Text.AlignVCenter 0151 elide: Text.ElideRight 0152 color: Kirigami.Theme.textColor 0153 font.pointSize: Kirigami.Theme.defaultFont.pointSize * 0.9 0154 text: "Hey Mycroft, " + model.example 0155 } 0156 0157 onClicked: { 0158 triggerGuiEvent("aiix.soundcloud-audio-player.playtitle", {"playtitle": model.title}) 0159 } 0160 } 0161 } 0162 } 0163 } 0164 }