[-]
[+]
|
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">5638974f811704107cdf6d9b8d27abcbcb619caf</param>
+ <param name="revision">adf96cbbd917481ac456e60047f497e89c6c5f25</param>
<param name="token"/>
<param name="debian">N</param>
<param name="dumb">N</param>
|
[-]
[+]
|
Deleted |
_service:tar_git:glacier-settings-0.0.11.tar.bz2/qml/plugins/bluez4/bluez4.json
^
|
@@ -1,5 +0,0 @@
-{
- "path": "bluez4",
- "category": "Network",
- "title": "Bluetooth"
-}
|
[-]
[+]
|
Deleted |
_service:tar_git:glacier-settings-0.0.11.tar.bz2/qml/plugins/bluez4/bluez4.qml
^
|
@@ -1,204 +0,0 @@
-/*
- * Copyright (C) 2017 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.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 org.kde.bluezqt 1.0 as BluezQt
-import Nemo.Ssu 1.1 as Ssu
-
-import "../../components"
-
-Page {
- id: bluetoothPage
-
- headerTools: HeaderToolsLayout {
- id: header
- showBackButton: true;
- title: qsTr("Bluetooth")
- }
-
- property QtObject _bluetoothManager: BluezQt.Manager
- property QtObject _adapter: _bluetoothManager.usableAdapter
-
- TechnologyModel {
- id: bluetoothModel
- name: "bluetooth"
-
- onPoweredChanged: {
- bluetoothTimer.stop();
- columnCheckBox.indeterminate = false
- columnCheckBox.checked = bluetoothModel.powered
-
- if(powered) {
- _adapter.startDiscovery()
- }
- }
- }
-
- BluezQt.DevicesModel {
- id: bluetoothDevicesModel
- }
-
-
- Timer{
- id: bluetoothTimer
- interval: 5000
- repeat: false
- onTriggered: {
- columnCheckBox.indeterminate = false
- columnCheckBox.checked = bluetoothModel.powered
- }
- }
-
- SettingsColumn{
- id: bluetoothColumn
-
- Rectangle{
- id: bluetoothEnable
- width: parent.width
- height: childrenRect.height
-
- color: "transparent"
-
- Label {
- id: nameLabel
- text: qsTr("Enable Bluetooth")
- anchors {
- left: bluetoothEnable.left
- }
- wrapMode: Text.Wrap
- font.bold: true
- }
-
- CheckBox {
- id: columnCheckBox
- checked: bluetoothModel.powered
- anchors {
- right: bluetoothEnable.right
- verticalCenter: nameLabel.verticalCenter
- }
- onClicked: {
- bluetoothModel.powered = columnCheckBox.checked
- columnCheckBox.indeterminate = true
- bluetoothTimer.start()
- }
- }
- }
-
-
- Label {
- id: bluetoothNameLabel
- text: qsTr("Device name");
- font.bold: true
- }
-
- TextField {
- id: bluetoothNameInput
- text: _adapter.name
-
- width: parent.width
-
- font.pixelSize: Theme.fontSizeLarge
-
- onEditingFinished: {
- if (_adapter) {
- var newName = text.length ? text : Ssu.DeviceInfo.displayName(Ssu.DeviceInfo.DeviceModel);
- if (_adapter.name != newName) {
- _adapter.name = newName
- } else {
- text = _adapter.name
- }
- }
- }
- }
-
- Rectangle{
- width: parent.width
- height: childrenRect.height
- color: "transparent"
-
- Label{
- id: visibilityLabel
- text: qsTr("Visibility")
- anchors{
- left: parent.left
- }
- wrapMode: Text.Wrap
- font.bold: true
- }
-
- CheckBox {
- id: visibilityCheckBox
- checked: bluetoothModel.powered
- anchors{
- right: parent.right
- verticalCenter: visibilityLabel.verticalCenter
- }
- onClicked: {
- if (!_adapter) {
- return;
- }
- _adapter.discoverable = checked;
- }
- }
- }
-
- Rectangle{
- width: parent.width
- height: childrenRect.height
- color: "transparent"
-
- Text{
- id: aviableLabel
- text: qsTr("Aviable devices:")
- color: Theme.textColor
- font.pixelSize: Theme.fontSizeLarge
-
- anchors{
- left: parent.left
- }
- }
- }
-
- Button{
- id: startDiscovery
- text: (_adapter.discovering) ? qsTr("Stop search") : qsTr("Search discovery")
-
- onClicked: {
- if (_adapter.discovering) {
- _adapter.stopDiscovery()
- } else {
- _adapter.startDiscovery()
- }
- }
- }
- }
-
- Connections{
- target: _adapter
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-settings-0.0.12.tar.bz2/glacier-settings.pro
^
|
@@ -52,9 +52,10 @@
qml/plugins/example/example.svg
exampleplugin.path = /usr/share/glacier-settings/qml/plugins/example
-bluez4plugin.files = qml/plugins/bluez4/bluez4.qml\
- qml/plugins/bluez4/bluez4.svg
-bluez4plugin.path = /usr/share/glacier-settings/qml/plugins/bluez4
+bluezplugin.files = qml/plugins/bluez/bluez.qml\
+ qml/plugins/bluez/BtDevisesList.qml \
+ qml/plugins/bluez/bluez.svg
+bluezplugin.path = /usr/share/glacier-settings/qml/plugins/bluez
developermodeplugin.files = qml/plugins/developermode/developermode.qml\
qml/plugins/developermode/developermode.svg
@@ -124,7 +125,7 @@
languageconfigs.path = /usr/share/jolla-supported-languages/
pluginconfigs.files = qml/plugins/example/example.json \
- qml/plugins/bluez4/bluez4.json \
+ qml/plugins/bluez/bluez.json \
qml/plugins/developermode/developermode.json \
qml/plugins/display/display.json \
qml/plugins/datetime/datetime.json \
@@ -149,7 +150,7 @@
privileges \
pluginconfigs \
exampleplugin \
- bluez4plugin \
+ bluezplugin \
developermodeplugin \
displayplugin \
datetimeplugin \
@@ -167,10 +168,10 @@
nfcplugin
DISTFILES += \
+ qml/plugins/bluez/bluez.json \
+ qml/plugins/bluez/bluez.qml \
qml/plugins/example/example.qml \
qml/plugins/example/example.json \
- qml/plugins/bluez4/bluez4.json \
- qml/plugins/bluez4/bluez4.qml \
qml/plugins/developermode/developermode.qml \
qml/plugins/developermode/developermode.json \
qml/plugins/display/display.qml \
|
[-]
[+]
|
Added |
_service:tar_git:glacier-settings-0.0.12.tar.bz2/qml/plugins/bluez/BtDevisesList.qml
^
|
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2020 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
+
+ListView {
+ id: btDeviceList
+ width: parent.width
+ height: childrenRect.height
+
+ clip: true
+
+ delegate: ListViewItemWithActions {
+ id: item
+ label: model.FriendlyName
+ description: model.Address
+ width: parent.width
+ height: Theme.itemHeightLarge
+ showNext: false
+ icon: formatIcon(model.Type)
+
+ actions:[
+ ActionButton {
+ iconSource: model.Paired ? "image://theme/chain-broken" : "image://theme/link"
+ onClicked: {
+ var device = _bluetoothManager.deviceForAddress(model.Address)
+ if(!device) {
+ return
+ }
+
+ if(model.paired) {
+ //disconect
+ device.cancelPairing();
+ } else {
+ //connect
+ device.pair()
+ }
+ }
+ }
+ ]
+
+ }
+}
|
[-]
[+]
|
Added |
_service:tar_git:glacier-settings-0.0.12.tar.bz2/qml/plugins/bluez/bluez.json
^
|
@@ -0,0 +1,5 @@
+{
+ "path": "bluez",
+ "category": "Network",
+ "title": "Bluetooth"
+}
|
[-]
[+]
|
Added |
_service:tar_git:glacier-settings-0.0.12.tar.bz2/qml/plugins/bluez/bluez.qml
^
|
@@ -0,0 +1,253 @@
+/*
+ * Copyright (C) 2017-2020 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.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 org.kde.bluezqt 1.0 as BluezQt
+import Nemo.Ssu 1.1 as Ssu
+
+import "../../components"
+
+Page {
+ id: bluetoothPage
+
+ headerTools: HeaderToolsLayout {
+ id: header
+ showBackButton: true;
+ title: qsTr("Bluetooth")
+ }
+
+ property QtObject _bluetoothManager: BluezQt.Manager
+ property QtObject _adapter: _bluetoothManager.usableAdapter
+
+ TechnologyModel {
+ id: bluetoothModel
+ name: "bluetooth"
+
+ onPoweredChanged: {
+ bluetoothTimer.stop();
+ columnCheckBox.indeterminate = false
+ columnCheckBox.checked = bluetoothModel.powered
+
+ if(powered) {
+ _adapter.startDiscovery()
+ }
+ }
+ }
+
+ BluezQt.DevicesModel {
+ id: bluetoothDevicesNearbyModel
+ filters: BluezQt.DevicesModelPrivate.UnpairedDevices
+ }
+
+ BluezQt.DevicesModel {
+ id: bluetoothDevicesPairedModel
+ filters: BluezQt.DevicesModelPrivate.PairedDevices
+ }
+
+
+ Timer{
+ id: bluetoothTimer
+ interval: 5000
+ repeat: false
+ onTriggered: {
+ columnCheckBox.indeterminate = false
+ columnCheckBox.checked = bluetoothModel.powered
+ }
+ }
+
+ SettingsColumn{
+ id: bluetoothColumn
+ width: parent.width
+ height: parent.height
+
+ CheckBox {
+ id: columnCheckBox
+ checked: bluetoothModel.powered
+ text: qsTr("Enable Bluetooth")
+
+ onClicked: {
+ bluetoothModel.powered = columnCheckBox.checked
+ columnCheckBox.indeterminate = true
+ bluetoothTimer.start()
+ }
+ }
+
+
+ Label {
+ id: bluetoothNameLabel
+ text: qsTr("Device name");
+ font.bold: true
+
+ visible: bluetoothModel.powered
+ }
+
+ TextField {
+ id: bluetoothNameInput
+ text: _adapter.name
+
+ width: parent.width
+
+ font.pixelSize: Theme.fontSizeLarge
+ visible: bluetoothModel.powered
+
+ onEditingFinished: {
+ if (_adapter) {
+ var newName = text.length ? text : Ssu.DeviceInfo.displayName(Ssu.DeviceInfo.DeviceModel);
+ if (_adapter.name != newName) {
+ _adapter.name = newName
+ } else {
+ text = _adapter.name
+ }
+ }
+ }
+ }
+
+ CheckBox {
+ id: visibilityCheckBox
+ checked: bluetoothModel.powered
+ visible: bluetoothModel.powered
+ text: qsTr("Visibility")
+
+ onClicked: {
+ if (!_adapter) {
+ return;
+ }
+ _adapter.discoverable = checked;
+ }
+ }
+
+ Text{
+ id: pairedLabel
+ text: qsTr("Paired devices:")
+ color: Theme.textColor
+ font.pixelSize: Theme.fontSizeLarge
+
+ visible: bluetoothModel.powered && pairedListView.count > 0
+
+ anchors{
+ left: parent.left
+ }
+ }
+
+ BtDevisesList{
+ id: pairedListView
+ model: bluetoothDevicesPairedModel
+ visible: bluetoothModel.powered
+ }
+
+
+ Text{
+ id: aviableLabel
+ text: qsTr("Devices nearby:")
+ color: Theme.textColor
+ font.pixelSize: Theme.fontSizeLarge
+
+ visible: bluetoothModel.powered && nearbyListView.count > 0
+
+ anchors{
+ left: parent.left
+ }
+ }
+
+ BtDevisesList{
+ id: nearbyListView
+ model: bluetoothDevicesNearbyModel
+ visible: bluetoothModel.powered
+ }
+
+
+ Button{
+ id: startDiscovery
+ text: (_adapter.discovering) ? qsTr("Stop search") : qsTr("Search discovery")
+ visible: bluetoothModel.powered
+ width: parent.width
+
+ onClicked: {
+ if (_adapter.discovering) {
+ _adapter.stopDiscovery()
+ } else {
+ _adapter.startDiscovery()
+ }
+ }
+ }
+ }
+
+ function formatIcon(devType) {
+ /* Aviable types
+ 0 - Phone,
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-settings-0.0.12.tar.bz2/qml/plugins/bluez/bluez.svg
^
|
(renamed from qml/plugins/bluez4/bluez4.svg)
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-settings-0.0.12.tar.bz2/qml/plugins/developermode/developermode.qml
^
|
@@ -69,32 +69,6 @@
}
Rectangle{
- id: remoteLoginEnabled
- width: parent.width
- height: childrenRect.height
-
- color: "transparent"
-
- Label{
- id: remoteLoginEnabledLabel
- text: qsTr("Enable remote login");
- anchors{
- left: parent.left
- }
- }
-
- CheckBox{
- id: remoteLoginEnabledCheck
- checked: devModeSettings.remoteLoginEnabled
- anchors{
- right: parent.right
- verticalCenter: remoteLoginEnabledLabel.verticalCenter
- }
- onClicked: devModeSettings.setRemoteLogin(checked)
- }
- }
-
- Rectangle{
id: wlanIpAddress
width: parent.width
height: childrenRect.height
|