Warning, /system/mycroft-gui/autotests/wiki.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * Copyright 2018 by Marco Martin <mart@kde.org> 0003 * 0004 * Licensed under the Apache License, Version 2.0 (the "License"); 0005 * you may not use this file except in compliance with the License. 0006 * You may obtain a copy of the License at 0007 * 0008 * http://www.apache.org/licenses/LICENSE-2.0 0009 * 0010 * Unless required by applicable law or agreed to in writing, software 0011 * distributed under the License is distributed on an "AS IS" BASIS, 0012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0013 * See the License for the specific language governing permissions and 0014 * limitations under the License. 0015 * 0016 */ 0017 0018 import QtQuick 2.4 0019 import QtQuick.Layouts 1.4 0020 import QtQuick.Controls 2.2 as Controls 0021 import org.kde.kirigami 2.4 as Kirigami 0022 0023 import Mycroft 1.0 as Mycroft 0024 0025 Mycroft.Delegate { 0026 id: root 0027 skillBackgroundSource: "https://source.unsplash.com/1920x1080/?+books" 0028 0029 ColumnLayout { 0030 id: lay 0031 anchors.fill: parent 0032 Item { 0033 Layout.preferredHeight: Kirigami.Units.largeSpacing * 5 0034 } 0035 Controls.Control { 0036 padding: Kirigami.Units.largeSpacing 0037 Layout.preferredWidth: Math.round(Math.min(root.width, root.height) / 2) 0038 Layout.preferredHeight: Layout.preferredWidth / (image.sourceSize.width/image.sourceSize.height) 0039 Layout.alignment: Qt.AlignHCenter 0040 contentItem: Image { 0041 id: image 0042 0043 source: sessionData.image 0044 } 0045 background: Rectangle { 0046 color: Kirigami.Theme.textColor 0047 radius: Kirigami.Units.gridUnit / 4 0048 } 0049 } 0050 Kirigami.Heading { 0051 text: sessionData.title 0052 } 0053 Controls.Label { 0054 Layout.fillWidth: true 0055 text: sessionData.text 0056 wrapMode: Text.WordWrap 0057 } 0058 Item { 0059 Layout.fillHeight: true 0060 } 0061 } 0062 }