[-]
[+]
|
Changed |
_service:tar_git:glacier-settings.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-settings.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -6,7 +6,7 @@
<service name="tar_git">
<param name="url">https://github.com/nemomobile-ux/glacier-settings.git</param>
<param name="branch">master</param>
- <param name="revision">98a93fc4db43bf9e5ed88aa28efdc37449081621</param>
+ <param name="revision">e53f7d9baf37417e5563214fc5784620c40b5f48</param>
<param name="token"/>
<param name="debian">N</param>
<param name="dumb">N</param>
|
[-]
[+]
|
Added |
_service:tar_git:glacier-settings-0.0.10.tar.bz2/data/org.nemomobile.qmlsettings.service
^
|
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.nemomobile.qmlsettings
+Exec=/usr/bin/invoker --type=nemomobile -s /usr/bin/glacier-settings
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-settings-0.0.10.tar.bz2/glacier-settings.desktop
^
|
@@ -1,7 +1,7 @@
[Desktop Entry]
Type=Application
Name=Settings
-Exec=invoker --type=nemomobile -s glacier-settings
+Exec=/usr/bin/invoker --type=nemomobile -s glacier-settings
Icon=/usr/share/glacier-settings/glacier-settings.png
X-Desktop-File-Install-Version=0.20
Name[ru]=Настройки
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-settings-0.0.10.tar.bz2/glacier-settings.pro
^
|
@@ -1,6 +1,8 @@
TARGET = glacier-settings
-CONFIG += c++11
+CONFIG += c++11 link_pkgconfig
+PKGCONFIG += glacierapp
+LIBS += -lglacierapp
SOURCES += \
src/main.cpp \
@@ -22,6 +24,7 @@
TRANSLATIONS += translations/glacier-settings_en.ts\
translations/glacier-settings_ru.ts
+
i18n_files.files = translations
i18n_files.path = /usr/share/$$TARGET
INSTALLS += i18n_files
@@ -62,7 +65,10 @@
wifiplugin.files = qml/plugins/wifi/wifi.qml\
qml/plugins/wifi/WifiSettings.qml\
qml/plugins/wifi/WifiStatus.qml\
- qml/plugins/wifi/wifi.svg
+ qml/plugins/wifi/wifi.svg\
+ qml/plugins/wifi/SavedServices.qml\
+ qml/plugins/wifi/SavedStatus.qml\
+ qml/plugins/wifi/NetworkDelegate.qml
wifiplugin.path = /usr/share/glacier-settings/qml/plugins/wifi
@@ -81,6 +87,10 @@
qml/plugins/about/icon-glacier-icon.png
aboutplugin.path = /usr/share/glacier-settings/qml/plugins/about
+keyboardplugin.files = qml/plugins/keyboard/keyboard.qml \
+ qml/plugins/keyboard/keyboard.svg
+
+keyboardplugin.path = /usr/share/glacier-settings/qml/plugins/keyboard
languageconfigs.files = configs/supported-languages/*
languageconfigs.path = /usr/share/jolla-supported-languages/
@@ -92,10 +102,14 @@
qml/plugins/wifi/wifi.json \
qml/plugins/gps/gps.json\
qml/plugins/language/language.json\
- qml/plugins/about/about.json
+ qml/plugins/about/about.json\
+ qml/plugins/keyboard/keyboard.json
pluginconfigs.path = /usr/share/glacier-settings/plugins
+service.path = $${INSTALL_ROOT}/usr/share/dbus-1/services
+service.files = data/org.nemomobile.qmlsettings.service
+
INSTALLS += target \
desktop \
qml \
@@ -110,7 +124,9 @@
languageplugin \
aboutplugin \
languageconfigs\
- icon
+ icon \
+ keyboardplugin \
+ service
DISTFILES += \
qml/plugins/example/example.qml \
@@ -138,4 +154,10 @@
qml/plugins/about/about.json \
qml/plugins/about/about.svg \
qml/plugins/about/icon-glacier-icon.png \
- qml/plugins/about/magic.qml
+ qml/plugins/about/magic.qml \
+ qml/plugins/keyboard/keyboard.qml \
+ qml/plugins/wifi/SavedServices.qml \
+ qml/plugins/wifi/SavedStatus.qml \
+ qml/plugins/wifi/NetworkDelegate.qml \
+ qml/components/SettingsService.qml \
+ data/org.nemomobile.qmlsettings.service
|
[-]
[+]
|
Added |
_service:tar_git:glacier-settings-0.0.10.tar.bz2/qml/components/SettingsService.qml
^
|
@@ -0,0 +1,26 @@
+import QtQuick 2.6
+import org.nemomobile.dbus 2.0
+
+Item {
+ id: rootObject
+
+ signal openSettingsPage(string plugin, string extended)
+
+ DBusAdaptor {
+ id: settingsAdaptor
+ service: "org.nemomobile.qmlsettings"
+ path: "/"
+ iface: "org.nemomobile.qmlsettings"
+
+ xml: ' <interface name="org.nemomobile.qmlsettings">\n' +
+ ' <method name="openSettingsPage" />\n' +
+ ' <arg name="plugin" type="s" direction="in"/>\n' +
+ ' <arg name="extended" type="s" direction="in"/>\n' +
+ ' </method>\n' +
+ ' </interface>\n'
+
+ function openSettingsPage(plugin, extended) {
+ rootObject.openSettingsPage(plugin, extended)
+ }
+ }
+}
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-settings-0.0.10.tar.bz2/qml/glacier-settings.qml
^
|
@@ -39,6 +39,15 @@
}
}
+ SettingsService{
+ id: setingService
+
+ onOpenSettingsPage: {
+ pageStack.push(Qt.resolvedUrl("plugins/"+plugin+"/"+plugin+".qml"))
+ main.raise()
+ }
+ }
+
initialPage: Page{
id: mainPage
headerTools: HeaderToolsLayout {
|
[-]
[+]
|
Added |
_service:tar_git:glacier-settings-0.0.10.tar.bz2/qml/plugins/keyboard/keyboard.json
^
|
@@ -0,0 +1,5 @@
+{
+ "path": "keyboard",
+ "category": "Personalization",
+ "title": "Keyboard"
+}
|
[-]
[+]
|
Added |
_service:tar_git:glacier-settings-0.0.10.tar.bz2/qml/plugins/keyboard/keyboard.qml
^
|
@@ -0,0 +1,115 @@
+/*
+ * Copyright (C) 2018 Chupligin Sergey <neochapay@gmail.com>
+ *
+ * This library 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 of the License, or (at your option) any later version.
+ *
+ * This library 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 library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+import QtQuick 2.6
+
+import QtQuick.Controls 1.0
+import QtQuick.Controls.Nemo 1.0
+import QtQuick.Controls.Styles.Nemo 1.0
+
+import org.nemomobile.systemsettings 1.0
+import org.nemomobile.configuration 1.0
+
+import "file:///usr/share/maliit/plugins/org/nemomobile/layouts.js" as KeyboardLayouts
+
+Page {
+ id: keyboardSettingsPlugin
+
+ headerTools: HeaderToolsLayout {
+ showBackButton: true;
+ title: qsTr("Keyboard")
+ }
+
+ property var enabledKeyboardsLayouts: []
+
+ ListModel{
+ id: keyboardModel
+ }
+
+ ConfigurationValue {
+ id: enabledKeyboardLayouts
+ key: "/home/glacier/keyboard/enabledLayouts"
+ defaultValue: "en"
+ }
+
+ ListView{
+ id: keyboardList
+ width: parent.width
+ height: parent.height
+
+ model: keyboardModel
+
+ anchors{
+ top: parent.top
+ topMargin: Theme.itemSpacingLarge
+ left: parent.left
+ }
+
+ delegate: Rectangle{
+ width: parent.width
+ height: Theme.itemHeightLarge
+
+ color: is_enabled ? Theme.accentColor : "transparent"
+
+ Label{
+ text: local_name + " (" + name +")"
+ anchors{
+ left: parent.left
+ leftMargin: Theme.itemSpacingLarge
+ verticalCenter: parent.verticalCenter
+ }
+ }
+
+ MouseArea{
+ anchors.fill: parent
+ onPressAndHold: {
+ if(is_enabled) {
+ is_enabled = false
+ } else {
+ is_enabled = true
+ }
+ updateKeyboards();
+ }
+ }
+ }
+ }
+
+
+ Component.onCompleted: {
+ enabledKeyboardsLayouts = enabledKeyboardLayouts.value.split(";")
+
+ for(var layout in KeyboardLayouts.keyboards) {
+ keyboardModel.append({
+ "id" : layout,
+ "name": KeyboardLayouts.keyboards[layout]["name"],
+ "local_name": KeyboardLayouts.keyboards[layout]["local_name"],
+ "is_enabled": (enabledKeyboardsLayouts.indexOf(layout) > -1) })
+ }
+ }
+ function updateKeyboards() {
+ var aKeyboard = "";
+ for(var i = 0; i < keyboardModel.count; i++) {
+ var kLayout = keyboardModel.get(i);
+ if(kLayout.is_enabled) {
+ aKeyboard += kLayout.id+";"
+ }
+ }
+ //TODO: Do we allow disable all keyboards layout ?
+ enabledKeyboardLayouts.value = aKeyboard.slice(0,-1)
+ }
+}
|
[-]
[+]
|
Added |
_service:tar_git:glacier-settings-0.0.10.tar.bz2/qml/plugins/keyboard/keyboard.svg
^
|
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>
+<svg width="2048" height="1792" viewBox="0 0 2048 1792" xmlns="http://www.w3.org/2000/svg"><path d="M448 1168v96q0 16-16 16h-96q-16 0-16-16v-96q0-16 16-16h96q16 0 16 16zm128-256v96q0 16-16 16h-224q-16 0-16-16v-96q0-16 16-16h224q16 0 16 16zm-128-256v96q0 16-16 16h-96q-16 0-16-16v-96q0-16 16-16h96q16 0 16 16zm1024 512v96q0 16-16 16h-864q-16 0-16-16v-96q0-16 16-16h864q16 0 16 16zm-640-256v96q0 16-16 16h-96q-16 0-16-16v-96q0-16 16-16h96q16 0 16 16zm-128-256v96q0 16-16 16h-96q-16 0-16-16v-96q0-16 16-16h96q16 0 16 16zm384 256v96q0 16-16 16h-96q-16 0-16-16v-96q0-16 16-16h96q16 0 16 16zm-128-256v96q0 16-16 16h-96q-16 0-16-16v-96q0-16 16-16h96q16 0 16 16zm384 256v96q0 16-16 16h-96q-16 0-16-16v-96q0-16 16-16h96q16 0 16 16zm384 256v96q0 16-16 16h-96q-16 0-16-16v-96q0-16 16-16h96q16 0 16 16zm-512-512v96q0 16-16 16h-96q-16 0-16-16v-96q0-16 16-16h96q16 0 16 16zm256 0v96q0 16-16 16h-96q-16 0-16-16v-96q0-16 16-16h96q16 0 16 16zm256 0v352q0 16-16 16h-224q-16 0-16-16v-96q0-16 16-16h112v-240q0-16 16-16h96q16 0 16 16zm128 752v-896h-1664v896h1664zm128-896v896q0 53-37.5 90.5t-90.5 37.5h-1664q-53 0-90.5-37.5t-37.5-90.5v-896q0-53 37.5-90.5t90.5-37.5h1664q53 0 90.5 37.5t37.5 90.5z" fill="#fff"/></svg>
\ No newline at end of file
|
[-]
[+]
|
Added |
_service:tar_git:glacier-settings-0.0.10.tar.bz2/qml/plugins/wifi/NetworkDelegate.qml
^
|
@@ -0,0 +1,85 @@
+import QtQuick 2.6
+import QtQuick.Window 2.1
+
+import QtQuick.Controls 1.0
+import QtQuick.Controls.Nemo 1.0
+import QtQuick.Controls.Styles.Nemo 1.0
+
+import MeeGo.Connman 0.2
+
+import "../../components"
+
+Item {
+ width: childrenRect.width
+ height: childrenRect.height
+
+ property bool saved
+
+ ListViewItemWithActions{
+ // use set height and visible properties to
+ // skip drawing of some items
+ height: {
+ if (visible)
+ return size.dp(80)
+ else
+ return 0
+ }
+ visible: {
+ if (saved)
+ return modelData.saved
+ else
+ return !modelData.saved
+ }
+
+ label: modelData.name
+ width: wifiPage.width
+
+ description: {
+ if ((modelData.state === "online") || (modelData.state === "ready")) {
+ return qsTr("connected");
+ } else if (modelData.state === "association" || modelData.state === "configuration") {
+ return qsTr("connecting")+"...";
+ } else {
+ if (modelData.security[0] === "none") {
+ return qsTr("open");
+ } else {
+ return qsTr("secure");
+ }
+ }
+ }
+ icon: (getStrengthIndex(modelData.strength) === "0") ?
+ "image://theme/icon_wifi_0" : "image://theme/icon_wifi_focused" +
+ getStrengthIndex(modelData.strength)
+
+ onClicked:{
+ if (modelData.state === "idle" || modelData.state === "failure"){
+ console.log("Show settings page");
+ pageStack.push(Qt.resolvedUrl("WifiSettings.qml"),{modelData: modelData});
+ } else {
+ console.log("Show network status page");
+ var component = Qt.createComponent(Qt.resolvedUrl("WifiStatus.qml")).errorString();
+ console.log(component);
+ pageStack.push(Qt.resolvedUrl("WifiStatus.qml"),{modelData: modelData});
+ }
+ }
+
+ actions: [
+ ActionButton {
+ id: removeNetworkButton
+ iconSource: "/usr/share/glacier-settings/qml/img/trash.svg"
+
+ onClicked: {
+ modelData.remove();
+ }
+ },
+ ActionButton {
+ id: disconnectNetworkButton
+ iconSource: "/usr/share/glacier-settings/qml/img/disconnect.svg"
+ visible: (modelData.state === "online" || modelData.state === "ready")
+ onClicked: {
+ modelData.requestDisconnect();
+ }
+ }
+ ]
+ }
+}
|
[-]
[+]
|
Added |
_service:tar_git:glacier-settings-0.0.10.tar.bz2/qml/plugins/wifi/SavedServices.qml
^
|
@@ -0,0 +1,43 @@
+import QtQuick 2.6
+import QtQuick.Window 2.1
+
+import QtQuick.Controls 1.0
+import QtQuick.Controls.Nemo 1.0
+import QtQuick.Controls.Styles.Nemo 1.0
+
+import MeeGo.Connman 0.2
+
+import "../../components"
+
+Page {
+ id: savedPage
+ headerTools: HeaderToolsLayout{
+ id: header
+ showBackButton: true
+ title: qsTr("Manage saved networks")
+ }
+
+ SavedServiceModel{
+ id: savedModel
+ }
+
+ Component.onCompleted: {
+ savedModel.name = "wifi";
+ }
+
+ ListView{
+ y: header.height
+ width: parent.width
+ height: parent.height - header.height
+ model: savedModel
+ delegate: ListViewItemWithActions{
+ height: size.dp(80)
+ label: networkService.name
+ width: savedPage.width
+
+ onClicked: {
+ pageStack.push(Qt.resolvedUrl("SavedStatus.qml"), {modelData: networkService});
+ }
+ }
+ }
+}
|
[-]
[+]
|
Added |
_service:tar_git:glacier-settings-0.0.10.tar.bz2/qml/plugins/wifi/SavedStatus.qml
^
|
@@ -0,0 +1,76 @@
+import QtQuick 2.6
+import QtQuick.Window 2.1
+
+import QtQuick.Controls 1.0
+import QtQuick.Controls.Nemo 1.0
+import QtQuick.Controls.Styles.Nemo 1.0
+
+import MeeGo.Connman 0.2
+
+import "../../components"
+
+Page {
+ id: savedWifiStatusPage
+ property var modelData
+
+ headerTools: HeaderToolsLayout {
+ id: header
+ showBackButton: true
+ title: modelData.name
+ }
+
+ SettingsColumn{
+ id: actionColumn
+
+ Rectangle{
+ width: parent.width
+ height: childrenRect.height
+ color: "transparent"
+
+ Label{
+ id: nameLabel
+ text: qsTr("Auto connect")
+ anchors{
+ left: parent.left
+ }
+ wrapMode: Text.Wrap
+ font.bold: true
+ }
+
+ CheckBox {
+ id: columnCheckBox
+ checked: modelData.autoConnect
+ anchors{
+ right: parent.right
+ verticalCenter: nameLabel.verticalCenter
+ }
+
+ onClicked: {
+ modelData.autoConnect = !modelData.autoConnect;
+ }
+ }
+ }
+
+ Rectangle{
+ width: parent.width
+ height: childrenRect.height
+
+ color: "transparent"
+
+ Button{
+ id: disconnectButton
+ width: parent.width
+ anchors{
+ horizontalCenter: parent.horizontalCenter
+ verticalCenter: parent.verticalCenter
+ }
+ text: qsTr("Remove")
+ onClicked: {
+ modelData.remove();
+ console.log("Remove clicked");
+ pageStack.pop();
+ }
+ }
+ }
+ }
+}
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-settings-0.0.10.tar.bz2/qml/plugins/wifi/WifiSettings.qml
^
|
@@ -70,22 +70,34 @@
}
}
-
Component.onCompleted: {
- modelData.requestConnect();
networkingModel.networkName.text = modelData.name;
}
SettingsColumn{
TextField{
id: passphrase
+ text: modelData.passphrase
}
Button{
id: connectButton
- height: 48
+ height: Theme.itemHeightSmall
+ onClicked: {
+ modelData.passphrase = passphrase.text;
+ modelData.requestConnect();
+ networkingModel.networkName.text = modelData.name;
+ pageStack.pop();
+ }
text: qsTr("Connect")
}
}
+
+ Connections {
+ target: modelData
+ onConnectRequestFailed: {
+ console.log(error)
+ }
+ }
}
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-settings-0.0.10.tar.bz2/qml/plugins/wifi/WifiStatus.qml
^
|
@@ -31,13 +31,13 @@
id: wifiSettingsPage
property var modelData
- headerTools: HeaderToolsLayout {
+ headerTools: HeaderToolsLayout{
id: header
showBackButton: true;
title: modelData.name
}
- TechnologyModel {
+ TechnologyModel{
id: networkingModel
name: "wifi"
}
@@ -46,13 +46,13 @@
SettingsColumn{
id: form
Row{
- spacing: 24
+ spacing: Theme.itemSpacingLarge
- Label {
+ Label{
text: qsTr("Method")
}
- ButtonRow {
+ ButtonRow{
id: methodButtonRow
model: ListModel{
id: methodModel
@@ -65,24 +65,21 @@
}
Component.onCompleted: {
- if(modelData.ipv4["Method"] === "manual")
- {
+ if(modelData.ipv4["Method"] === "manual") {
methodButtonRow.currentIndex = 1
- }
- else
- {
+ }else{
methodButtonRow.currentIndex = 0
}
}
}
}
- Label {
+ Label{
text: qsTr("Network info")
}
Row{
- spacing: 24
+ spacing: Theme.itemSpacingLarge
Label {
id:ipAddressLabel
text: qsTr("IP address")
@@ -96,7 +93,7 @@
}
Row{
- spacing: 24
+ spacing: Theme.itemSpacingLarge
Label {
id:ipNetmaskLabel
text: qsTr("Net mask")
@@ -109,9 +106,8 @@
}
}
-
Row{
- spacing: 24
+ spacing: Theme.itemSpacingLarge
Label {
id:ipGatewayLabel
text: qsTr("Gateway")
@@ -124,16 +120,16 @@
}
}
- Rectangle {
+ Rectangle{
width: parent.width
height: childrenRect.height
color: "transparent"
- Button {
+ Button{
id: disconnectButton
width: parent.width
- anchors {
+ anchors{
horizontalCenter: parent.horizontalCenter
verticalCenter: parent.verticalCenter
}
@@ -145,6 +141,12 @@
}
}
}
+ }
+ Connections{
+ target: modelData
+ onConnectRequestFailed: {
+ console.log(error)
+ }
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-settings-0.0.10.tar.bz2/qml/plugins/wifi/wifi.qml
^
|
@@ -53,7 +53,7 @@
Label{
id: nameLabel
- text: qsTr("Enable WiFi")
+ text: qsTr("WiFi")
anchors{
left: parent.left
}
@@ -69,17 +69,18 @@
verticalCenter: nameLabel.verticalCenter
}
onClicked:{
- networkingModel.setPowered(columnCheckBox.checked)
+ networkingModel.powered = !networkingModel.powered;
}
}
}
}
-
- ListView {
- id: networkList
+ Flickable{
+ visible: networkingModel.powered
width: parent.width-size.dp(40)
height: parent.height-actionColumn.height-size.dp(80)
+ contentHeight: networks.height+size.dp(50)
+
clip: true
anchors{
top: actionColumn.bottom
@@ -88,96 +89,51 @@
leftMargin: size.dp(20)
}
- model: networkingModel
- delegate: ListViewItemWithActions{
- height: size.dp(80)
- label: modelData.name
-
- description: {
- var state = modelData.state;
- var security = modelData.security[0];
-
- if ((state == "online") || (state == "ready")) {
- return qsTr("connected");
- } else if (state == "association" || state == "configuration") {
- return qsTr("connecting")+"...";
- } else {
- if (security == "none") {
- return qsTr("open");
- } else {
- return qsTr("secure");
- }
- }
+ Column{
+ id: networks
+ spacing: Theme.itemSpacingSmall
+
+ Text{
+ text: qsTr("Saved")
+ color: Theme.textColor
+ font.pointSize: Theme.fontSizeSmall
}
- icon: (getStrengthIndex(modelData.strength) === "0")? "image://theme/icon_wifi_0" : "image://theme/icon_wifi_focused" + getStrengthIndex(modelData.strength)
- onClicked:{
- if (modelData.state == "idle" || modelData.state == "failure"){
- console.log("Show settings page");
- pageStack.push(Qt.resolvedUrl("WifiSettings.qml"),{modelData: modelData})
- } else {
- console.log("Show network status page");
- var component = Qt.createComponent(Qt.resolvedUrl("WifiStatus.qml")).errorString();
- console.log(component)
- pageStack.push(Qt.resolvedUrl("WifiStatus.qml"),{modelData: modelData})
- }
+ Rectangle{
+ width: parent.width
+ height: 1
}
- actions: Rectangle{
- width: childrenRect.width+16
- height: parent.height
- Image{
- id: removeNetworkButton
- source: "../../img/trash.svg"
- width: 64
- height: 64
- fillMode: Image.PreserveAspectFit
- sourceSize{
- width: width
- height: height
- }
- anchors{
- top:parent.top
- topMargin: 8
- left: parent.left
- leftMargin: 8
- }
- MouseArea{
- anchors.fill: parent
- onClicked: {
- modelData.remove();
- networkList.hideAllActions(-1);
- }
- }
- }
+ Repeater{
+ width: parent.width
+ model: networkingModel
+ delegate: NetworkDelegate{saved: true}
+ }
- Image{
- source: "../../img/disconnect.svg"
- visible: (modelData.state == "online" || modelData.state == "ready")
-
- width: 64
- height: 64
- fillMode: Image.PreserveAspectFit
- sourceSize{
- width: width
- height: height
- }
- anchors{
- top:parent.top
- topMargin: 8
- left: removeNetworkButton.right
- leftMargin: 16
- }
- MouseArea{
- anchors.fill: parent
- onClicked: {
- modelData.requestDisconnect();
- networkList.hideAllActions(-1);
- }
- }
- }
+
+ Text{
+ text: qsTr("Enabled")
+ color: Theme.textColor
+ font.pointSize: Theme.fontSizeSmall
+ }
+
+ Rectangle{
+ width: parent.width
+ height: 1
}
+ Repeater{
+ width: parent.width
+ model: networkingModel
+ delegate: NetworkDelegate{saved: false}
+ }
+
+ ListViewItemWithActions{
+ label: qsTr("Manage saved networks")
+ onClicked: {
+ pageStack.push(Qt.resolvedUrl("SavedServices.qml"));
+ }
+ }
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-settings-0.0.10.tar.bz2/src/main.cpp
^
|
@@ -28,6 +28,8 @@
#include <QScreen>
#include <QCoreApplication>
+#include <glacierapp.h>
+
#include "models/settingsmodel.h"
#include "models/settingsproxymodel.h"
@@ -35,8 +37,8 @@
{
setenv("QT_QUICK_CONTROLS_STYLE", "Nemo", 1);
- QGuiApplication app(argc, argv);
- QScreen* sc = app.primaryScreen();
+ QGuiApplication *app = GlacierApp::app(argc, argv);
+ QScreen* sc = app->primaryScreen();
if(sc){
sc->setOrientationUpdateMask(Qt::LandscapeOrientation
| Qt::PortraitOrientation
@@ -44,20 +46,11 @@
| Qt::InvertedPortraitOrientation);
}
- QTranslator myappTranslator;
- myappTranslator.load("/usr/share/glacier-settings/translations/glacier-settings_" + QLocale::system().name() + ".qm");
- app.installTranslator(&myappTranslator);
-
qmlRegisterType<SettingsModel>("org.nemomobile.glacier.settings",1,0,"SettingsModel");
qmlRegisterType<SettingsProxyModel>("org.nemomobile.glacier.settings",1,0,"SettingsProxyModel");
- QQmlApplicationEngine* engine = new QQmlApplicationEngine(QUrl("/usr/share/glacier-settings/qml/glacier-settings.qml"));
- QObject *topLevel = engine->rootObjects().value(0);
- QQuickWindow *window = qobject_cast<QQuickWindow *>(topLevel);
-
- engine->rootContext()->setContextProperty("__window", window);
-
+ QQuickWindow *window = GlacierApp::showWindow();
window->setTitle(QObject::tr("Settings"));
- window->showFullScreen();
- return app.exec();
+
+ return app->exec();
}
|