Commit ca44c10b authored by Martin Kacej's avatar Martin Kacej

minor layout changes, functional preparation

parent 9d05b449
......@@ -10,4 +10,4 @@ tags
applet/contents/ui/SwitchButton.qml
applet/contents/ui/Toolbar.qml
CMakeLists.txt.user
*.qmlc
\ No newline at end of file
*.qmlc
......@@ -24,52 +24,42 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
PlasmaExtras.ScrollArea{
// frameVisible: true
// anchors.fill: parent
property var details
property var str: 0
property var connection : {}
property var enabledSaving: (editorIpSection.enabledSave && editorSecuritySection.enabledSave)
ColumnLayout{
id: columnlayout
PlasmaComponents.Label {
text: i18n("SSID")
font.weight: Font.Bold
}
PlasmaComponents.TextField {
id: ssidField
Layout.fillWidth: true
placeholderText: i18n("None")
}
RowLayout {
PlasmaComponents.Label {
anchors.left: parent.left
text: i18n("Advanced options")
}
PlasmaComponents.Switch {
id: advancedOptionsSwitch
checked: false
}
}
IPDetailsSection {
id: ipsec
//anchors.top: columnlayout.bottom
enabled: advancedOptionsSwitch.checked
visible: advancedOptionsSwitch.checked
id: editorIpSection
}
SecuritySection{
anchors.top: ipsec.bottom
//anchors.topMargin: 30
enabled: advancedOptionsSwitch.checked
visible: advancedOptionsSwitch.checked
id: editorSecuritySection
//anchors.top: editorIpSection.bottom
anchors.topMargin: units.gridUnit
}
}
function save() {
connection["ssid"] = ssidField.text
connection["type"] = "802-11-wireless"
connection["mode"] = "infrastructure"
connection["method"] = editorIpSection.ipMethodComb.get(currentIndex).method
// TODO
console.info('Connection saved')
}
}
......@@ -26,13 +26,31 @@ ColumnLayout{
property var ipmap: []
property var address: ""
property var gateway: ""
property var enabledSave: false
spacing: units.gridUnit
ColumnLayout {
PlasmaComponents.Label {
anchors.left: parent.left
text: i18n("IP settings")
font.weight: Font.Bold
}
Controls.ComboBox {
id: ipMethodComb
model: ListModel{
ListElement{ text: "Automatic"; method: "auto" }
ListElement{ text: "Manual"; method: "manual"}
}
}
}
ColumnLayout{
id: manuaIPSettings
visible: true
enabled: ipMethodComb.currentText == "Manual"
visible: ipMethodComb.currentText == "Manual"
Layout.fillWidth: true
PlasmaComponents.Label {
text: i18n("IP Address")
}
......
......@@ -104,7 +104,7 @@ Kirigami.SwipeListItem {
}
map = handler.getConnectionSettings(ConnectionPath,"ipv4")
networkDetailsViewContent.map = map
console.info(map[ "method"])
console.info(map["method"])
networkDetailsViewContent.fillDetails()
detailsDialog.open()
}
......
......@@ -7,7 +7,8 @@ import org.kde.plasma.networkmanagement 0.2 as PlasmaNM
Layouts.ColumnLayout{
id:securitySectionView
property var securityMap: []
property var securityMap: {}
property var enabledSave: false
width: parent.width
Column{
......@@ -22,6 +23,7 @@ Layouts.ColumnLayout{
}
Controls.Label {
text: i18n("Security")
font.weight: Font.Bold
}
Controls.ComboBox {
id: securityCombobox
......
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