Move hotspot kcm to plasma-nm

This commit is contained in:
Carl Schwan 2025-02-25 00:10:17 +01:00 committed by Luigi Toscano
parent cfdb1ae516
commit d6cc9473c0
6 changed files with 0 additions and 291 deletions

View file

@ -6,4 +6,3 @@ add_subdirectory(info)
add_subdirectory(powermanagement)
add_subdirectory(time)
add_subdirectory(virtualkeyboard)
add_subdirectory(hotspot)

View file

@ -1,12 +0,0 @@
# SPDX-FileCopyrightText: 2020 Tobias Fella <fella@posteo.de>
# SPDX-License-Identifier: LGPL-2.0-or-later
kcmutils_add_qml_kcm(kcm_mobile_hotspot SOURCES hotspotsettings.cpp)
target_link_libraries(kcm_mobile_hotspot PRIVATE
Qt::Quick
Qt::Qml
KF6::I18n
KF6::CoreAddons
KF6::KCMUtilsQuick
)

View file

@ -1,4 +0,0 @@
#!/usr/bin/env bash
# SPDX-FileCopyrightText: 2020 Tobias Fella <fella@posteo.de>
# SPDX-License-Identifier: LGPL-2.0-or-later
$XGETTEXT `find . -name \*.cpp -o -name \*.qml` -o $podir/kcm_mobile_hotspot.pot

View file

@ -1,25 +0,0 @@
/*
SPDX-FileCopyrightText: 2020 Tobias Fella <fella@posteo.de>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include <KLocalizedString>
#include <KPluginFactory>
#include <KQuickConfigModule>
class HotspotSettings : public KQuickConfigModule
{
Q_OBJECT
public:
HotspotSettings(QObject *parent, const KPluginMetaData &metaData)
: KQuickConfigModule(parent, metaData)
{
setButtons({});
}
};
K_PLUGIN_CLASS_WITH_JSON(HotspotSettings, "kcm_mobile_hotspot.json")
#include "hotspotsettings.moc"

View file

@ -1,127 +0,0 @@
{
"KPlugin": {
"Authors": [
{
"Email": "fella@posteo.de",
"Name": "Tobias Fella",
"Name[ar]": "توبياس فلة",
"Name[ca@valencia]": "Tobias Fella",
"Name[ca]": "Tobias Fella",
"Name[cs]": "Tobias Fella",
"Name[de]": "Tobias Fella",
"Name[en_GB]": "Tobias Fella",
"Name[eo]": "Tobias Fella",
"Name[es]": "Tobias Fella",
"Name[eu]": "Tobias Fella",
"Name[fi]": "Tobias Fella",
"Name[fr]": "Tobias Fella",
"Name[gl]": "Tobias Fella",
"Name[he]": "טוביאס פלה",
"Name[hu]": "Tobias Fella",
"Name[ia]": "Tobias Fella",
"Name[is]": "Tobias Fella",
"Name[it]": "Tobias Fella",
"Name[ka]": "Tobias Fella",
"Name[ko]": "Tobias Fella",
"Name[lv]": "Tobias Fella",
"Name[nl]": "Tobias Fella",
"Name[nn]": "Tobias Fella",
"Name[pl]": "Tobias Fella",
"Name[ru]": "Tobias Fella",
"Name[sa]": "टोबियास फेला",
"Name[sk]": "Tobias Fella",
"Name[sl]": "Tobias Fella",
"Name[sv]": "Tobias Fella",
"Name[tr]": "Tobias Fella",
"Name[uk]": "Tobias Fella",
"Name[x-test]": "xxTobias Fellaxx",
"Name[zh_CN]": "Tobias Fella",
"Name[zh_TW]": "Tobias Fella"
}
],
"Category": "System Information",
"Description": "Wi-Fi Hotspot",
"Description[ca@valencia]": "Punt d'accés Wi-Fi",
"Description[ca]": "Punt d'accés Wi-Fi",
"Description[cs]": "Hotspot WiFi",
"Description[de]": "WLAN-Hotspot",
"Description[en_GB]": "Wi-Fi Hotspot",
"Description[eo]": "Wi-Fi Hotspot",
"Description[es]": "Punto de acceso wifi",
"Description[eu]": "Wi-Fi berogunea",
"Description[fi]": "Langattomat tukiasemat",
"Description[fr]": "Points d'accès Wifi",
"Description[gl]": "Punto de acceso sen fíos.",
"Description[he]": "נקודה אלחוטית חמה",
"Description[hu]": "Wi-Fi Hotspot",
"Description[ia]": "Hotspots de Wi-Fi",
"Description[is]": "Wi-Fi aðgangsstaður",
"Description[it]": "Hotspot Wi-Fi",
"Description[ka]": "Wi-Fi ჰოტსპოტი",
"Description[ko]": "Wi-Fi 핫스팟",
"Description[lv]": "„Wi-Fi“ tīklājs",
"Description[nl]": "Wi-Fi-hotspot",
"Description[nn]": "Trådlaussone",
"Description[pa]": "ਵਾਈ-ਫ਼ਾਈ ਹਾਟਸਪਾਟ",
"Description[pl]": "Wi-Fi Hotspot",
"Description[pt_BR]": "Ponto de acesso sem fio",
"Description[ru]": "Точка доступа Wi-Fi",
"Description[sa]": "वाई-फाई हॉटस्पॉट",
"Description[sk]": "Prístupový bod Wi-Fi",
"Description[sl]": "Wi-Fi vroča točka",
"Description[sv]": "WIFI-accesspunkt",
"Description[ta]": "அருகலை ஹாட்ஸ்பாட்டு",
"Description[tr]": "Wi-Fi Erişim Noktası",
"Description[uk]": "Хот-спот Wi-Fi",
"Description[x-test]": "xxWi-Fi Hotspotxx",
"Description[zh_CN]": "Wi-Fi 热点",
"Description[zh_TW]": "Wi-Fi 熱點",
"EnabledByDefault": true,
"FormFactors": [
"handset",
"tablet",
"mediacenter"
],
"Icon": "network-wireless-hotspot",
"License": "GPL",
"Name": "Hotspot",
"Name[ar]": "هوت-سبوت",
"Name[ca@valencia]": "Punt d'accés",
"Name[ca]": "Punt d'accés",
"Name[cs]": "Hotspot",
"Name[de]": "Hotspot",
"Name[en_GB]": "Hotspot",
"Name[eo]": "Hotspot",
"Name[es]": "Punto de acceso",
"Name[eu]": "Berogunea",
"Name[fi]": "Tukiasema",
"Name[fr]": "Points d'accès",
"Name[gl]": "Punto de acceso",
"Name[he]": "נקודה חמה",
"Name[hu]": "Hotspot",
"Name[ia]": "Hotspot",
"Name[is]": "Aðgangsstaður",
"Name[it]": "Hotspot",
"Name[ka]": "ჰოტსპოტი",
"Name[ko]": "핫스팟",
"Name[lv]": "Tīklājs",
"Name[nl]": "Hotspot",
"Name[nn]": "Trådlaussone",
"Name[pa]": "ਹਾਟਸਪਾਟ",
"Name[pl]": "Hotspot",
"Name[pt_BR]": "Ponto de acesso",
"Name[ru]": "Точка доступа Wi-Fi",
"Name[sa]": "हॉटस्पॉट्",
"Name[sk]": "Prístupový bod",
"Name[sl]": "Vroča točka",
"Name[sv]": "Accesspunkt",
"Name[ta]": "ஹாட்ஸ்பாட்",
"Name[tr]": "Erişim Noktası",
"Name[uk]": "Точка доступу",
"Name[x-test]": "xxHotspotxx",
"Name[zh_CN]": "无线热点",
"Name[zh_TW]": "熱點",
"Website": "https://plasma-mobile.org/"
},
"X-KDE-System-Settings-Parent-Category": "network"
}

View file

@ -1,122 +0,0 @@
// SPDX-FileCopyrightText: 2020 Tobias Fella <fella@posteo.de>
// SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
// SPDX-License-Identifier: LGPL-2.0-or-later
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls as Controls
import org.kde.plasma.networkmanagement as PlasmaNM
import org.kde.kirigami as Kirigami
import org.kde.kcmutils
import org.kde.kirigamiaddons.formcard as FormCard
SimpleKCM {
id: root
leftPadding: 0
rightPadding: 0
topPadding: 0
bottomPadding: 0
data: [
PlasmaNM.Handler {
id: handler
},
PlasmaNM.WirelessStatus {
id: wirelessStatus
},
Kirigami.PromptDialog {
id: hotspotDialog
title: i18n("Configure Hotspot")
standardButtons: Kirigami.PromptDialog.Save | Kirigami.PromptDialog.Cancel
onOpened: {
hotspotSsidField.text = PlasmaNM.Configuration.hotspotName;
hotspotPasswordField.text = PlasmaNM.Configuration.hotspotPassword;
}
onAccepted: {
PlasmaNM.Configuration.hotspotName = hotspotSsidField.text;
PlasmaNM.Configuration.hotspotPassword = hotspotPasswordField.text;
// these properties need to be manually updated since they're not NOTIFYable
hotspotSSIDText.description = PlasmaNM.Configuration.hotspotName;
hotspotPasswordText.description = PlasmaNM.Configuration.hotspotPassword;
}
ColumnLayout {
Controls.Label {
text: i18n('Hotspot SSID:')
}
Controls.TextField {
Layout.fillWidth: true
id: hotspotSsidField
}
Controls.Label {
text: i18n('Hotspot Password:')
}
Controls.TextField {
Layout.fillWidth: true
id: hotspotPasswordField
}
}
}
]
ColumnLayout {
spacing: 0
FormCard.FormCard {
Layout.topMargin: Kirigami.Units.gridUnit
FormCard.FormSwitchDelegate {
id: hotspotToggle
text: i18n("Hotspot")
description: i18n("Share your internet connection with other devices as a Wi-Fi network.");
checked: wirelessStatus.hotspotSSID.length !== 0
onToggled: {
if (hotspotToggle.checked) {
handler.createHotspot();
} else {
handler.stopHotspot();
}
}
}
}
FormCard.FormHeader {
title: i18n("Settings")
}
FormCard.FormCard {
FormCard.FormTextDelegate {
id: hotspotSSIDText
enabled: !hotspotToggle.checked
text: i18n("Hotspot SSID")
description: PlasmaNM.Configuration.hotspotName
}
FormCard.FormDelegateSeparator {}
FormCard.FormTextDelegate {
id: hotspotPasswordText
enabled: !hotspotToggle.checked
text: i18n("Hotspot Password")
description: PlasmaNM.Configuration.hotspotPassword
}
FormCard.FormDelegateSeparator {}
FormCard.FormButtonDelegate {
enabled: !hotspotToggle.checked
text: i18n('Configure')
onClicked: hotspotDialog.open()
}
}
}
}