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
|
// /dataproviders
|
||||||
qmlRegisterSingletonType(resolvePath("dataproviders/AudioInfo.qml"), uri, 1, 0, "AudioInfo");
|
qmlRegisterSingletonType(resolvePath("dataproviders/AudioInfo.qml"), uri, 1, 0, "AudioInfo");
|
||||||
qmlRegisterSingletonType(resolvePath("dataproviders/BatteryInfo.qml"), uri, 1, 0, "BatteryInfo");
|
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");
|
qmlRegisterType(resolvePath("dataproviders/SignalStrengthInfo.qml"), uri, 1, 0, "SignalStrengthInfo");
|
||||||
|
|
||||||
// /homescreen
|
// /homescreen
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@
|
||||||
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
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 2.2
|
||||||
import QtQuick.Layouts 1.4
|
import QtQuick.Layouts 1.4
|
||||||
import org.kde.bluezqt 1.0 as BluezQt
|
import org.kde.bluezqt 1.0 as BluezQt
|
||||||
|
|
|
||||||
|
|
@ -10,16 +10,12 @@ import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import org.kde.kirigami 2.20 as Kirigami
|
import org.kde.kirigami 2.20 as Kirigami
|
||||||
import org.kde.bluezqt as BluezQt
|
import org.kde.plasma.private.mobileshell 1.0 as MobileShell
|
||||||
|
|
||||||
import "../../dataproviders" as DataProviders
|
|
||||||
|
|
||||||
Kirigami.Icon {
|
Kirigami.Icon {
|
||||||
id: connectionIcon
|
id: connectionIcon
|
||||||
|
|
||||||
readonly property var provider: DataProviders.BluetoothInfo {}
|
source: "network-bluetooth"
|
||||||
|
|
||||||
source: "network-bluetooth" // provider.icon
|
visible: MobileShell.BluetoothInfo.isVisible
|
||||||
|
|
||||||
visible: provider.isVisible
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue