Commit c8c0f636 authored by Jan Grulich's avatar Jan Grulich

Minor coding style fixes

parent d254892b
/*
*
* Copyright 2017 Martin Kacej <>
*
* 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
......@@ -5,35 +25,35 @@ 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
Item{
Item {
property var details
property var str: 0
Column{
Column {
anchors.fill: parent
PlasmaComponents.Label{
PlasmaComponents.Label {
anchors.left: parent.left
text: "SSID"
text: i18n("SSID")
}
PlasmaComponents.TextField{
width:100 // units.GridUnit * 100
PlasmaComponents.TextField {
width: 100 // units.GridUnit * 100
}
PlasmaComponents.Label{
PlasmaComponents.Label {
anchors.left: parent.left
text: "Security"
text: i18n("Security")
}
Controls.ComboBox{
Controls.ComboBox {
model: ["None","WEP","WPA","802.1x EAP"]
}
RowLayout{
PlasmaComponents.Label{
RowLayout {
PlasmaComponents.Label {
anchors.left: parent.left
text: "Advanced options"
text: i18n("Advanced options")
}
PlasmaComponents.Switch{
PlasmaComponents.Switch {
}
}
......
/*
*
* Copyright 2017 Martin Kacej <>
*
* 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
......@@ -12,20 +32,20 @@ Item {
property var str: 0
Column{
PlasmaComponents.Label{
PlasmaComponents.Label {
anchors.left: parent.left
text: "Strength: "
text: i18n("Strength:")
}
PlasmaComponents.Label{
PlasmaComponents.Label {
anchors.right: parent.right
text: str
}
}
function fillDetails(){
for(var i=0;i<(details.length/2);i++){
console.info(details[(i*2)+1])
function fillDetails() {
for (var i = 0; i < (details.length / 2); i++){
console.info(details[(i * 2) + 1])
}
str = details[3]
}
......
/*
*
* Copyright 2017 Martin Kacej <>
*
* 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.0
import QtQuick.Controls 1.4 as Controls
import QtQuick.Layouts 1.2
......@@ -8,6 +28,7 @@ import org.kde.plasma.networkmanagement 0.2 as PlasmaNM
PlasmaComponents.ListItem {
width: parent.width
enabled: true
RowLayout {
width: parent.width
PlasmaComponents.Label {
......
/*
*
*
* Copyright 2017 Martin Kacej <>
*
* This program is free software; you can redistribute it and/or modify
......@@ -34,7 +34,7 @@ Item {
width: units.gridUnit * 30
height: width * 1.5
PlasmaNM.Handler{
PlasmaNM.Handler {
id: handler
}
......@@ -50,10 +50,10 @@ Item {
id: connectionModel
}
PlasmaNM.MobileAppletProxyModel{
PlasmaNM.MobileAppletProxyModel{
id: mobileappletProxyModel
sourceModel: connectionModel
}
}
Column {
id: formLayout
......@@ -61,11 +61,11 @@ Item {
anchors {
fill: parent
margins: units.gridUnit
leftMargin: units.gridUnit/2
leftMargin: units.gridUnit / 2
}
RowLayout{
id:layoutrow
RowLayout {
id: layoutrow
width: parent.width
PlasmaComponents.Label {
......@@ -85,17 +85,17 @@ Item {
}
}
Rectangle{
Rectangle {
id: separator
anchors.top: layoutrow.bottom
width: parent.width
height: units.gridUnit/8
height: units.gridUnit / 8
border.color: "grey"
}
PlasmaComponents.Label {
id:label
anchors{
id: label
anchors {
left: parent.left
top:separator.bottom
}
......@@ -103,18 +103,18 @@ Item {
Layout.fillWidth: true
}
PlasmaExtras.ScrollArea{
id:wifiarea
PlasmaExtras.ScrollArea {
id: wifiarea
anchors {
top:label.bottom
bottomMargin:units.gridUnit*2
bottomMargin: units.gridUnit*2
bottom: parent.bottom
left: parent.left
right: parent.right
}
ListView {
id:view
id: view
//property bool availableConnectionsVisible: false
anchors.fill: parent
anchors.margins: units.gridUnit
......@@ -126,10 +126,10 @@ Item {
delegate: RowItemDelegate {
onClicked: {
networkDetailsViewContent.details = ConnectionDetails
if (ConnectionDetails[1] != ""){
if (ConnectionDetails[1] != "") {
detailsDialog.titleText = ConnectionDetails[1]
}else{
detailsDialog.titleText = "Network details"
} else {
detailsDialog.titleText = i18n("Network details")
}
networkDetailsViewContent.fillDetails()
detailsDialog.open()
......@@ -138,10 +138,10 @@ Item {
}
}
PlasmaComponents.Button{
id:customConnectionButton
anchors.top:wifiarea.bottom
text:"Add custom connection"
PlasmaComponents.Button {
id: customConnectionButton
anchors.top: wifiarea.bottom
text: i18n("Add custom connection")
onClicked: connectionEditorDialog.open()
}
}
......
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