2023-03-14 02:09:23 +00:00
|
|
|
// SPDX-FileCopyrightText: 2021-2022 Devin Lin <devin@kde.org>
|
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2023-03-14 01:45:47 +00:00
|
|
|
|
2023-09-21 16:48:48 +00:00
|
|
|
import QtQuick
|
|
|
|
|
import QtQuick.Layouts
|
|
|
|
|
import QtQuick.Controls as Controls
|
2023-03-14 01:45:47 +00:00
|
|
|
|
2023-09-21 16:48:48 +00:00
|
|
|
import org.kde.kirigami 2 as Kirigami
|
2023-06-06 19:31:58 +00:00
|
|
|
import org.kde.kcmutils
|
2023-09-21 16:48:48 +00:00
|
|
|
import org.kde.kirigamiaddons.formcard 1 as FormCard
|
2023-03-14 01:45:47 +00:00
|
|
|
|
2023-09-21 16:48:48 +00:00
|
|
|
import cellularnetworkkcm
|
2023-03-14 01:45:47 +00:00
|
|
|
|
2023-09-21 16:48:48 +00:00
|
|
|
FormCard.FormCardPage {
|
2023-03-14 01:45:47 +00:00
|
|
|
id: modemPage
|
2023-09-21 16:48:48 +00:00
|
|
|
|
2023-03-14 01:45:47 +00:00
|
|
|
property Modem modem
|
|
|
|
|
property bool showExtra: false
|
2023-09-21 16:48:48 +00:00
|
|
|
|
|
|
|
|
title: i18n("Modem %1", modem.displayId)
|
|
|
|
|
|
|
|
|
|
MessagesList {
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
Layout.margins: Kirigami.Units.smallSpacing
|
|
|
|
|
visible: count != 0
|
|
|
|
|
model: kcm.messages
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FormCard.FormHeader {
|
|
|
|
|
title: i18n("Modem Control")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FormCard.FormCard {
|
|
|
|
|
FormCard.FormButtonDelegate {
|
|
|
|
|
id: modemRestartButton
|
|
|
|
|
text: i18n("Force Modem Restart")
|
|
|
|
|
onClicked: modem.reset()
|
2023-03-14 01:45:47 +00:00
|
|
|
}
|
2023-09-21 16:48:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FormCard.FormHeader {
|
|
|
|
|
title: i18n("Modem Details")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FormCard.FormCard {
|
|
|
|
|
FormCard.AbstractFormDelegate {
|
|
|
|
|
id: accessTechnologiesText
|
|
|
|
|
|
|
|
|
|
background: null
|
2023-03-14 01:45:47 +00:00
|
|
|
contentItem: ColumnLayout {
|
2023-09-21 16:48:48 +00:00
|
|
|
Layout.fillWidth: true
|
|
|
|
|
spacing: Kirigami.Units.smallSpacing
|
|
|
|
|
Controls.Label {
|
2023-03-14 01:45:47 +00:00
|
|
|
Layout.fillWidth: true
|
2023-09-21 16:48:48 +00:00
|
|
|
text: i18n("Access Technologies")
|
|
|
|
|
elide: Text.ElideRight
|
|
|
|
|
}
|
|
|
|
|
Repeater {
|
|
|
|
|
model: modem.details.accessTechnologies
|
|
|
|
|
Controls.Label {
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
text: modelData
|
|
|
|
|
color: Kirigami.Theme.disabledTextColor
|
|
|
|
|
font: Kirigami.Theme.smallFont
|
|
|
|
|
elide: Text.ElideRight
|
2023-03-14 01:45:47 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-09-21 16:48:48 +00:00
|
|
|
|
|
|
|
|
FormCard.FormDelegateSeparator {}
|
|
|
|
|
|
|
|
|
|
FormCard.FormTextDelegate {
|
|
|
|
|
id: imeiText
|
|
|
|
|
text: i18n("IMEI")
|
|
|
|
|
description: modem.details.equipmentIdentifier
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FormCard.FormDelegateSeparator {}
|
|
|
|
|
|
|
|
|
|
FormCard.FormTextDelegate {
|
|
|
|
|
id: enabledText
|
|
|
|
|
text: i18n("Enabled")
|
|
|
|
|
description: modem.details.isEnabled
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FormCard.FormDelegateSeparator {}
|
|
|
|
|
|
|
|
|
|
FormCard.FormTextDelegate {
|
|
|
|
|
id: manufacturerText
|
|
|
|
|
text: i18n("Manufacturer")
|
|
|
|
|
description: modem.details.manufacturer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FormCard.FormDelegateSeparator {}
|
|
|
|
|
|
|
|
|
|
FormCard.FormTextDelegate {
|
|
|
|
|
id: modelText
|
|
|
|
|
text: i18n("Model")
|
|
|
|
|
description: modem.details.model
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FormCard.FormDelegateSeparator {}
|
|
|
|
|
|
|
|
|
|
FormCard.AbstractFormDelegate {
|
|
|
|
|
id: ownedNumbersText
|
|
|
|
|
|
|
|
|
|
background: null
|
2023-03-14 01:45:47 +00:00
|
|
|
contentItem: ColumnLayout {
|
2023-09-21 16:48:48 +00:00
|
|
|
spacing: Kirigami.Units.smallSpacing
|
|
|
|
|
|
|
|
|
|
Controls.Label {
|
2023-03-14 01:45:47 +00:00
|
|
|
Layout.fillWidth: true
|
2023-09-21 16:48:48 +00:00
|
|
|
text: i18n("Owned Numbers:")
|
|
|
|
|
elide: Text.ElideRight
|
2023-03-14 01:45:47 +00:00
|
|
|
}
|
2023-09-21 16:48:48 +00:00
|
|
|
|
|
|
|
|
Repeater {
|
|
|
|
|
model: modem.details.ownNumbers
|
|
|
|
|
Controls.Label {
|
2023-03-14 01:45:47 +00:00
|
|
|
Layout.fillWidth: true
|
2023-09-21 16:48:48 +00:00
|
|
|
text: modelData
|
|
|
|
|
color: Kirigami.Theme.disabledTextColor
|
|
|
|
|
font: Kirigami.Theme.smallFont
|
|
|
|
|
elide: Text.ElideRight
|
2023-03-14 01:45:47 +00:00
|
|
|
}
|
|
|
|
|
}
|
2023-09-21 16:48:48 +00:00
|
|
|
}
|
|
|
|
|
}
|
2023-03-14 01:45:47 +00:00
|
|
|
|
2023-09-21 16:48:48 +00:00
|
|
|
FormCard.FormDelegateSeparator {}
|
|
|
|
|
|
|
|
|
|
FormCard.FormTextDelegate {
|
|
|
|
|
id: revisionText
|
|
|
|
|
text: i18n("Revision")
|
|
|
|
|
description: modem.details.revision
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FormCard.FormDelegateSeparator {}
|
|
|
|
|
|
|
|
|
|
FormCard.FormTextDelegate {
|
|
|
|
|
id: signalQualityText
|
|
|
|
|
text: i18n("Signal Quality")
|
|
|
|
|
description: modem.details.signalQuality
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FormCard.FormDelegateSeparator {}
|
|
|
|
|
|
|
|
|
|
FormCard.FormTextDelegate {
|
|
|
|
|
id: stateText
|
|
|
|
|
text: i18n("State")
|
|
|
|
|
description: modem.details.state
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FormCard.FormDelegateSeparator {}
|
|
|
|
|
|
|
|
|
|
FormCard.FormTextDelegate {
|
|
|
|
|
id: failureReasonText
|
|
|
|
|
text: i18n("Failure Reason")
|
|
|
|
|
description: modem.details.stateFailedReason
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FormCard.FormDelegateSeparator {}
|
|
|
|
|
|
|
|
|
|
FormCard.FormTextDelegate {
|
|
|
|
|
id: registrationStateText
|
|
|
|
|
text: i18n("Registration State")
|
|
|
|
|
description: modem.details.registrationState
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FormCard.FormDelegateSeparator {}
|
|
|
|
|
|
|
|
|
|
FormCard.FormTextDelegate {
|
|
|
|
|
id: roamingText
|
|
|
|
|
text: i18n("Roaming")
|
|
|
|
|
description: modem.isRoaming ? i18n("Yes") : i18n("No")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FormCard.FormDelegateSeparator {}
|
|
|
|
|
|
|
|
|
|
FormCard.FormTextDelegate {
|
|
|
|
|
id: firmwareVersionText
|
|
|
|
|
text: i18n("Firmware Version")
|
|
|
|
|
description: modem.details.firmwareVersion
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FormCard.FormDelegateSeparator {}
|
|
|
|
|
|
|
|
|
|
FormCard.FormTextDelegate {
|
|
|
|
|
id: interfaceNameText
|
|
|
|
|
text: i18n("Interface Name")
|
|
|
|
|
description: modem.details.interfaceName
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FormCard.FormDelegateSeparator {}
|
|
|
|
|
|
|
|
|
|
FormCard.FormTextDelegate {
|
|
|
|
|
id: meteredText
|
|
|
|
|
text: i18n("Metered")
|
|
|
|
|
description: modem.details.metered
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FormCard.FormDelegateSeparator {}
|
|
|
|
|
|
|
|
|
|
FormCard.FormTextDelegate {
|
|
|
|
|
id: activeNMConnectionText
|
|
|
|
|
text: i18n("Active NetworkManager Connection")
|
|
|
|
|
description: modem.activeConnectionUni
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FormCard.FormDelegateSeparator {}
|
|
|
|
|
|
|
|
|
|
FormCard.FormTextDelegate {
|
|
|
|
|
id: deviceText
|
|
|
|
|
text: i18n("Device")
|
|
|
|
|
description: modem.details.device
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FormCard.FormDelegateSeparator {}
|
|
|
|
|
|
|
|
|
|
FormCard.FormTextDelegate {
|
|
|
|
|
id: deviceIdText
|
|
|
|
|
text: i18n("Device ID")
|
|
|
|
|
description: modem.details.deviceIdentifier
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FormCard.FormDelegateSeparator {}
|
|
|
|
|
|
|
|
|
|
FormCard.AbstractFormDelegate {
|
|
|
|
|
id: driversText
|
|
|
|
|
|
|
|
|
|
background: null
|
|
|
|
|
contentItem: ColumnLayout {
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
spacing: Kirigami.Units.smallSpacing
|
|
|
|
|
Controls.Label {
|
2023-03-14 01:45:47 +00:00
|
|
|
Layout.fillWidth: true
|
2023-09-21 16:48:48 +00:00
|
|
|
text: i18n("Drivers:")
|
|
|
|
|
elide: Text.ElideRight
|
|
|
|
|
}
|
|
|
|
|
Repeater {
|
|
|
|
|
model: modem.details.drivers
|
|
|
|
|
Controls.Label {
|
2023-03-14 01:45:47 +00:00
|
|
|
Layout.fillWidth: true
|
2023-09-21 16:48:48 +00:00
|
|
|
text: modelData
|
|
|
|
|
color: Kirigami.Theme.disabledTextColor
|
|
|
|
|
font: Kirigami.Theme.smallFont
|
|
|
|
|
elide: Text.ElideRight
|
2023-03-14 01:45:47 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-09-21 16:48:48 +00:00
|
|
|
|
|
|
|
|
FormCard.FormDelegateSeparator {}
|
|
|
|
|
|
|
|
|
|
FormCard.FormTextDelegate {
|
|
|
|
|
id: pluginText
|
|
|
|
|
text: i18n("Plugin")
|
|
|
|
|
description: modem.details.plugin
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FormCard.FormDelegateSeparator {}
|
|
|
|
|
|
|
|
|
|
FormCard.FormTextDelegate {
|
|
|
|
|
id: powerStateText
|
|
|
|
|
text: i18n("Power State")
|
|
|
|
|
description: modem.details.powerState
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FormCard.FormDelegateSeparator {}
|
|
|
|
|
|
|
|
|
|
FormCard.FormTextDelegate {
|
|
|
|
|
id: simPathText
|
|
|
|
|
text: i18n("SIM Path")
|
|
|
|
|
description: modem.details.simPath
|
|
|
|
|
}
|
2023-03-14 01:45:47 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|