Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit f0b20f72 authored by Jan Grulich's avatar Jan Grulich

Minor improvements and coding style fixes

parent 34ed20f0
install(FILES wifi.desktop DESTINATION ${SERVICES_INSTALL_DIR})
kpackage_install_package(package wifi kcms )
kpackage_install_package(package wifi kcms)
/*
*
* Copyright 2017 Martin Kacej <>
* Copyright 2017 Martin Kacej <m.kacej@atlas.sk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
......@@ -22,7 +20,6 @@
import QtQuick 2.2
import QtQuick.Controls 1.4 as Controls
import QtQuick.Layouts 1.2
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
......@@ -63,16 +60,16 @@ PlasmaExtras.ScrollArea {
}
}
IPDetailsSection{
IPDetailsSection {
visible: advancedOptionsSwitch.checked
}
ProxyDetailsSection{
ProxyDetailsSection {
visible: advancedOptionsSwitch.checked
}
}
function save(){
function save() {
console.info('Connection saved')
}
}
/*
* Copyright 2017 Martin Kacej <m.kacej@atlas.sk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 2.2
import QtQuick.Controls 1.4 as Controls
import QtQuick.Layouts 1.2
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
ColumnLayout{
property var adress: ""
......@@ -11,11 +28,11 @@ ColumnLayout{
spacing: units.gridUnit
PlasmaComponents.Label{
PlasmaComponents.Label {
text: i18n("IP Settings")
}
PlasmaComponents.Switch{
PlasmaComponents.Switch {
id: manualIPCheckbox
checked: false
onCheckedChanged: {
......@@ -23,32 +40,32 @@ ColumnLayout{
}
}
ColumnLayout{
ColumnLayout {
id: manuaIPSettings
anchors.top: manualIPCheckbox.bottom
visible: false
PlasmaComponents.Label{
PlasmaComponents.Label {
text: i18n("IP Address")
}
Controls.TextField{
Controls.TextField {
placeholderText: i18n("193.168.1.128")
text: adress
}
PlasmaComponents.Label{
PlasmaComponents.Label {
text: i18n("Gateway")
}
Controls.TextField{
Controls.TextField {
placeholderText: i18n("192.168.1.1")
}
PlasmaComponents.Label{
PlasmaComponents.Label {
text: i18n("Network prefix length")
}
Controls.TextField{
Controls.TextField {
placeholderText: i18n("24")
}
......@@ -56,7 +73,7 @@ ColumnLayout{
text: i18n("DNS")
}
Controls.TextField{
Controls.TextField {
placeholderText: i18n("8.8.8.8")
}
}
......
/*
*
* Copyright 2017 Martin Kacej <>
* Copyright 2017 Martin Kacej <m.kacej@atlas.sk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
......@@ -21,34 +20,72 @@
import QtQuick 2.2
import QtQuick.Controls 1.4 as Controls
import QtQuick.Layouts 1.2
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
PlasmaExtras.ScrollArea{
property var details
property var signal_strength: 0
property var signal_speed: 0
property var ip_address: 0
property var security: "Unknown"
property alias signal_strength: signalStrengthLabel.text
property alias signal_speed: linkSpeedLabel.text
property alias ip_address: securityLabel.text
property alias security: ipAddressLabel.text
Column {
Column{
Column {
id: staticInfo
anchors.bottomMargin: units.gridUnit
PlasmaComponents.Label {
text: i18n("<b>Strength: </b>" + signal_strength)
Row {
spacing: units.gridUnit / 2
PlasmaComponents.Label {
font.weight: Font.Bold
text: i18n("Strength:")
}
PlasmaComponents.Label {
id: signalStrengthLabel
}
}
PlasmaComponents.Label{
text: i18n("<b>Link Speed:</b> " + signal_speed)
Row {
spacing: units.gridUnit / 2
PlasmaComponents.Label {
font.weight: Font.Bold
text: i18n("Link Speed:")
}
PlasmaComponents.Label {
id: linkSpeedLabel
}
}
PlasmaComponents.Label{
text: i18n("<b>Security: </b>" +security)
Row {
spacing: units.gridUnit / 2
PlasmaComponents.Label {
font.weight: Font.Bold
text: i18n("Security:")
}
PlasmaComponents.Label {
id: securityLabel
}
}
PlasmaComponents.Label{
text: i18n("<b>IP Address: </b>" + ip_address)
Row {
spacing: units.gridUnit / 2
PlasmaComponents.Label {
font.weight: Font.Bold
text: i18n("IP Address:")
}
PlasmaComponents.Label {
id: ipAddressLabel
}
}
}
......@@ -63,14 +100,10 @@ PlasmaExtras.ScrollArea{
}
}
IPDetailsSection{
IPDetailsSection {
id: detailsIP
visible: advancedOptionsSwitch.checked
}
ProxyDetailsSection{
visible: advancedOptionsSwitch.checked
}
}
function fillDetails() {
......@@ -79,13 +112,17 @@ PlasmaExtras.ScrollArea{
console.info(details[i])
d[details[(i * 2)]] = details[(i * 2) + 1]
}
if(d['Access point (SSID)']) detailsDialog.titleText = d['Access point (SSID)']
if (d['Access point (SSID)'])
detailsDialog.titleText = d['Access point (SSID)']
signal_strength = d['Signal strength']
if (d['IPv4 Address']) ip_address = detailsIP.adress = d['IPv4 Address']
if (d['Security type']) security = d['Security type']
if (d['Connection speed']) signal_speed = d['Connection speed']
if (d['IPv4 Address'])
ip_address = detailsIP.adress = d['IPv4 Address']
if (d['Security type'])
security = d['Security type']
if (d['Connection speed'])
signal_speed = d['Connection speed']
}
function clearDetails(){
function clearDetails() {
signal_speed = signal_strength = ip_address = 0
security = "Unknown"
detailsIP.adress = detailsIP.gateway = ''
......
import QtQuick 2.2
import QtQuick.Controls 1.4 as Controls
import QtQuick.Layouts 1.2
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
ColumnLayout{
spacing: units.gridUnit
PlasmaComponents.Label{
text: i18n("Proxy settings")
}
PlasmaComponents.CheckBox{
id: manualProxyCheck
checked: false
onCheckedChanged: {
manuaProxySettings.visible = checked
}
}
ColumnLayout{
id: manuaProxySettings
anchors.top: manualProxyCheck.bottom
visible: false
PlasmaComponents.Label{
text: i18n("Proxy hostname")
}
Controls.TextField{
placeholderText: i18n("my.proxy.com")
}
PlasmaComponents.Label{
text: i18n("Proxy port")
}
Controls.TextField{
placeholderText: i18n("8080")
}
PlasmaComponents.Label{
text: i18n("Bypass proxy for")
}
Controls.TextField{
placeholderText: i18n("example.com,mytest.com")
}
}
}
/*
*
* Copyright 2017 Martin Kacej <>
* Copyright 2017 Martin Kacej <m.kacej@atlas.sk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
......@@ -26,12 +25,12 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.networkmanagement 0.2 as PlasmaNM
import org.kde.kirigami 1.0 as Kirigami
Kirigami.SwipeListItem{
Kirigami.SwipeListItem {
width: parent.width
enabled: true
backgroundColor: theme.backgroundColor
Item{
Item {
height: connectionSvgIcon.height
width: parent.width
......@@ -84,7 +83,8 @@ Kirigami.SwipeListItem{
Kirigami.Action {
iconName: "configure-small"
onTriggered: {
if (ConnectionDetails) networkDetailsViewContent.details = ConnectionDetails
if (ConnectionDetails)
networkDetailsViewContent.details = ConnectionDetails
if (ConnectionDetails[1] !== "") {
detailsDialog.titleText = ItemUniqueName
} else {
......@@ -102,10 +102,10 @@ Kirigami.SwipeListItem{
}
]
function connect(){
function connect() {
console.info(ConnectionDetails[1]+' trying to connect')
}
function forgetNetwork(){
function forgetNetwork() {
console.info(ConnectionDetails[1]+' trying to forget')
}
}
/*
*
* Copyright 2017 Martin Kacej <>
* Copyright 2017 Martin Kacej <m.kacej@atlas.sk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
......@@ -21,10 +20,8 @@
import QtQuick 2.0
import QtQuick.Controls 1.4 as Controls
import QtQuick.Layouts 1.2
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.active.settings 2.0 as ActiveSettings
import org.kde.plasma.networkmanagement 0.2 as PlasmaNM
import org.kde.kirigami 1.0 as Kirigami
......@@ -73,7 +70,7 @@ Item {
Layout.fillWidth: true
}
Controls.Switch{
Controls.Switch {
id: wifiSwitchButton
checked: enabled && enabledConnections.wirelessEnabled
enabled: enabledConnections.wirelessHwEnabled
......@@ -150,7 +147,7 @@ Item {
connectionEditorDialog.close()
}
}
PlasmaComponents.Button{
PlasmaComponents.Button {
anchors.right: parent.right
text: 'Cancel'
onClicked: connectionEditorDialog.close()
......
[Desktop Entry]
Name=Wifi settings
Comment=Network settings
Name=Wi-Fi
Comment=Wireless network setting
Encoding=UTF-8
Type=Service
Icon=network-wireless-symbolic
......@@ -10,8 +9,8 @@ X-KDE-PluginInfo-Author=Martin Kacej
X-KDE-PluginInfo-Email=m.kacej@atlas.sk
X-KDE-PluginInfo-Name=wifi
X-KDE-PluginInfo-Version=0.1
X-KDE-PluginInfo-Website=http://plasma-active.org
X-KDE-PluginInfo-Category=Online Services
X-KDE-PluginInfo-Website=https://plasma-mobile.org/
X-KDE-PluginInfo-Category=System Information
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
......
[Desktop Entry]
Name=Network Settings
Comment=Wifi, Bluetooth, Mobile Networks Settings
Name=Wi-Fi
Comment=Wireless network setting
Icon=network-wireless-symbolic
Exec=plasma-settings -m wifi
......@@ -8,7 +8,6 @@ Exec=plasma-settings -m wifi
Type=Service
X-KDE-ServiceTypes=KCModule
#X-KDE-Library=kcm_mobile_power
X-KDE-ParentApp=kcontrol
X-KDE-FormFactors=handset,tablet,mediacenter
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment