Warning, /plasma/plasma-mobile/kcms/cellularnetwork/ui/ModemPage.qml is written in an unsupported language. File is not indexed.

0001 // SPDX-FileCopyrightText: 2021-2022 Devin Lin <devin@kde.org>
0002 // SPDX-License-Identifier: GPL-2.0-or-later
0003 
0004 import QtQuick
0005 import QtQuick.Layouts
0006 import QtQuick.Controls as Controls
0007 
0008 import org.kde.kirigami 2 as Kirigami
0009 import org.kde.kcmutils
0010 import org.kde.kirigamiaddons.formcard 1 as FormCard
0011 
0012 import cellularnetworkkcm
0013 
0014 FormCard.FormCardPage {
0015     id: modemPage
0016 
0017     property Modem modem
0018     property bool showExtra: false
0019 
0020     title: i18n("Modem %1", modem.displayId)
0021 
0022     MessagesList {
0023         Layout.fillWidth: true
0024         Layout.margins: Kirigami.Units.smallSpacing
0025         visible: count != 0
0026         model: kcm.messages
0027     }
0028 
0029     FormCard.FormHeader {
0030         title: i18n("Modem Control")
0031     }
0032 
0033     FormCard.FormCard {
0034         FormCard.FormButtonDelegate {
0035             id: modemRestartButton
0036             text: i18n("Force Modem Restart")
0037             onClicked: modem.reset()
0038         }
0039     }
0040 
0041     FormCard.FormHeader {
0042         title: i18n("Modem Details")
0043     }
0044 
0045     FormCard.FormCard {
0046         FormCard.AbstractFormDelegate {
0047             id: accessTechnologiesText
0048 
0049             background: null
0050             contentItem: ColumnLayout {
0051                 Layout.fillWidth: true
0052                 spacing: Kirigami.Units.smallSpacing
0053                 Controls.Label {
0054                     Layout.fillWidth: true
0055                     text: i18n("Access Technologies")
0056                     elide: Text.ElideRight
0057                 }
0058                 Repeater {
0059                     model: modem.details.accessTechnologies
0060                     Controls.Label {
0061                         Layout.fillWidth: true
0062                         text: modelData
0063                         color: Kirigami.Theme.disabledTextColor
0064                         font: Kirigami.Theme.smallFont
0065                         elide: Text.ElideRight
0066                     }
0067                 }
0068             }
0069         }
0070 
0071         FormCard.FormDelegateSeparator {}
0072 
0073         FormCard.FormTextDelegate {
0074             id: imeiText
0075             text: i18n("IMEI")
0076             description: modem.details.equipmentIdentifier
0077         }
0078 
0079         FormCard.FormDelegateSeparator {}
0080 
0081         FormCard.FormTextDelegate {
0082             id: enabledText
0083             text: i18n("Enabled")
0084             description: modem.details.isEnabled
0085         }
0086 
0087         FormCard.FormDelegateSeparator {}
0088 
0089         FormCard.FormTextDelegate {
0090             id: manufacturerText
0091             text: i18n("Manufacturer")
0092             description: modem.details.manufacturer
0093         }
0094 
0095         FormCard.FormDelegateSeparator {}
0096 
0097         FormCard.FormTextDelegate {
0098             id: modelText
0099             text: i18n("Model")
0100             description: modem.details.model
0101         }
0102 
0103         FormCard.FormDelegateSeparator {}
0104 
0105         FormCard.AbstractFormDelegate {
0106             id: ownedNumbersText
0107 
0108             background: null
0109             contentItem: ColumnLayout {
0110                 spacing: Kirigami.Units.smallSpacing
0111 
0112                 Controls.Label {
0113                     Layout.fillWidth: true
0114                     text: i18n("Owned Numbers:")
0115                     elide: Text.ElideRight
0116                 }
0117 
0118                 Repeater {
0119                     model: modem.details.ownNumbers
0120                     Controls.Label {
0121                         Layout.fillWidth: true
0122                         text: modelData
0123                         color: Kirigami.Theme.disabledTextColor
0124                         font: Kirigami.Theme.smallFont
0125                         elide: Text.ElideRight
0126                     }
0127                 }
0128             }
0129         }
0130 
0131         FormCard.FormDelegateSeparator {}
0132 
0133         FormCard.FormTextDelegate {
0134             id: revisionText
0135             text: i18n("Revision")
0136             description: modem.details.revision
0137         }
0138 
0139         FormCard.FormDelegateSeparator {}
0140 
0141         FormCard.FormTextDelegate {
0142             id: signalQualityText
0143             text: i18n("Signal Quality")
0144             description: modem.details.signalQuality
0145         }
0146 
0147         FormCard.FormDelegateSeparator {}
0148 
0149         FormCard.FormTextDelegate {
0150             id: stateText
0151             text: i18n("State")
0152             description: modem.details.state
0153         }
0154 
0155         FormCard.FormDelegateSeparator {}
0156 
0157         FormCard.FormTextDelegate {
0158             id: failureReasonText
0159             text: i18n("Failure Reason")
0160             description: modem.details.stateFailedReason
0161         }
0162 
0163         FormCard.FormDelegateSeparator {}
0164 
0165         FormCard.FormTextDelegate {
0166             id: registrationStateText
0167             text: i18n("Registration State")
0168             description: modem.details.registrationState
0169         }
0170 
0171         FormCard.FormDelegateSeparator {}
0172 
0173         FormCard.FormTextDelegate {
0174             id: roamingText
0175             text: i18n("Roaming")
0176             description: modem.isRoaming ? i18n("Yes") : i18n("No")
0177         }
0178 
0179         FormCard.FormDelegateSeparator {}
0180 
0181         FormCard.FormTextDelegate {
0182             id: firmwareVersionText
0183             text: i18n("Firmware Version")
0184             description: modem.details.firmwareVersion
0185         }
0186 
0187         FormCard.FormDelegateSeparator {}
0188 
0189         FormCard.FormTextDelegate {
0190             id: interfaceNameText
0191             text: i18n("Interface Name")
0192             description: modem.details.interfaceName
0193         }
0194 
0195         FormCard.FormDelegateSeparator {}
0196 
0197         FormCard.FormTextDelegate {
0198             id: meteredText
0199             text: i18n("Metered")
0200             description: modem.details.metered
0201         }
0202 
0203         FormCard.FormDelegateSeparator {}
0204 
0205         FormCard.FormTextDelegate {
0206             id: activeNMConnectionText
0207             text: i18n("Active NetworkManager Connection")
0208             description: modem.activeConnectionUni
0209         }
0210 
0211         FormCard.FormDelegateSeparator {}
0212 
0213         FormCard.FormTextDelegate {
0214             id: deviceText
0215             text: i18n("Device")
0216             description: modem.details.device
0217         }
0218 
0219         FormCard.FormDelegateSeparator {}
0220 
0221         FormCard.FormTextDelegate {
0222             id: deviceIdText
0223             text: i18n("Device ID")
0224             description: modem.details.deviceIdentifier
0225         }
0226 
0227         FormCard.FormDelegateSeparator {}
0228 
0229         FormCard.AbstractFormDelegate {
0230             id: driversText
0231 
0232             background: null
0233             contentItem: ColumnLayout {
0234                 Layout.fillWidth: true
0235                 spacing: Kirigami.Units.smallSpacing
0236                 Controls.Label {
0237                     Layout.fillWidth: true
0238                     text: i18n("Drivers:")
0239                     elide: Text.ElideRight
0240                 }
0241                 Repeater {
0242                     model: modem.details.drivers
0243                     Controls.Label {
0244                         Layout.fillWidth: true
0245                         text: modelData
0246                         color: Kirigami.Theme.disabledTextColor
0247                         font: Kirigami.Theme.smallFont
0248                         elide: Text.ElideRight
0249                     }
0250                 }
0251             }
0252         }
0253 
0254         FormCard.FormDelegateSeparator {}
0255 
0256         FormCard.FormTextDelegate {
0257             id: pluginText
0258             text: i18n("Plugin")
0259             description: modem.details.plugin
0260         }
0261 
0262         FormCard.FormDelegateSeparator {}
0263 
0264         FormCard.FormTextDelegate {
0265             id: powerStateText
0266             text: i18n("Power State")
0267             description: modem.details.powerState
0268         }
0269 
0270         FormCard.FormDelegateSeparator {}
0271 
0272         FormCard.FormTextDelegate {
0273             id: simPathText
0274             text: i18n("SIM Path")
0275             description: modem.details.simPath
0276         }
0277     }
0278 }
0279