Warning, /plasma-mobile/mycroft-plasmoid-mobile/plasmoid/contents/ui/WikiDelegate.qml is written in an unsupported language. File is not indexed.
0001 /* Copyright 2016 Aditya Mehra <aix.m@outlook.com> 0002 0003 This library is free software; you can redistribute it and/or 0004 modify it under the terms of the GNU Lesser General Public 0005 License as published by the Free Software Foundation; either 0006 version 2.1 of the License, or (at your option) version 3, or any 0007 later version accepted by the membership of KDE e.V. (or its 0008 successor approved by the membership of KDE e.V.), which shall 0009 act as a proxy defined in Section 6 of version 3 of the license. 0010 0011 This library is distributed in the hope that it will be useful, 0012 but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0014 Lesser General Public License for more details. 0015 0016 You should have received a copy of the GNU Lesser General Public 0017 License along with this library. If not, see <http://www.gnu.org/licenses/>. 0018 */ 0019 0020 import QtQuick 2.9 0021 import QtQml.Models 2.2 0022 import QtQuick.Controls 2.2 0023 import QtQuick.Layouts 1.3 0024 import org.kde.plasma.core 2.0 as PlasmaCore 0025 import org.kde.plasma.plasmoid 2.0 0026 import org.kde.plasma.components 2.0 as PlasmaComponents 0027 import QtGraphicalEffects 1.0 0028 0029 Rectangle { 0030 id: mainRect 0031 height: headrTitle.height + splitter.height + wikiImg.height + wikisum.height + units.gridUnit * 0.50 0032 width: cbwidth 0033 border.width: 1 0034 border.color: Qt.darker(PlasmaCore.ColorScope.backgroundColor, 1.2) 0035 color: Qt.darker(PlasmaCore.ColorScope.backgroundColor, 1.2) 0036 layer.enabled: true 0037 layer.effect: DropShadow { 0038 horizontalOffset: 0 0039 verticalOffset: 1 0040 radius: 10 0041 samples: 32 0042 spread: 0.1 0043 color: Qt.rgba(0, 0, 0, 0.3) 0044 } 0045 0046 Column{ 0047 id: mainColWdel 0048 spacing: 2 0049 anchors.fill: parent 0050 0051 Row { 0052 id: headerRowWiki 0053 anchors.left: parent.left 0054 anchors.right: parent.right 0055 height: headrTitle.height 0056 spacing: 2 0057 0058 Image { 0059 id: headrTitleLogo 0060 width: parent.height 0061 height: parent.height 0062 source: "../images/wikip.png" 0063 } 0064 0065 PlasmaCore.SvgItem { 0066 id: headerDivWiki 0067 anchors { 0068 top: parent.top 0069 topMargin: 0 0070 bottom: parent.bottom 0071 bottomMargin: 0 0072 } 0073 0074 width: linetopleftvertSvg.elementSize("vertical-line").width 0075 z: 110 0076 elementId: "vertical-line" 0077 0078 svg: PlasmaCore.Svg { 0079 id: linetopleftvertSvg; 0080 imagePath: "widgets/line" 0081 } 0082 } 0083 0084 PlasmaComponents.Label { 0085 id: headrTitle 0086 anchors.top: parent.top 0087 anchors.topMargin: units.gridUnits * 0.25 0088 text: i18n("Wikipedia") 0089 font.capitalization: Font.SmallCaps 0090 color: theme.textColor 0091 height: units.gridUnits * 2 0092 width: parent.width 0093 } 0094 } 0095 0096 Rectangle { 0097 id: splitter 0098 anchors.left: parent.left 0099 anchors.right: parent.right 0100 height: 1 0101 color: theme.textColor 0102 } 0103 0104 Image { 0105 id: wikiImg 0106 width: parent.width 0107 height: units.gridUnit * 3 0108 source: model.image 0109 } 0110 0111 PlasmaComponents.Label { 0112 id: wikisum 0113 text: i18n(model.summary) 0114 width: parent.width 0115 wrapMode: Text.Wrap 0116 } 0117 } 0118 }