Commit 0bc16078 authored by Devin Lin's avatar Devin Lin 🎨
Browse files

statusbar: Rename WifiIndicator to InternetIndicator, and consolidate

parent 5d183369
......@@ -82,7 +82,6 @@ void MobileShellPlugin::registerTypes(const char *uri)
qmlRegisterSingletonType(resolvePath("dataproviders/BluetoothProvider.qml"), uri, 1, 0, "BluetoothProvider");
qmlRegisterSingletonType(resolvePath("dataproviders/SignalStrengthProvider.qml"), uri, 1, 0, "SignalStrengthProvider");
qmlRegisterSingletonType(resolvePath("dataproviders/VolumeProvider.qml"), uri, 1, 0, "VolumeProvider");
qmlRegisterSingletonType(resolvePath("dataproviders/WifiProvider.qml"), uri, 1, 0, "WifiProvider");
// /homescreen
qmlRegisterType(resolvePath("homescreen/HomeScreen.qml"), uri, 1, 0, "HomeScreen");
......
......@@ -5,7 +5,7 @@ import QtQuick 2.15
/**
* Serves a similar function as a QQC2.Control, but does not
* take input events, preventing conflicts with Flickable.
* take touch input events, preventing conflicts with Flickable.
*/
Item {
......
/*
SPDX-FileCopyrightText: 2021 Devin Lin <devin@kde.org>
SPDX-FileCopyrightText: 2019 Marco Martin <mart@kde.org>
SPDX-FileCopyrightText: 2013-2017 Jan Grulich <jgrulich@redhat.com>
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
import QtQuick 2.2
import QtQuick.Layouts 1.4
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.networkmanagement 0.2 as PlasmaNM
pragma Singleton
QtObject {
property string icon: connectionIconProvider.connectionIcon
property bool indicatorRunning: connectionIconProvider.connecting
property var networkStatus: PlasmaNM.NetworkStatus {
id: networkStatus
}
property var networkModel: PlasmaNM.NetworkModel {
id: connectionModel
}
property var handler: PlasmaNM.Handler {
id: handler
}
property var connectionIcon: PlasmaNM.ConnectionIcon {
id: connectionIconProvider
}
}
......@@ -179,11 +179,13 @@ Item {
Layout.fillHeight: true
showLabel: false
visible: root.showTime
internetIndicator: internetIndicatorItem
}
Indicators.BluetoothIndicator {
Layout.fillHeight: true
}
Indicators.WifiIndicator {
Indicators.InternetIndicator {
id: internetIndicatorItem
Layout.fillHeight: true
}
Indicators.VolumeIndicator {
......
......@@ -15,9 +15,31 @@ import org.kde.plasma.private.mobileshell 1.0 as MobileShell
PlasmaCore.IconItem {
id: connectionIcon
property MobileShell.WifiProvider provider: MobileShell.WifiProvider
// data
readonly property string icon: connectionIconProvider.connectionIcon
readonly property bool indicatorRunning: connectionIconProvider.connecting
readonly property var networkStatus: PlasmaNM.NetworkStatus {
id: networkStatus
}
readonly property var networkModel: PlasmaNM.NetworkModel {
id: connectionModel
}
source: provider.icon
readonly property var handler: PlasmaNM.Handler {
id: handler
}
readonly property var connectionIcon: PlasmaNM.ConnectionIcon {
id: connectionIconProvider
}
// implementation
source: icon
colorGroup: PlasmaCore.ColorScope.colorGroup
Layout.fillHeight: true
......@@ -27,7 +49,7 @@ PlasmaCore.IconItem {
id: connectingIndicator
anchors.fill: parent
running: provider.indicatorRunning
running: connectionIcon.indicatorRunning
visible: running
}
}
......@@ -15,6 +15,8 @@ import org.kde.plasma.private.mobileshell 1.0 as MobileShell
Item {
property MobileShell.SignalStrengthProvider provider: MobileShell.SignalStrengthProvider
required property InternetIndicator internetIndicator
property bool showLabel: true
property real textPixelSize: PlasmaCore.Units.gridUnit * 0.6
......
......@@ -36,7 +36,6 @@
<file>qml/dataproviders/BluetoothProvider.qml</file>
<file>qml/dataproviders/SignalStrengthProvider.qml</file>
<file>qml/dataproviders/VolumeProvider.qml</file>
<file>qml/dataproviders/WifiProvider.qml</file>
<file>qml/homescreen/HomeScreen.qml</file>
......@@ -57,7 +56,7 @@
<file>qml/statusbar/indicators/BluetoothIndicator.qml</file>
<file>qml/statusbar/indicators/SignalStrengthIndicator.qml</file>
<file>qml/statusbar/indicators/VolumeIndicator.qml</file>
<file>qml/statusbar/indicators/WifiIndicator.qml</file>
<file>qml/statusbar/indicators/InternetIndicator.qml</file>
<file>qml/statusbar/ClockText.qml</file>
<file>qml/statusbar/StatusBar.qml</file>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment