Warning, /plasma/plasma-nm/applet/contents/ui/CompactRepresentation.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2013-2017 Jan Grulich <jgrulich@redhat.com> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 import QtQuick 2.2 0008 0009 import org.kde.kirigami 2.20 as Kirigami 0010 import org.kde.plasma.plasmoid 2.0 0011 0012 MouseArea { 0013 id: root 0014 0015 required property bool airplaneModeAvailable 0016 required property string iconName 0017 0018 hoverEnabled: true 0019 0020 acceptedButtons: airplaneModeAvailable ? Qt.LeftButton | Qt.MiddleButton : Qt.LeftButton 0021 0022 property bool wasExpanded 0023 0024 onPressed: wasExpanded = mainWindow.expanded 0025 onClicked: mouse => { 0026 if (airplaneModeAvailable && mouse.button === Qt.MiddleButton) { 0027 mainWindow.planeModeSwitchAction.trigger(); 0028 } else { 0029 mainWindow.expanded = !wasExpanded; 0030 } 0031 } 0032 0033 Kirigami.Icon { 0034 id: connectionIcon 0035 0036 anchors.fill: parent 0037 source: root.iconName 0038 active: parent.containsMouse 0039 } 0040 }