Warning, /plasma/plasma-sdk/plasmoidviewer/qmlpackages/shell/contents/applet/AppletError.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * SPDX-FileCopyrightText: 2013 Marco Martin <mart@kde.org> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 import QtQuick 2.0 0008 import QtQuick.Layouts 1.1 0009 import org.kde.plasma.plasmoid 2.0 0010 import org.kde.kirigami 2.20 as Kirigami 0011 import org.kde.plasma.components 3.0 as PlasmaComponents 0012 0013 PlasmoidItem { 0014 id: root 0015 Layout.minimumWidth: Kirigami.Units.gridUnit * 15 0016 Layout.minimumHeight: Kirigami.Units.gridUnit * 15 0017 Layout.maximumWidth: Kirigami.Units.gridUnit * 15 0018 Layout.maximumHeight: Kirigami.Units.gridUnit * 15 0019 0020 property var reason 0021 property var errorInformation 0022 0023 clip: true 0024 0025 ColumnLayout { 0026 anchors { 0027 verticalCenter: parent.verticalCenter 0028 left: parent.left 0029 right: parent.right 0030 } 0031 0032 Kirigami.Icon { 0033 Layout.minimumWidth: Kirigami.Units.iconSizes.huge 0034 Layout.minimumHeight: Kirigami.Units.iconSizes.huge 0035 source: "dialog-error" 0036 Layout.alignment: Qt.AlignHCenter 0037 } 0038 0039 Kirigami.Heading { 0040 text: i18nd("plasma_shell_org.kde.plasma.desktop", "Sorry! There was an error loading %1.", root.errorInformation.appletName) 0041 level: 2 0042 wrapMode: Text.Wrap 0043 horizontalAlignment: Text.AlignHCenter 0044 Layout.fillWidth: true 0045 } 0046 0047 PlasmaComponents.Button { 0048 text: i18nd("plasma_shell_org.kde.plasma.desktop", "Copy Error Details to Clipboard") 0049 icon.name: "edit-copy" 0050 0051 onClicked: copyHelper.copyText() 0052 Layout.alignment: Qt.AlignHCenter 0053 } 0054 0055 PlasmaComponents.TextArea { 0056 id: copyHelper 0057 visible: root.errorInformation.isDebugMode 0058 0059 text: root.errorInformation.errors.join("\n\n") 0060 readOnly: true 0061 wrapMode: TextEdit.Wrap 0062 Layout.fillHeight: true 0063 Layout.fillWidth: true 0064 0065 function copyText() { 0066 selectAll() 0067 copy() 0068 } 0069 } 0070 } 0071 }