Commit 1dfe7223 authored by Aleksi Suomalainen's avatar Aleksi Suomalainen

Merge pull request #24 from locusf/sim_panel

[statusbar] SIM panel for PIN entry
parents ad97a7f1 2b3be37a
...@@ -9,7 +9,7 @@ Name: lipstick-glacier-home-qt5 ...@@ -9,7 +9,7 @@ Name: lipstick-glacier-home-qt5
# << macros # << macros
Summary: A nice homescreen for Glacier experience Summary: A nice homescreen for Glacier experience
Version: 0.0.0 Version: 0.10
Release: 1 Release: 1
Group: System/GUI/Other Group: System/GUI/Other
License: BSD License: BSD
......
Name: lipstick-glacier-home-qt5 Name: lipstick-glacier-home-qt5
Summary: A nice homescreen for Glacier experience Summary: A nice homescreen for Glacier experience
Version: 0.0.0 Version: 0.10
Release: 1 Release: 1
Group: System/GUI/Other Group: System/GUI/Other
License: BSD License: BSD
......
...@@ -44,6 +44,9 @@ GridView { ...@@ -44,6 +44,9 @@ GridView {
header: Item { header: Item {
height: 100 height: 100
} }
footer: Item {
height: 100
}
Item { Item {
id: deleter id: deleter
......
...@@ -33,6 +33,7 @@ import org.nemomobile.glacier 1.0 ...@@ -33,6 +33,7 @@ import org.nemomobile.glacier 1.0
Item { Item {
id: switcherRoot id: switcherRoot
property bool closeMode: false property bool closeMode: false
property bool visibleInHome: false property bool visibleInHome: false
property alias runningAppsCount: switcherModel.itemCount property alias runningAppsCount: switcherModel.itemCount
...@@ -119,7 +120,7 @@ Item { ...@@ -119,7 +120,7 @@ Item {
right: parent.right right: parent.right
bottom: parent.bottom bottom: parent.bottom
margins: -1 margins: -1
bottomMargin: switcherRoot.closeMode ? 0 : -height bottomMargin: switcherRoot.closeMode ? 48 : -height
} }
Behavior on anchors.bottomMargin { PropertyAnimation { duration: 100 } } Behavior on anchors.bottomMargin { PropertyAnimation { duration: 100 } }
......
...@@ -89,7 +89,6 @@ Page { ...@@ -89,7 +89,6 @@ Page {
id: pager id: pager
anchors.fill: parent anchors.fill: parent
model: VisualItemModel { model: VisualItemModel {
AppLauncher { AppLauncher {
id: launcher id: launcher
......
/****************************************************************************************
**
** Copyright (C) 2014 Aleksi Suomalainen <suomalainen.aleksi@gmail.com>
** All rights reserved.
**
** You may use this file under the terms of BSD license as follows:
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in the
** documentation and/or other materials provided with the distribution.
** * Neither the name of the author nor the
** names of its contributors may be used to endorse or promote products
** derived from this software without specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
****************************************************************************************/
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
Button {
id: btn
width: 120
height: 40
onClicked: {
pinquery.text += btn.text
}
}
...@@ -25,13 +25,12 @@ import QtQuick 2.0 ...@@ -25,13 +25,12 @@ import QtQuick 2.0
PathView { PathView {
id: pager id: pager
highlightRangeMode: PathView.StrictlyEnforceRange highlightRangeMode: PathView.ApplyRange
preferredHighlightBegin: 0.5 preferredHighlightBegin: 0.5
preferredHighlightEnd: 0.5 preferredHighlightEnd: 0.5
flickDeceleration: 10000 flickDeceleration: 10000
highlightMoveDuration: 100 highlightMoveDuration: 100
snapMode: PathView.SnapOneItem snapMode: PathView.SnapOneItem
clip: true
path: Path { path: Path {
startX: - width * model.count / 2 + width / 2 startX: - width * model.count / 2 + width / 2
startY: height / 2 startY: height / 2
......
/****************************************************************************************
**
** Copyright (C) 2014 Aleksi Suomalainen <suomalainen.aleksi@gmail.com>
** All rights reserved.
**
** You may use this file under the terms of BSD license as follows:
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in the
** documentation and/or other materials provided with the distribution.
** * Neither the name of the author nor the
** names of its contributors may be used to endorse or promote products
** derived from this software without specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
****************************************************************************************/
import QtQuick 2.1
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import MeeGo.QOfono 0.2
Component {
Rectangle {
height: 240
width: root.width
color: "#313131"
opacity: 0.5
property bool _needsPin: simManager.pinRequired === OfonoSimManager.SimPin ||
simManager.pinRequired === OfonoSimManager.SimPuk
Component.onCompleted: {
simManager.modemPath = manager.modems
}
OfonoManager {
id: manager
}
OfonoSimManager {
id: simManager
}
Column {
visible: _needsPin
spacing: 10
Row {
spacing: 16
TextField {
id: pinquery
width: 180
height: 40
}
Button {
id: pinenter
text: "OK"
width: 120
height: 40
onClicked: {
simManager.enterPin(OfonoSimManager.SimPin, pinquery.text)
pinquery.text = ""
}
}
Button {
id: clearpin
text: "Clear"
width: 120
height: 40
onClicked: {
pinquery.text = ""
}
}
}
Row {
spacing: 16
NumButton {
text: "1"
}
NumButton {
text: "2"
}
NumButton {
text: "3"
}
}
Row {
spacing: 16
NumButton {
text: "4"
}
NumButton {
text: "5"
}
NumButton {
text: "6"
}
}
Row {
spacing: 16
NumButton {
text: "7"
}
NumButton {
text: "8"
}
NumButton {
text: "9"
}
}
Row {
spacing: 16
NumButton {
text: "0"
}
}
}
Label {
visible: !_needsPin
text: "No pin required!"
font.pointSize: 16
}
}
}
...@@ -112,7 +112,7 @@ Item { ...@@ -112,7 +112,7 @@ Item {
Row { Row {
spacing: 16 spacing: 16
StatusbarItem { StatusbarItem {
source: "image://theme/icon_cell" + cellularSignalBars.value source: (cellularSignalBars.value > 0) ? "image://theme/icon_cell" + cellularSignalBars.value : "image://theme/icon_cell1"
} }
StatusbarItem { StatusbarItem {
...@@ -122,7 +122,8 @@ Item { ...@@ -122,7 +122,8 @@ Item {
height: 16 height: 16
font.pointSize: 6 font.pointSize: 6
font.bold: true font.bold: true
text: cellularNetworkName.value.toUpperCase() wrapMode: Text.ElideRight
text: (cellularNetworkName !== "") ? cellularNetworkName.value.toUpperCase() : "N/A"
} }
Label { Label {
...@@ -132,10 +133,11 @@ Item { ...@@ -132,10 +133,11 @@ Item {
height: 16 height: 16
font.pointSize: 6 font.pointSize: 6
text: { text: {
var techToG = {gprs: "2", egprs: "2.5", umts: "3", hspa: "3.5", lte: "4"} var techToG = {gprs: "2", egprs: "2.5", umts: "3", hspa: "3.5", lte: "4", unknown: "0"}
return techToG[cellularDataTechnology.value] + "G" return techToG[cellularDataTechnology.value] + "G"
} }
} }
panel: SimPanel {}
} }
StatusbarItem { StatusbarItem {
......
...@@ -40,5 +40,7 @@ ...@@ -40,5 +40,7 @@
<file>qml/images/wallpaper-portrait-bubbles.png</file> <file>qml/images/wallpaper-portrait-bubbles.png</file>
<file>qml/StatusbarItem.qml</file> <file>qml/StatusbarItem.qml</file>
<file>qml/WifiPanel.qml</file> <file>qml/WifiPanel.qml</file>
<file>qml/SimPanel.qml</file>
<file>qml/NumButton.qml</file>
</qresource> </qresource>
</RCC> </RCC>
...@@ -49,5 +49,8 @@ OTHER_FILES += qml/*.qml \ ...@@ -49,5 +49,8 @@ OTHER_FILES += qml/*.qml \
qml/Statusbar.qml \ qml/Statusbar.qml \
qml/StatusbarItem.qml \ qml/StatusbarItem.qml \
qml/WifiPanel.qml \ qml/WifiPanel.qml \
nemovars.conf nemovars.conf \
qml/SimPanel.qml \
qml/NumButton.qml
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