Warning, /plasma-bigscreen/plasma-remotecontrollers/kcm/ui/DeviceSetupView.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 SPDX-FileCopyrightText: 2020 Aditya Mehra <aix.m@outlook.com>
0003 SPDX-FileCopyrightText: 2015 Aleix Pol Gonzalez <aleixpol@kde.org>
0004
0005 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0006 */
0007
0008 import QtQuick 2.14
0009 import QtQuick.Layouts 1.14
0010 import QtQuick.Controls 2.14
0011 import org.kde.plasma.core 2.0 as PlasmaCore
0012 import org.kde.kirigami 2.20 as Kirigami
0013 import org.kde.plasma.components 3.0 as PlasmaComponents
0014 import Qt5Compat.GraphicalEffects
0015
0016 Item {
0017 id: deviceView
0018 property var deviceName
0019 property var deviceIcon
0020 property var deviceType
0021 property bool ignoreEvent: false
0022
0023 onIgnoreEventChanged: {
0024 if (ignoreEvent) {
0025 ignoreEventResetTimer.start()
0026 }
0027 }
0028
0029 Timer {
0030 id: ignoreEventResetTimer
0031 interval: 200
0032 onTriggered: {
0033 deviceView.ignoreEvent = false
0034 }
0035 }
0036
0037 onActiveFocusChanged: {
0038 if(activeFocus){
0039 deviceMapView.forceActiveFocus()
0040 }
0041 }
0042
0043 ColumnLayout {
0044 id: colLayoutSettingsItem
0045 anchors.fill: parent
0046 anchors.margins: Kirigami.Units.largeSpacing
0047
0048 Item {
0049 Layout.fillWidth: true
0050 Layout.preferredHeight: Kirigami.Units.gridUnit * 4
0051 Layout.alignment: Qt.AlignTop
0052
0053 RowLayout {
0054 id: headerViewRowLayout
0055 anchors.top: parent.top
0056 anchors.left: parent.left
0057 anchors.right: parent.right
0058 height: parent.height - Kirigami.Units.largeSpacing
0059
0060 Rectangle {
0061 id: dIcon
0062 Layout.preferredWidth: Kirigami.Units.iconSizes.huge
0063 Layout.preferredHeight: width
0064 radius: 100
0065 color: Kirigami.Theme.backgroundColor
0066
0067 Kirigami.Icon {
0068 id: deviceIconStatus
0069 anchors.centerIn: parent
0070 width: Kirigami.Units.iconSizes.large - Kirigami.Units.largeSpacing
0071 height: width
0072 source: deviceView.deviceIcon
0073 }
0074 }
0075
0076 Kirigami.Heading {
0077 id: label2
0078 Layout.fillWidth: true
0079 Layout.fillHeight: true
0080 horizontalAlignment: Text.AlignLeft
0081 wrapMode: Text.WordWrap
0082 level: 2
0083 maximumLineCount: 2
0084 elide: Text.ElideRight
0085 color: PlasmaCore.ColorScope.textColor
0086 text: i18n(deviceView.deviceName)
0087 }
0088 }
0089
0090 Kirigami.Separator {
0091 id: lblSept2
0092 anchors.top: headerViewRowLayout.bottom
0093 anchors.topMargin: Kirigami.Units.smallSpacing
0094 height: 1
0095 width: parent.width
0096 }
0097 }
0098
0099 DeviceMap {
0100 id: deviceMapView
0101 Layout.fillWidth: true
0102 Layout.fillHeight: true
0103 Layout.alignment: Qt.AlignTop
0104 deviceType: deviceView.deviceType
0105 }
0106 }
0107 }