Warning, /plasma/plasma-bigscreen/kcms/kdeconnect/ui/delegates/PairedView.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2020 Aditya Mehra <aix.m@outlook.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005 */
0006 
0007 import QtQuick 2.14
0008 import QtQuick.Layouts 1.14
0009 import QtQuick.Controls 2.14
0010 import org.kde.plasma.components 3.0 as PlasmaComponents
0011 import org.kde.kirigami 2.12 as Kirigami
0012 import org.kde.kdeconnect 1.0
0013 
0014 Item {
0015     id: trustedDevice
0016     Layout.fillWidth: true
0017     Layout.fillHeight: true
0018     
0019     onActiveFocusChanged: {
0020         unpairBtn.forceActiveFocus()
0021     }
0022 
0023     ColumnLayout {
0024         anchors.fill: parent
0025         
0026         PlasmaComponents.Label {
0027             Layout.fillWidth: true
0028             horizontalAlignment: Text.AlignHCenter
0029             text: i18n("This device is paired")
0030         }
0031         
0032         Button {
0033             id: unpairBtn
0034             Layout.fillWidth: true
0035             Layout.preferredHeight: Kirigami.Units.gridUnit * 2
0036             Kirigami.Theme.colorSet: Kirigami.Theme.Button
0037             
0038             KeyNavigation.up: backBtnSettingsItem
0039             
0040             Keys.onReturnPressed: {
0041                 clicked()
0042             }
0043             
0044             onClicked: deviceView.currentDevice.unpair()
0045             
0046             background: Rectangle {
0047                 color: unpairBtn.activeFocus ? Kirigami.Theme.highlightColor : Kirigami.Theme.backgroundColor
0048                 border.width: 0.75
0049                 border.color: Qt.tint(Kirigami.Theme.textColor, Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.8))
0050             }
0051             
0052             contentItem: Item {
0053                 RowLayout {
0054                     anchors.centerIn: parent
0055                 
0056                     Kirigami.Icon {
0057                         Layout.preferredWidth: PlasmaCore.Units.iconSizes.small
0058                         Layout.preferredHeight: PlasmaCore.Units.iconSizes.small
0059                         source: "network-disconnect"
0060                     }
0061                     PlasmaComponents.Label {
0062                         text: i18n("Unpair")
0063                     }
0064                 }
0065             }
0066         }
0067     }
0068 }