Commit f3242fa6 authored by Sergey Chupligin's avatar Sergey Chupligin

[Statusbar] update Sim and WiFi panel

parent b5065bfa
...@@ -50,13 +50,15 @@ Component { ...@@ -50,13 +50,15 @@ Component {
simManager.modemPath = manager.modems simManager.modemPath = manager.modems
} }
property list<QtObject> _data: [
OfonoManager { OfonoManager {
id: manager id: manager
} },
OfonoSimManager { OfonoSimManager {
id: simManager id: simManager
} }
]
ColumnLayout { ColumnLayout {
visible: needsPin visible: needsPin
......
/**************************************************************************************** /****************************************************************************************
** **
** Copyright (C) 2014 Aleksi Suomalainen <suomalainen.aleksi@gmail.com> ** Copyright (C) 2014 Aleksi Suomalainen <suomalainen.aleksi@gmail.com>
** Copyright (C) 2017 Sergey Chupligin <mail@neochapay.ru>
** All rights reserved. ** All rights reserved.
** **
** You may use this file under the terms of BSD license as follows: ** You may use this file under the terms of BSD license as follows:
...@@ -32,14 +33,30 @@ ...@@ -32,14 +33,30 @@
import QtQuick 2.1 import QtQuick 2.1
import QtQuick.Controls.Nemo 1.0 import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0 import QtQuick.Controls.Styles.Nemo 1.0
import MeeGo.Connman 0.2
Component { Component {
CommonPanel { CommonPanel {
Column { id: wifiPanel
name: "Wifi"
switcherEnabled: true
switcherChecked: true
onSwitcherCheckedChanged: {
wifimodel.setPowered(switcherChecked)
}
property list<QtObject> _data: [
TechnologyModel {
id: wifimodel
name: "wifi"
}
]
Repeater { Repeater {
model: wifimodel model: wifimodel
delegate: Item { delegate: Item {
width: root.width width: parent.width
height: 40 height: 40
function getStrengthIndex(strength) { function getStrengthIndex(strength) {
var strengthIndex = "0" var strengthIndex = "0"
...@@ -58,11 +75,15 @@ Component { ...@@ -58,11 +75,15 @@ Component {
Row { Row {
spacing: 12 spacing: 12
Image { Image {
source: "image://theme/icon_wifi_focused" + getStrengthIndex(modelData.strength) id: statusImage
source: (getStrengthIndex(modelData.strength) === "0")? "image://theme/icon_wifi_0" : "image://theme/icon_wifi_focused" + getStrengthIndex(modelData.strength)
} }
Label { Label {
anchors.leftMargin: 20 anchors{
leftMargin: 20
vertialCenter: statusImage.verticalCenter
}
width: root.width width: root.width
font.pointSize: 8 font.pointSize: 8
text: modelData.name text: modelData.name
...@@ -72,5 +93,4 @@ Component { ...@@ -72,5 +93,4 @@ Component {
} }
} }
} }
}
} }
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