2025-03-23 03:55:04 +00:00
|
|
|
/*
|
|
|
|
|
* SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
|
|
|
|
|
* SPDX-FileCopyrightText: 2024-2025 Micah Stanley <stanleymicah@proton.me>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import QtQuick
|
|
|
|
|
import org.kde.plasma.private.mobileshell as MobileShell
|
|
|
|
|
|
|
|
|
|
pragma Singleton
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* This wraps the popup components so that we can avoid loading side
|
|
|
|
|
* effects from imports (since this is a singleton and initialized immediately on import).
|
|
|
|
|
*/
|
|
|
|
|
Item {
|
|
|
|
|
id: root
|
|
|
|
|
|
|
|
|
|
// WARNING: only call this load from within the plasmashell process, because
|
|
|
|
|
// multiple bindings of the shortcut may break it entirely (hardware volume keys)
|
|
|
|
|
function load() {
|
2025-06-25 16:20:12 +00:00
|
|
|
if (!volumeOSD.active) {
|
|
|
|
|
volumeOSD.active = true;
|
|
|
|
|
}
|
2025-08-06 12:34:45 +00:00
|
|
|
if (!kscreenOSD.active) {
|
|
|
|
|
kscreenOSD.active = true;
|
|
|
|
|
}
|
2025-06-25 16:20:12 +00:00
|
|
|
if (!notifications.active) {
|
|
|
|
|
notifications.active = true;
|
|
|
|
|
}
|
|
|
|
|
if (!actionButtons.active) {
|
|
|
|
|
actionButtons.active = true;
|
|
|
|
|
}
|
2025-03-23 03:55:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Loader {
|
|
|
|
|
id: volumeOSD
|
|
|
|
|
sourceComponent: Component {
|
|
|
|
|
MobileShell.VolumeOSDProvider {}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-06 12:34:45 +00:00
|
|
|
Loader {
|
|
|
|
|
id: kscreenOSD
|
|
|
|
|
sourceComponent: Component {
|
|
|
|
|
MobileShell.KScreenOSDProvider {}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-23 03:55:04 +00:00
|
|
|
Loader {
|
|
|
|
|
id: notifications
|
|
|
|
|
sourceComponent: Component {
|
|
|
|
|
MobileShell.NotificationPopupProvider {}
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-04-21 22:09:14 +00:00
|
|
|
|
|
|
|
|
Loader {
|
|
|
|
|
id: actionButtons
|
|
|
|
|
sourceComponent: Component {
|
|
|
|
|
MobileShell.ActionButtonsProvider {}
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-03-23 03:55:04 +00:00
|
|
|
}
|