mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
dataproviders: declare BluetoothInfo as Singleton
This commit is contained in:
parent
72657628b6
commit
3ca9dab083
3 changed files with 6 additions and 8 deletions
|
|
@ -62,7 +62,7 @@ void MobileShellPlugin::registerTypes(const char *uri)
|
|||
// /dataproviders
|
||||
qmlRegisterSingletonType(resolvePath("dataproviders/AudioInfo.qml"), uri, 1, 0, "AudioInfo");
|
||||
qmlRegisterSingletonType(resolvePath("dataproviders/BatteryInfo.qml"), uri, 1, 0, "BatteryInfo");
|
||||
qmlRegisterType(resolvePath("dataproviders/BluetoothInfo.qml"), uri, 1, 0, "BluetoothInfo");
|
||||
qmlRegisterSingletonType(resolvePath("dataproviders/BluetoothInfo.qml"), uri, 1, 0, "BluetoothInfo");
|
||||
qmlRegisterType(resolvePath("dataproviders/SignalStrengthInfo.qml"), uri, 1, 0, "SignalStrengthInfo");
|
||||
|
||||
// /homescreen
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||
*/
|
||||
|
||||
pragma Singleton
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Layouts 1.4
|
||||
import org.kde.bluezqt 1.0 as BluezQt
|
||||
|
|
|
|||
|
|
@ -10,16 +10,12 @@ import QtQuick
|
|||
import QtQuick.Layouts
|
||||
|
||||
import org.kde.kirigami 2.20 as Kirigami
|
||||
import org.kde.bluezqt as BluezQt
|
||||
|
||||
import "../../dataproviders" as DataProviders
|
||||
import org.kde.plasma.private.mobileshell 1.0 as MobileShell
|
||||
|
||||
Kirigami.Icon {
|
||||
id: connectionIcon
|
||||
|
||||
readonly property var provider: DataProviders.BluetoothInfo {}
|
||||
source: "network-bluetooth"
|
||||
|
||||
source: "network-bluetooth" // provider.icon
|
||||
|
||||
visible: provider.isVisible
|
||||
visible: MobileShell.BluetoothInfo.isVisible
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue