Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
glacier-home
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
NemoMobile
glacier-home
Commits
f3242fa6
Commit
f3242fa6
authored
Jan 26, 2017
by
Sergey Chupligin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Statusbar] update Sim and WiFi panel
parent
b5065bfa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
35 deletions
+57
-35
SimPanel.qml
src/qml/SimPanel.qml
+8
-6
WifiPanel.qml
src/qml/WifiPanel.qml
+49
-29
No files found.
src/qml/SimPanel.qml
View file @
f3242fa6
...
@@ -50,13 +50,15 @@ Component {
...
@@ -50,13 +50,15 @@ Component {
simManager
.
modemPath
=
manager
.
modems
simManager
.
modemPath
=
manager
.
modems
}
}
OfonoManager
{
property
list
<
QtObject
>
_data
:
[
id
:
manager
OfonoManager
{
}
id
:
manager
},
OfonoSimManager
{
OfonoSimManager
{
id
:
simManager
id
:
simManager
}
}
]
ColumnLayout
{
ColumnLayout
{
visible
:
needsPin
visible
:
needsPin
...
...
src/qml/WifiPanel.qml
View file @
f3242fa6
/****************************************************************************************
/****************************************************************************************
**
**
** 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,42 +33,61 @@
...
@@ -32,42 +33,61 @@
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
Repeater
{
name
:
"
Wifi
"
model
:
wifimodel
switcherEnabled
:
true
delegate
:
Item
{
switcherChecked
:
true
width
:
root
.
width
height
:
40
function
getStrengthIndex
(
strength
)
{
var
strengthIndex
=
"
0
"
if
(
strength
>=
59
)
{
onSwitcherCheckedChanged
:
{
strengthIndex
=
"
4
"
wifimodel
.
setPowered
(
switcherChecked
)
}
else
if
(
strength
>=
55
)
{
}
strengthIndex
=
"
3
"
}
else
if
(
strength
>=
50
)
{
property
list
<
QtObject
>
_data
:
[
strengthIndex
=
"
2
"
TechnologyModel
{
}
else
if
(
strength
>=
40
)
{
id
:
wifimodel
strengthIndex
=
"
1
"
name
:
"
wifi
"
}
}
return
strengthIndex
]
Repeater
{
model
:
wifimodel
delegate
:
Item
{
width
:
parent
.
width
height
:
40
function
getStrengthIndex
(
strength
)
{
var
strengthIndex
=
"
0
"
if
(
strength
>=
59
)
{
strengthIndex
=
"
4
"
}
else
if
(
strength
>=
55
)
{
strengthIndex
=
"
3
"
}
else
if
(
strength
>=
50
)
{
strengthIndex
=
"
2
"
}
else
if
(
strength
>=
40
)
{
strengthIndex
=
"
1
"
}
return
strengthIndex
}
Row
{
spacing
:
12
Image
{
id
:
statusImage
source
:
(
getStrengthIndex
(
modelData
.
strength
)
===
"
0
"
)?
"
image://theme/icon_wifi_0
"
:
"
image://theme/icon_wifi_focused
"
+
getStrengthIndex
(
modelData
.
strength
)
}
}
Row
{
spacing
:
12
Image
{
source
:
"
image://theme/icon_wifi_focused
"
+
getStrengthIndex
(
modelData
.
strength
)
}
Label
{
Label
{
anchors.leftMargin
:
20
anchors
{
width
:
root
.
width
leftMargin
:
20
font.pointSize
:
8
vertialCenter
:
statusImage
.
verticalCenter
text
:
modelData
.
name
wrapMode
:
Text
.
Wrap
}
}
width
:
root
.
width
font.pointSize
:
8
text
:
modelData
.
name
wrapMode
:
Text
.
Wrap
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment