2021-09-16 04:48:20 +00:00
|
|
|
/*
|
|
|
|
|
* SPDX-FileCopyrightText: 2021 Bhushan Shah <bshah@kde.org>
|
|
|
|
|
* SPDX-FileCopyrightText: 2021 Nicolas Fella <nicolas.fella@gmx.de>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: LGPL-2.0-or-later
|
|
|
|
|
*/
|
|
|
|
|
|
2023-09-23 23:27:13 +00:00
|
|
|
import org.kde.plasma.networkmanagement as PlasmaNM
|
2023-03-17 02:44:36 +00:00
|
|
|
import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS
|
2021-09-16 04:48:20 +00:00
|
|
|
|
2023-03-17 02:44:36 +00:00
|
|
|
QS.QuickSetting {
|
2021-09-16 04:48:20 +00:00
|
|
|
text: i18n("Airplane Mode")
|
2024-07-01 01:56:48 +00:00
|
|
|
icon: PlasmaNM.Configuration.airplaneModeEnabled ? "network-flightmode-on" : "network-flightmode-off"
|
2021-12-22 23:29:00 +00:00
|
|
|
status: ""
|
2021-09-16 04:48:20 +00:00
|
|
|
enabled: PlasmaNM.Configuration.airplaneModeEnabled
|
|
|
|
|
|
|
|
|
|
PlasmaNM.Handler {
|
|
|
|
|
id: nmHandler
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function toggle() {
|
|
|
|
|
nmHandler.enableAirplaneMode(!PlasmaNM.Configuration.airplaneModeEnabled);
|
|
|
|
|
PlasmaNM.Configuration.airplaneModeEnabled = !PlasmaNM.Configuration.airplaneModeEnabled;
|
|
|
|
|
}
|
|
|
|
|
}
|