mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-27 14:33:08 +00:00
The eventual goal is to have as few singletons with state as possible in the mobileshell component when it is imported into components such as the lockscreen. This doesn't fully accomplish it, but moves the audio provider singleton to MobileShellState, which will eventually need to be prevented from importing into non plasmashell processes. This also disables the sound feedback when changing volume, since it can be a source of lag when showing the applet.
24 lines
777 B
QML
24 lines
777 B
QML
/*
|
|
* SPDX-FileCopyrightText: 2021 Devin Lin <devin@kde.org>
|
|
* SPDX-FileCopyrightText: 2019 Marco Martin <mart@kde.org>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
|
|
import org.kde.plasma.core as PlasmaCore
|
|
import org.kde.plasma.plasma5support as P5Support
|
|
import org.kde.plasma.workspace.components as PW
|
|
|
|
QtObject {
|
|
property bool isVisible: pmSource.data["Battery"]["Has Cumulative"]
|
|
property int percent: pmSource.data["Battery"]["Percent"]
|
|
property bool pluggedIn: pmSource.data["AC Adapter"] ? pmSource.data["AC Adapter"]["Plugged in"] : false
|
|
|
|
property P5Support.DataSource pmSource: P5Support.DataSource {
|
|
engine: "powermanagement"
|
|
connectedSources: ["Battery", "AC Adapter"]
|
|
}
|
|
}
|