mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
30 lines
807 B
QML
30 lines
807 B
QML
// SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
|
|
// SPDX-License-Identifier: LGPL-2.0-or-later
|
|
|
|
import QtQuick 2.15
|
|
|
|
import org.kde.plasma.networkmanagement 0.2 as PlasmaNM
|
|
import org.kde.plasma.private.mobileshell 1.0 as MobileShell
|
|
|
|
MobileShell.QuickSetting {
|
|
PlasmaNM.Handler {
|
|
id: nmHandler
|
|
}
|
|
|
|
PlasmaNM.EnabledConnections {
|
|
id: enabledConnections
|
|
}
|
|
|
|
PlasmaNM.WirelessStatus {
|
|
id: wirelessStatus
|
|
}
|
|
|
|
text: i18n("Wi-Fi")
|
|
status: enabledConnections.wirelessEnabled ? wirelessStatus.wifiSSID : ""
|
|
icon: "network-wireless-signal"
|
|
settingsCommand: "plasma-open-settings kcm_mobile_wifi"
|
|
function toggle() {
|
|
nmHandler.enableWireless(!enabledConnections.wirelessEnabled)
|
|
}
|
|
enabled: enabledConnections.wirelessEnabled
|
|
}
|