Warning, /system/mycroft-gui/application/HintsDelegate.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * Copyright 2018 Marco Martin <mart@kde.org> 0003 * Copyright 2018 by Aditya Mehra <aix.m@outlook.com> 0004 * 0005 * Licensed under the Apache License, Version 2.0 (the "License"); 0006 * you may not use this file except in compliance with the License. 0007 * You may obtain a copy of the License at 0008 * 0009 * http://www.apache.org/licenses/LICENSE-2.0 0010 * 0011 * Unless required by applicable law or agreed to in writing, software 0012 * distributed under the License is distributed on an "AS IS" BASIS, 0013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0014 * See the License for the specific language governing permissions and 0015 * limitations under the License. 0016 * 0017 */ 0018 0019 import QtQuick 2.15 0020 import QtQuick.Layouts 1.15 0021 import QtQuick.Controls 2.15 as Controls 0022 import org.kde.kirigami 2.19 as Kirigami 0023 import Mycroft 1.0 as Mycroft 0024 import Qt5Compat.GraphicalEffects 0025 0026 Kirigami.AbstractCard { 0027 id: skillDelegate 0028 property string imageSource 0029 property string title 0030 property string category 0031 property variant examples 0032 0033 contentItem: Item { 0034 implicitWidth: delegateLayout.implicitWidth; 0035 implicitHeight: delegateLayout.implicitHeight; 0036 0037 ColumnLayout { 0038 id: delegateLayout 0039 anchors { 0040 left: parent.left; 0041 top: parent.top; 0042 right: parent.right; 0043 } 0044 0045 Kirigami.Heading { 0046 id: skillName 0047 Layout.fillWidth: true; 0048 wrapMode: Text.WordWrap; 0049 font.bold: true; 0050 text: qsTr(title); 0051 level: 3; 0052 color: Kirigami.Theme.textColor; 0053 } 0054 0055 RowLayout { 0056 id: skillTopRowLayout 0057 spacing: Kirigami.Units.largeSpacing 0058 Layout.fillWidth: true; 0059 0060 Image { 0061 id: innerskImg 0062 source: imageSource; 0063 fillMode: Image.PreserveAspectFit 0064 Layout.preferredWidth: innerskImg.width 0065 Layout.preferredHeight: innerskImg.height 0066 width: Kirigami.Units.gridUnit * 2 0067 height: Kirigami.Units.gridUnit * 2 0068 ColorOverlay { 0069 id: colorOverlay 0070 source: innerskImg 0071 color: Kirigami.Theme.linkColor 0072 anchors.fill: parent 0073 } 0074 0075 } 0076 0077 ColumnLayout { 0078 id: innerskillscolumn 0079 spacing: 2; 0080 Controls.Label { 0081 wrapMode: Text.WordWrap; 0082 width: skillDelegate.width; 0083 color: Kirigami.Theme.textColor; 0084 text: examples[1]; 0085 } 0086 Controls.Label { 0087 wrapMode: Text.WordWrap; 0088 width: skillDelegate.width; 0089 color: Kirigami.Theme.textColor; 0090 text: examples[2]; 0091 } 0092 } 0093 } 0094 } 0095 } 0096 }