mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
statusbar: Rename WifiIndicator to InternetIndicator, and consolidate
This commit is contained in:
parent
5d1833699b
commit
0bc1607893
7 changed files with 32 additions and 44 deletions
|
|
@ -82,7 +82,6 @@ void MobileShellPlugin::registerTypes(const char *uri)
|
||||||
qmlRegisterSingletonType(resolvePath("dataproviders/BluetoothProvider.qml"), uri, 1, 0, "BluetoothProvider");
|
qmlRegisterSingletonType(resolvePath("dataproviders/BluetoothProvider.qml"), uri, 1, 0, "BluetoothProvider");
|
||||||
qmlRegisterSingletonType(resolvePath("dataproviders/SignalStrengthProvider.qml"), uri, 1, 0, "SignalStrengthProvider");
|
qmlRegisterSingletonType(resolvePath("dataproviders/SignalStrengthProvider.qml"), uri, 1, 0, "SignalStrengthProvider");
|
||||||
qmlRegisterSingletonType(resolvePath("dataproviders/VolumeProvider.qml"), uri, 1, 0, "VolumeProvider");
|
qmlRegisterSingletonType(resolvePath("dataproviders/VolumeProvider.qml"), uri, 1, 0, "VolumeProvider");
|
||||||
qmlRegisterSingletonType(resolvePath("dataproviders/WifiProvider.qml"), uri, 1, 0, "WifiProvider");
|
|
||||||
|
|
||||||
// /homescreen
|
// /homescreen
|
||||||
qmlRegisterType(resolvePath("homescreen/HomeScreen.qml"), uri, 1, 0, "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
|
* 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 {
|
Item {
|
||||||
|
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
/*
|
|
||||||
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
|
Layout.fillHeight: true
|
||||||
showLabel: false
|
showLabel: false
|
||||||
visible: root.showTime
|
visible: root.showTime
|
||||||
|
internetIndicator: internetIndicatorItem
|
||||||
}
|
}
|
||||||
Indicators.BluetoothIndicator {
|
Indicators.BluetoothIndicator {
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
}
|
}
|
||||||
Indicators.WifiIndicator {
|
Indicators.InternetIndicator {
|
||||||
|
id: internetIndicatorItem
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
}
|
}
|
||||||
Indicators.VolumeIndicator {
|
Indicators.VolumeIndicator {
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,31 @@ import org.kde.plasma.private.mobileshell 1.0 as MobileShell
|
||||||
|
|
||||||
PlasmaCore.IconItem {
|
PlasmaCore.IconItem {
|
||||||
id: connectionIcon
|
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
|
||||||
|
}
|
||||||
|
|
||||||
source: provider.icon
|
readonly property var networkModel: PlasmaNM.NetworkModel {
|
||||||
|
id: connectionModel
|
||||||
|
}
|
||||||
|
|
||||||
|
readonly property var handler: PlasmaNM.Handler {
|
||||||
|
id: handler
|
||||||
|
}
|
||||||
|
|
||||||
|
readonly property var connectionIcon: PlasmaNM.ConnectionIcon {
|
||||||
|
id: connectionIconProvider
|
||||||
|
}
|
||||||
|
|
||||||
|
// implementation
|
||||||
|
|
||||||
|
source: icon
|
||||||
colorGroup: PlasmaCore.ColorScope.colorGroup
|
colorGroup: PlasmaCore.ColorScope.colorGroup
|
||||||
|
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
@ -27,7 +49,7 @@ PlasmaCore.IconItem {
|
||||||
id: connectingIndicator
|
id: connectingIndicator
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
running: provider.indicatorRunning
|
running: connectionIcon.indicatorRunning
|
||||||
visible: running
|
visible: running
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -15,6 +15,8 @@ import org.kde.plasma.private.mobileshell 1.0 as MobileShell
|
||||||
Item {
|
Item {
|
||||||
property MobileShell.SignalStrengthProvider provider: MobileShell.SignalStrengthProvider
|
property MobileShell.SignalStrengthProvider provider: MobileShell.SignalStrengthProvider
|
||||||
|
|
||||||
|
required property InternetIndicator internetIndicator
|
||||||
|
|
||||||
property bool showLabel: true
|
property bool showLabel: true
|
||||||
property real textPixelSize: PlasmaCore.Units.gridUnit * 0.6
|
property real textPixelSize: PlasmaCore.Units.gridUnit * 0.6
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@
|
||||||
<file>qml/dataproviders/BluetoothProvider.qml</file>
|
<file>qml/dataproviders/BluetoothProvider.qml</file>
|
||||||
<file>qml/dataproviders/SignalStrengthProvider.qml</file>
|
<file>qml/dataproviders/SignalStrengthProvider.qml</file>
|
||||||
<file>qml/dataproviders/VolumeProvider.qml</file>
|
<file>qml/dataproviders/VolumeProvider.qml</file>
|
||||||
<file>qml/dataproviders/WifiProvider.qml</file>
|
|
||||||
|
|
||||||
<file>qml/homescreen/HomeScreen.qml</file>
|
<file>qml/homescreen/HomeScreen.qml</file>
|
||||||
|
|
||||||
|
|
@ -57,7 +56,7 @@
|
||||||
<file>qml/statusbar/indicators/BluetoothIndicator.qml</file>
|
<file>qml/statusbar/indicators/BluetoothIndicator.qml</file>
|
||||||
<file>qml/statusbar/indicators/SignalStrengthIndicator.qml</file>
|
<file>qml/statusbar/indicators/SignalStrengthIndicator.qml</file>
|
||||||
<file>qml/statusbar/indicators/VolumeIndicator.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/ClockText.qml</file>
|
||||||
<file>qml/statusbar/StatusBar.qml</file>
|
<file>qml/statusbar/StatusBar.qml</file>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue