2019-10-07 16:49:18 +00:00
|
|
|
/*
|
2021-04-09 20:59:05 +00:00
|
|
|
SPDX-FileCopyrightText: 2021 Devin Lin <espidev@gmail.com>
|
2021-03-01 20:03:25 +00:00
|
|
|
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
|
2019-10-07 16:49:18 +00:00
|
|
|
*/
|
|
|
|
|
|
2023-03-18 19:28:17 +00:00
|
|
|
import QtQuick
|
|
|
|
|
import QtQuick.Layouts
|
2023-09-21 19:02:47 +00:00
|
|
|
import QtQuick.Controls as QQC2
|
2023-09-23 23:27:13 +00:00
|
|
|
import org.kde.plasma.networkmanagement as PlasmaNM
|
2023-07-25 02:24:10 +00:00
|
|
|
import org.kde.kirigami as Kirigami
|
2021-04-09 20:59:05 +00:00
|
|
|
|
2023-07-25 02:24:10 +00:00
|
|
|
Kirigami.Icon {
|
2019-10-07 16:49:18 +00:00
|
|
|
id: connectionIcon
|
2023-09-21 19:02:47 +00:00
|
|
|
|
2022-08-14 15:34:46 +00:00
|
|
|
// data
|
2023-09-21 19:02:47 +00:00
|
|
|
|
2024-04-27 19:40:48 +00:00
|
|
|
readonly property string icon: wirelessStatus.hotspotSSID.length !== 0 ? "network-wireless-hotspot" : connectionIconProvider.connectionIcon
|
2022-08-14 15:34:46 +00:00
|
|
|
readonly property bool indicatorRunning: connectionIconProvider.connecting
|
2023-09-21 19:02:47 +00:00
|
|
|
|
2022-08-14 15:34:46 +00:00
|
|
|
readonly property var networkStatus: PlasmaNM.NetworkStatus {
|
|
|
|
|
id: networkStatus
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
readonly property var networkModel: PlasmaNM.NetworkModel {
|
|
|
|
|
id: connectionModel
|
|
|
|
|
}
|
2019-10-07 16:49:18 +00:00
|
|
|
|
2022-08-14 15:34:46 +00:00
|
|
|
readonly property var handler: PlasmaNM.Handler {
|
|
|
|
|
id: handler
|
|
|
|
|
}
|
|
|
|
|
|
2024-05-03 17:58:36 +00:00
|
|
|
readonly property var wirelessStatus: PlasmaNM.WirelessStatus {
|
|
|
|
|
id: wirelessStatus
|
|
|
|
|
}
|
|
|
|
|
|
2022-08-14 15:34:46 +00:00
|
|
|
readonly property var connectionIcon: PlasmaNM.ConnectionIcon {
|
|
|
|
|
id: connectionIconProvider
|
|
|
|
|
}
|
2023-09-21 19:02:47 +00:00
|
|
|
|
2022-08-14 15:34:46 +00:00
|
|
|
// implementation
|
|
|
|
|
source: icon
|
2019-10-07 16:49:18 +00:00
|
|
|
|
2023-09-21 19:02:47 +00:00
|
|
|
QQC2.BusyIndicator {
|
2019-10-07 16:49:18 +00:00
|
|
|
id: connectingIndicator
|
|
|
|
|
|
|
|
|
|
anchors.fill: parent
|
2022-08-14 15:34:46 +00:00
|
|
|
running: connectionIcon.indicatorRunning
|
2019-10-07 16:49:18 +00:00
|
|
|
visible: running
|
|
|
|
|
}
|
|
|
|
|
}
|