shift-shell/quicksettings/airplanemode/contents/ui/main.qml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
741 B
QML
Raw Normal View History

/*
* 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
*/
import org.kde.plasma.private.mobileshell 1.0 as MobileShell
import org.kde.plasma.networkmanagement 0.2 as PlasmaNM
MobileShell.QuickSetting {
text: i18n("Airplane Mode")
icon: "network-flightmode-on"
status: ""
enabled: PlasmaNM.Configuration.airplaneModeEnabled
PlasmaNM.Handler {
id: nmHandler
}
function toggle() {
nmHandler.enableAirplaneMode(!PlasmaNM.Configuration.airplaneModeEnabled);
PlasmaNM.Configuration.airplaneModeEnabled = !PlasmaNM.Configuration.airplaneModeEnabled;
}
}