mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
hotspot-kcm: Port to FormCard
This commit is contained in:
parent
69dc189941
commit
dc047a0eb9
1 changed files with 35 additions and 42 deletions
|
|
@ -9,35 +9,33 @@ import QtQuick.Controls as Controls
|
||||||
import org.kde.plasma.networkmanagement as PlasmaNM
|
import org.kde.plasma.networkmanagement as PlasmaNM
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.kcmutils
|
import org.kde.kcmutils
|
||||||
import org.kde.kirigamiaddons.labs.mobileform as MobileForm
|
import org.kde.kirigamiaddons.formcard as FormCard
|
||||||
|
|
||||||
SimpleKCM {
|
SimpleKCM {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
leftPadding: 0
|
leftPadding: 0
|
||||||
rightPadding: 0
|
rightPadding: 0
|
||||||
topPadding: Kirigami.Units.gridUnit
|
topPadding: 0
|
||||||
bottomPadding: Kirigami.Units.gridUnit
|
bottomPadding: 0
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
spacing: 0
|
|
||||||
width: root.width
|
|
||||||
|
|
||||||
|
data: [
|
||||||
PlasmaNM.Handler {
|
PlasmaNM.Handler {
|
||||||
id: handler
|
id: handler
|
||||||
}
|
},
|
||||||
|
|
||||||
PlasmaNM.WirelessStatus {
|
PlasmaNM.WirelessStatus {
|
||||||
id: wirelessStatus
|
id: wirelessStatus
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
|
||||||
MobileForm.FormCard {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
contentItem: ColumnLayout {
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
MobileForm.FormSwitchDelegate {
|
FormCard.FormCard {
|
||||||
|
Layout.topMargin: Kirigami.Units.gridUnit
|
||||||
|
|
||||||
|
FormCard.FormSwitchDelegate {
|
||||||
id: hotspotToggle
|
id: hotspotToggle
|
||||||
text: i18n("Hotspot")
|
text: i18n("Hotspot")
|
||||||
description: i18n("Whether the wireless hotspot is enabled.");
|
description: i18n("Whether the wireless hotspot is enabled.");
|
||||||
|
|
@ -53,25 +51,21 @@ SimpleKCM {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
MobileForm.FormCard {
|
FormCard.FormCard {
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.topMargin: Kirigami.Units.gridUnit
|
Layout.topMargin: Kirigami.Units.gridUnit
|
||||||
|
Layout.bottomMargin: Kirigami.Units.gridUnit
|
||||||
|
|
||||||
contentItem: ColumnLayout {
|
FormCard.FormTextFieldDelegate {
|
||||||
spacing: 0
|
|
||||||
|
|
||||||
MobileForm.FormTextFieldDelegate {
|
|
||||||
label: i18n("Hotspot SSID")
|
label: i18n("Hotspot SSID")
|
||||||
enabled: !hotspotToggle.checked
|
enabled: !hotspotToggle.checked
|
||||||
text: PlasmaNM.Configuration.hotspotName
|
text: PlasmaNM.Configuration.hotspotName
|
||||||
onTextChanged: PlasmaNM.Configuration.hotspotName = text
|
onTextChanged: PlasmaNM.Configuration.hotspotName = text
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileForm.FormDelegateSeparator {}
|
FormCard.FormDelegateSeparator {}
|
||||||
|
|
||||||
MobileForm.FormTextFieldDelegate {
|
FormCard.FormTextFieldDelegate {
|
||||||
label: i18n("Hotspot Password")
|
label: i18n("Hotspot Password")
|
||||||
enabled: !hotspotToggle.checked
|
enabled: !hotspotToggle.checked
|
||||||
echoMode: TextInput.Password
|
echoMode: TextInput.Password
|
||||||
|
|
@ -80,5 +74,4 @@ SimpleKCM {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue