summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeemu Holappa <teemu.holappa@theqtcompany.com>2016-02-29 14:58:02 +0200
committerTeemu Holappa <teemu.holappa@theqtcompany.com>2016-02-29 13:25:49 +0000
commita34cacb1a239dff4033b6beffd811b35db7c339f (patch)
treeff33f016419f0eec6ddde09f437c120b3670be40
parentc8139032aa86e03ff44a0e51af6e9c143e38bf15 (diff)
Revert "Device settings UI."
This reverts commit ccbfa0884072c26979a6475de71635c19a474cca. Settings UI is not targeted to 5.6 branch. Change-Id: Ic40c6b1eec05a8509bf75f0f69fa3d551a0806ee Reviewed-by: Samuli Piippo <samuli.piippo@theqtcompany.com>
-rw-r--r--src/qtdevicesettings/bluetoothsettingsplugin/Bluetooth.qml89
-rw-r--r--src/qtdevicesettings/bluetoothsettingsplugin/Discovery.qml142
-rw-r--r--src/qtdevicesettings/bluetoothsettingsplugin/bluetoothdevice.cpp169
-rw-r--r--src/qtdevicesettings/bluetoothsettingsplugin/bluetoothdevice.h85
-rw-r--r--src/qtdevicesettings/bluetoothsettingsplugin/bluetoothsettingsplugin.pro32
-rw-r--r--src/qtdevicesettings/bluetoothsettingsplugin/bluez/bluetoothdevice_p.cpp98
-rw-r--r--src/qtdevicesettings/bluetoothsettingsplugin/bluez/bluetoothdevice_p.h56
-rw-r--r--src/qtdevicesettings/bluetoothsettingsplugin/bluez/bluez.pri21
-rw-r--r--src/qtdevicesettings/bluetoothsettingsplugin/bluez/datatypes.h53
-rw-r--r--src/qtdevicesettings/bluetoothsettingsplugin/bluez/device1.xml31
-rw-r--r--src/qtdevicesettings/bluetoothsettingsplugin/bluez/objectmanager.xml20
-rw-r--r--src/qtdevicesettings/bluetoothsettingsplugin/discoverymodel.cpp246
-rw-r--r--src/qtdevicesettings/bluetoothsettingsplugin/discoverymodel.h130
-rw-r--r--src/qtdevicesettings/bluetoothsettingsplugin/icons.qrc16
-rw-r--r--src/qtdevicesettings/bluetoothsettingsplugin/plugin.cpp70
-rw-r--r--src/qtdevicesettings/bluetoothsettingsplugin/qml.qrc6
-rw-r--r--src/qtdevicesettings/bluetoothsettingsplugin/qmldir3
-rw-r--r--src/qtdevicesettings/devicesettings.pro12
-rw-r--r--src/qtdevicesettings/generalsettingsplugin/Display.qml137
-rw-r--r--src/qtdevicesettings/generalsettingsplugin/Sound.qml86
-rw-r--r--src/qtdevicesettings/generalsettingsplugin/generalsettingsplugin.pro24
-rw-r--r--src/qtdevicesettings/generalsettingsplugin/icons.qrc7
-rw-r--r--src/qtdevicesettings/generalsettingsplugin/plugin.cpp53
-rw-r--r--src/qtdevicesettings/generalsettingsplugin/qml.qrc6
-rw-r--r--src/qtdevicesettings/generalsettingsplugin/qmldir2
-rw-r--r--src/qtdevicesettings/icons/Alert_yellow_1x.pngbin775 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/Audio_qt_6x.pngbin444 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/Bluetooth_qt_1x.pngbin858 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/Bluetooth_qt_6x.pngbin2349 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/Camcorder_qt_1x.pngbin719 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/Camera_qt_1x.pngbin1003 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/Chevron-left_black_1x.pngbin707 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/Clock_qt_1x.pngbin1185 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/Clock_qt_6x.pngbin3438 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/Display_qt_6x.pngbin1157 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/Flag_qt_6x.pngbin1888 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/Headphones_qt_1x.pngbin1041 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/Heartbeat_qt_1x.pngbin1061 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/Keyboard_qt_1x.pngbin1116 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/Laptop_qt_1x.pngbin861 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/Microphone_qt_1x.pngbin943 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/MobilePhone_qt_1x.pngbin785 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/Mouse_qt_1x.pngbin732 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/Power_black_1x.pngbin1161 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/Tablet_qt_1x.pngbin721 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/Volume_down_qt_1x.pngbin571 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/Volume_mute_qt_1x.pngbin778 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/Volume_up_qt_1x.pngbin632 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/WifiAnim_black_2x.pngbin1673 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/Wifi_lightgray_2x.pngbin924 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/World_qt_6x.pngbin5789 -> 0 bytes
-rwxr-xr-xsrc/qtdevicesettings/icons/generate_icons.sh27
-rw-r--r--src/qtdevicesettings/icons/ref/Audio.pngbin135 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Back.pngbin1725 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Bluetooth.pngbin1364 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Camcorder.pngbin1036 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Camera.pngbin1889 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Chevron-left.pngbin1475 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Chevron-right.pngbin1463 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Circle-x.pngbin3358 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Clock.pngbin2438 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Cogs.pngbin2756 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Connections.pngbin3226 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Display.pngbin754 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Flag.pngbin1395 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Headphones.pngbin2141 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Heartbeat.pngbin2280 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Keyboard.pngbin571 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Laptop.pngbin753 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Lock.pngbin1043 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Microphone.pngbin1891 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/MobilePhone.pngbin1034 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Mouse.pngbin1560 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Plus.pngbin2888 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Power.pngbin2466 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Settings.pngbin2630 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Tablet.pngbin892 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Volume_down.pngbin505 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Volume_mute.pngbin1000 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Volume_up.pngbin513 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Wifi.pngbin2102 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Wifi1.pngbin824 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Wifi2.pngbin987 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Wifi3.pngbin1195 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Wifi4.pngbin2102 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/WifiAnim.pngbin2830 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/World.pngbin4559 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/Wrench.pngbin1677 -> 0 bytes
-rw-r--r--src/qtdevicesettings/icons/ref/extra/Alert.pngbin1502 -> 0 bytes
-rwxr-xr-xsrc/qtdevicesettings/icons/scripts/cimage.sh45
-rwxr-xr-xsrc/qtdevicesettings/icons/scripts/cimages.sh28
-rwxr-xr-xsrc/qtdevicesettings/icons/scripts/rimage.sh37
-rwxr-xr-xsrc/qtdevicesettings/icons/scripts/rimages.sh25
-rw-r--r--src/qtdevicesettings/localesettingsplugin/Language.qml111
-rw-r--r--src/qtdevicesettings/localesettingsplugin/RegionSelect.qml96
-rw-r--r--src/qtdevicesettings/localesettingsplugin/icons.qrc4
-rw-r--r--src/qtdevicesettings/localesettingsplugin/locale.xml12
-rw-r--r--src/qtdevicesettings/localesettingsplugin/localefiltermodel.cpp96
-rw-r--r--src/qtdevicesettings/localesettingsplugin/localefiltermodel.h59
-rw-r--r--src/qtdevicesettings/localesettingsplugin/localemodel.cpp167
-rw-r--r--src/qtdevicesettings/localesettingsplugin/localemodel.h96
-rw-r--r--src/qtdevicesettings/localesettingsplugin/localesettingsplugin.pro36
-rw-r--r--src/qtdevicesettings/localesettingsplugin/plugin.cpp75
-rw-r--r--src/qtdevicesettings/localesettingsplugin/qml.qrc6
-rw-r--r--src/qtdevicesettings/localesettingsplugin/qmldir3
-rw-r--r--src/qtdevicesettings/localesettingsplugin/systemlocale.cpp57
-rw-r--r--src/qtdevicesettings/localesettingsplugin/systemlocale.h62
-rw-r--r--src/qtdevicesettings/localesettingsplugin/systemlocale_p.h87
-rw-r--r--src/qtdevicesettings/networksettingsplugin/icons.qrc4
-rw-r--r--src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/EditWiredSettings.qml640
-rw-r--r--src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/IpAddressTextField.qml43
-rw-r--r--src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/NetworkDetails.qml42
-rw-r--r--src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/NetworkSettings.qml135
-rw-r--r--src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/WifiSettings.qml94
-rw-r--r--src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/WiredSettings.qml205
-rw-r--r--src/qtdevicesettings/networksettingsplugin/networksettings/connman/connman_manager.xml108
-rw-r--r--src/qtdevicesettings/networksettingsplugin/networksettings/connman/connman_service.xml41
-rw-r--r--src/qtdevicesettings/networksettingsplugin/networksettings/connman/connman_technology.xml23
-rw-r--r--src/qtdevicesettings/networksettingsplugin/networksettings/connman/networksettingsmanager_linux.cpp583
-rw-r--r--src/qtdevicesettings/networksettingsplugin/networksettings/connman/networksettingsmanager_linux_p.h148
-rw-r--r--src/qtdevicesettings/networksettingsplugin/networksettings/networkaddressmodel.cpp83
-rw-r--r--src/qtdevicesettings/networksettingsplugin/networksettings/networkaddressmodel.h60
-rw-r--r--src/qtdevicesettings/networksettingsplugin/networksettings/networkconfig.h394
-rw-r--r--src/qtdevicesettings/networksettingsplugin/networksettings/networksettings.pri28
-rw-r--r--src/qtdevicesettings/networksettingsplugin/networksettings/networksettingsmanager.cpp167
-rw-r--r--src/qtdevicesettings/networksettingsplugin/networksettings/networksettingsmanager.h127
-rw-r--r--src/qtdevicesettings/networksettingsplugin/networksettings/networksmodel.cpp111
-rw-r--r--src/qtdevicesettings/networksettingsplugin/networksettings/networksmodel.h131
-rw-r--r--src/qtdevicesettings/networksettingsplugin/networksettingsplugin.pro45
-rw-r--r--src/qtdevicesettings/networksettingsplugin/networksettingsplugin_plugin.cpp61
-rw-r--r--src/qtdevicesettings/networksettingsplugin/networksettingsplugin_plugin.h51
-rw-r--r--src/qtdevicesettings/networksettingsplugin/qml.qrc10
-rw-r--r--src/qtdevicesettings/networksettingsplugin/qmldir4
-rw-r--r--src/qtdevicesettings/settingscomponents/icons.qrc21
-rw-r--r--src/qtdevicesettings/settingscomponents/imports/Settings/CustomCombobox.qml184
-rw-r--r--src/qtdevicesettings/settingscomponents/imports/Settings/FlatStyledDropdownDelegate.qml78
-rw-r--r--src/qtdevicesettings/settingscomponents/imports/Settings/IconButton.qml54
-rw-r--r--src/qtdevicesettings/settingscomponents/imports/Settings/TextLabel.qml47
-rw-r--r--src/qtdevicesettings/settingscomponents/imports/Settings/qmldir5
-rw-r--r--src/qtdevicesettings/settingscomponents/settingscomponents.pro26
-rw-r--r--src/qtdevicesettings/settingsui/deployment.pri27
-rw-r--r--src/qtdevicesettings/settingsui/icons.qrc12
-rw-r--r--src/qtdevicesettings/settingsui/main.cpp41
-rw-r--r--src/qtdevicesettings/settingsui/main.qml170
-rw-r--r--src/qtdevicesettings/settingsui/qml.qrc6
-rw-r--r--src/qtdevicesettings/settingsui/settingsui.pro17
-rw-r--r--src/qtdevicesettings/settingsui/settingsview.xml41
-rw-r--r--src/qtdevicesettings/timedateplugin/AnalogClock.qml255
-rw-r--r--src/qtdevicesettings/timedateplugin/TimeDate.qml167
-rw-r--r--src/qtdevicesettings/timedateplugin/TimezonesView.qml94
-rw-r--r--src/qtdevicesettings/timedateplugin/icons.qrc4
-rw-r--r--src/qtdevicesettings/timedateplugin/plugin.cpp78
-rw-r--r--src/qtdevicesettings/timedateplugin/qml.qrc7
-rw-r--r--src/qtdevicesettings/timedateplugin/qmldir3
-rw-r--r--src/qtdevicesettings/timedateplugin/systemtime.cpp85
-rw-r--r--src/qtdevicesettings/timedateplugin/systemtime.h73
-rw-r--r--src/qtdevicesettings/timedateplugin/systemtime_p.h88
-rw-r--r--src/qtdevicesettings/timedateplugin/timedated.xml30
-rw-r--r--src/qtdevicesettings/timedateplugin/timedateplugin.pro42
-rw-r--r--src/qtdevicesettings/timedateplugin/timezonefiltermodel.cpp104
-rw-r--r--src/qtdevicesettings/timedateplugin/timezonefiltermodel.h59
-rw-r--r--src/qtdevicesettings/timedateplugin/timezonemodel.cpp140
-rw-r--r--src/qtdevicesettings/timedateplugin/timezonemodel.h89
-rw-r--r--src/qtdevicesettings/wifisettingsplugin/WifiManagerView.qml180
-rw-r--r--src/qtdevicesettings/wifisettingsplugin/WifiSelectorDelegate.qml87
-rw-r--r--src/qtdevicesettings/wifisettingsplugin/WifiSignalMonitor.qml83
-rw-r--r--src/qtdevicesettings/wifisettingsplugin/icons.qrc7
-rw-r--r--src/qtdevicesettings/wifisettingsplugin/plugin.cpp58
-rw-r--r--src/qtdevicesettings/wifisettingsplugin/qml.qrc7
-rw-r--r--src/qtdevicesettings/wifisettingsplugin/qmldir2
-rw-r--r--src/qtdevicesettings/wifisettingsplugin/wifisettingsplugin.pro26
171 files changed, 0 insertions, 8558 deletions
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/Bluetooth.qml b/src/qtdevicesettings/bluetoothsettingsplugin/Bluetooth.qml
deleted file mode 100644
index 88a7d7c..0000000
--- a/src/qtdevicesettings/bluetoothsettingsplugin/Bluetooth.qml
+++ /dev/null
@@ -1,89 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-import QtQuick.Layouts 1.1
-import QtQuick.Controls 1.4
-import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
-import com.theqtcompany.settings.bluetooth 1.0
-
-Item {
- id: root
- property string title: qsTr("Bluetooth Settings")
-
- Column {
- id: content
- anchors.fill: parent
- anchors.margins: Math.round(40 * Flat.FlatStyle.scaleFactor)
-
- GroupBox {
- id: groupBox
- width: parent.width
- title: qsTr("Bluetooth status")
- Layout.fillWidth: true
-
- ColumnLayout {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- width: parent.width
- Layout.fillWidth: true
-
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- TextLabel {
- id: off
- text: qsTr("Off")
- }
-
- Switch {
- checked: BtDevice.powered
- onCheckedChanged: BtDevice.powered = checked
- }
-
- TextLabel {
- text: qsTr("On")
- }
- }
- }
- }
-
- Discovery {
- id: discovery
- visible: BtDevice.powered
- width: parent.width
- height: Math.round(content.height - 100 * Flat.FlatStyle.scaleFactor)
- }
- }
-}
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/Discovery.qml b/src/qtdevicesettings/bluetoothsettingsplugin/Discovery.qml
deleted file mode 100644
index d40ccbe..0000000
--- a/src/qtdevicesettings/bluetoothsettingsplugin/Discovery.qml
+++ /dev/null
@@ -1,142 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-import QtQuick.Layouts 1.1
-import QtQuick.Controls 1.4
-import QtBluetooth 5.2
-import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
-import com.theqtcompany.settings.bluetooth 1.0
-
-Item {
- id: top
- property BluetoothService currentService
-
- GroupBox {
- id: groupBox
- title: qsTr("Devices")
- width: parent.width
-
- ListView {
- id: mainList
- width: parent.width
- height: top.height
-
- function getIcon(deviceType) {
- switch (deviceType) {
- case BtDeviceItem.Computer:
- return "../icons/Laptop_qt_1x.png"
- case BtDeviceItem.Headphones:
- return "../icons/Headphones_qt_1x.png"
- case BtDeviceItem.Microphone:
- return "../icons/Microphone_qt_1x.png"
- case BtDeviceItem.Mouse:
- return "../icons/Mouse_qt_1x.png"
- case BtDeviceItem.Keyboard:
- return "../icons/Keyboard_qt_1x.png"
- default:
- return "../icons/Bluetooth_qt_1x.png"
- }
- }
-
- model: BtDevice.deviceModel
- delegate: Rectangle {
- id: btDelegate
- width: parent.width
- height: Math.round(column.height + 10 * Flat.FlatStyle.scaleFactor)
-
- property bool expended: false;
- clip: true
-
- MouseArea {
- anchors.fill: parent
- onClicked: btDelegate.expended = !btDelegate.expended
- }
-
- RowLayout {
- anchors.top: parent.top
- anchors.left: parent.left
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
-
- Image {
- id: bticon
- source: mainList.getIcon(type)
- }
-
- Column {
- id: column
- TextLabel {
- id: bttext
- text: name
- }
-
- TextLabel {
- id: details
- opacity: btDelegate.expended ? 1 : 0.0
- text: address
- Behavior on opacity {
- NumberAnimation { duration: 200}
- }
- }
- }
- }
-
- Button {
- anchors.right: parent.right
- anchors.rightMargin: Math.round(10 * Flat.FlatStyle.scaleFactor)
- visible: !BtDevice.scanning
- text: connected ? qsTr("Disconnect") : qsTr("Connect")
-
- onClicked : connected ? BtDevice.requestDisconnect(address) : BtDevice.requestPairing(address);
- }
-
- Behavior on height { NumberAnimation { duration: 200} }
-
- }
- focus: true
- }
- }
-
- BusyIndicator {
- anchors.right: groupBox.right
- anchors.top: groupBox.top
- anchors.topMargin: Math.round(40 * Flat.FlatStyle.scaleFactor)
- anchors.rightMargin: Math.round(10 * Flat.FlatStyle.scaleFactor)
- height: Math.round(20 * Flat.FlatStyle.scaleFactor)
- width: Math.round(20 * Flat.FlatStyle.scaleFactor)
- running: BtDevice.scanning
- }
-}
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/bluetoothdevice.cpp b/src/qtdevicesettings/bluetoothsettingsplugin/bluetoothdevice.cpp
deleted file mode 100644
index 65a7422..0000000
--- a/src/qtdevicesettings/bluetoothsettingsplugin/bluetoothdevice.cpp
+++ /dev/null
@@ -1,169 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include <discoverymodel.h>
-#include "bluetoothdevice.h"
-#include "bluez/bluetoothdevice_p.h"
-
-BluetoothDevice::BluetoothDevice(QObject *parent) : QObject(parent)
- ,m_localDevice(new QBluetoothLocalDevice(this))
- ,m_deviceModel(new DiscoveryModel(this))
- ,m_powered(false)
- ,m_scanning(true)
-{
- m_powered = m_localDevice->hostMode() != QBluetoothLocalDevice::HostPoweredOff;
-
- connect(m_localDevice, &QBluetoothLocalDevice::hostModeStateChanged, this, &BluetoothDevice::deviceStateChanged);
- connect(m_localDevice, &QBluetoothLocalDevice::deviceConnected, this, &BluetoothDevice::deviceConnected);
- connect(m_localDevice, &QBluetoothLocalDevice::deviceDisconnected, this, &BluetoothDevice::deviceDisconnected);
- connect(m_deviceModel, &DiscoveryModel::scanFinished, this, &BluetoothDevice::scanFinished);
-
- if (m_powered) {
- m_deviceModel->scanDevices();
- }
-
-}
-
-void BluetoothDevice::deviceStateChanged(QBluetoothLocalDevice::HostMode state)
-{
- m_powered = state != QBluetoothLocalDevice::HostPoweredOff;
- emit poweredChanged();
-}
-
-bool BluetoothDevice::powered() const
-{
- return m_powered;
-}
-
-void BluetoothDevice::setPowered(const bool& aPowered)
-{
- if (aPowered) {
- m_localDevice->powerOn();
- }
- else {
- m_localDevice->setHostMode(QBluetoothLocalDevice::HostPoweredOff);
- }
-}
-
-QObject* BluetoothDevice::deviceModel() const
-{
- return static_cast<QObject*>(m_deviceModel);
-}
-
-void BluetoothDevice::scanFinished()
-{
- m_scanning = false;
- emit scanningChanged();
- updateConnectionStatuses();
-}
-
-bool BluetoothDevice::scanning() const
-{
- return m_scanning;
-}
-
-void BluetoothDevice::setScanning(const bool& aScan)
-{
- if (m_scanning && !aScan) {
- //TODO m_deviceModel->cancel();
- }
- else if (aScan && !m_scanning) {
- m_deviceModel->scanDevices();
- m_scanning = true;
- emit scanningChanged();
- }
-}
-
-void BluetoothDevice::updateConnectionStatuses()
-{
- QList<QBluetoothAddress> connectedDevices =
- m_localDevice->connectedDevices();
-
- foreach (QBluetoothAddress addr, connectedDevices) {
- m_deviceModel->setConnected(addr.toString(), true);
- }
-}
-
-void BluetoothDevice::requestPairing(const QString& address)
-{
- QBluetoothAddress addr(address);
- m_localDevice->requestPairing(addr, QBluetoothLocalDevice::Paired);
- connect(m_localDevice, &QBluetoothLocalDevice::pairingDisplayConfirmation, this, &BluetoothDevice::pairingDisplayConfirmation);
-
- connect(m_localDevice, &QBluetoothLocalDevice::pairingDisplayPinCode, this, &BluetoothDevice::pairingDisplayPinCode);
-
- connect(m_localDevice, &QBluetoothLocalDevice::pairingFinished, this, &BluetoothDevice::pairingFinished);
-}
-
-void BluetoothDevice::requestConnect(const QString &address)
-{
- QScopedPointer<BluetoothDevicePrivate> connectionHandler(new BluetoothDevicePrivate(address));
- connectionHandler->connectDevice();
-}
-
-void BluetoothDevice::requestDisconnect(const QString& address)
-{
- QScopedPointer<BluetoothDevicePrivate> connectionHandler(new BluetoothDevicePrivate(address));
- connectionHandler->disconnectDevice();
-}
-
-void BluetoothDevice::pairingDisplayConfirmation(const QBluetoothAddress & address, QString pin)
-{
- Q_UNUSED(address);
- Q_UNUSED(pin);
-}
-
-void BluetoothDevice::pairingDisplayPinCode(const QBluetoothAddress & address, QString pin)
-{
- Q_UNUSED(address);
- Q_UNUSED(pin);
-}
-
-void BluetoothDevice::pairingFinished(const QBluetoothAddress & address, QBluetoothLocalDevice::Pairing pairing)
-{
- if (pairing == QBluetoothLocalDevice::Paired) {
- requestConnect(address.toString());
- }
-}
-
-void BluetoothDevice::deviceConnected(const QBluetoothAddress & address)
-{
- m_deviceModel->setConnected(address.toString(), true);
-}
-
-void BluetoothDevice::deviceDisconnected(const QBluetoothAddress & address)
-{
- m_deviceModel->setConnected(address.toString(), false);
-}
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/bluetoothdevice.h b/src/qtdevicesettings/bluetoothsettingsplugin/bluetoothdevice.h
deleted file mode 100644
index 370b2bc..0000000
--- a/src/qtdevicesettings/bluetoothsettingsplugin/bluetoothdevice.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef BLUETOOTHDEVICE_H
-#define BLUETOOTHDEVICE_H
-
-#include <QObject>
-#include <QBluetoothLocalDevice>
-
-class DiscoveryModel;
-
-class BluetoothDevice : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(bool scanning READ scanning WRITE setScanning NOTIFY scanningChanged)
- Q_PROPERTY(bool powered READ powered WRITE setPowered NOTIFY poweredChanged)
- Q_PROPERTY(QObject* deviceModel READ deviceModel CONSTANT)
-public:
- explicit BluetoothDevice(QObject *parent = 0);
- bool powered() const;
- void setPowered(const bool& aPowered);
- QObject* deviceModel() const;
- bool scanning() const;
- void setScanning(const bool& aScan);
- Q_INVOKABLE void requestPairing(const QString& address);
- Q_INVOKABLE void requestConnect(const QString& address);
- Q_INVOKABLE void requestDisconnect(const QString& address);
-signals:
- void poweredChanged();
- void scanningChanged();
-
-public slots:
- void deviceStateChanged(QBluetoothLocalDevice::HostMode state);
- void scanFinished();
- //These are not yet signaled
- //See bug https://bugreports.qt.io/browse/QTBUG-38401
- void pairingDisplayConfirmation(const QBluetoothAddress & address, QString pin);
- void pairingDisplayPinCode(const QBluetoothAddress & address, QString pin);
- void pairingFinished(const QBluetoothAddress & address, QBluetoothLocalDevice::Pairing pairing);
- void deviceConnected(const QBluetoothAddress & address);
- void deviceDisconnected(const QBluetoothAddress & address);
-
-private:
- void updateConnectionStatuses();
-
-private:
- QBluetoothLocalDevice* m_localDevice;
- DiscoveryModel *m_deviceModel;
- bool m_powered;
- bool m_scanning;
-};
-
-#endif // BLUETOOTHDEVICE_H
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/bluetoothsettingsplugin.pro b/src/qtdevicesettings/bluetoothsettingsplugin/bluetoothsettingsplugin.pro
deleted file mode 100644
index 5ca0add..0000000
--- a/src/qtdevicesettings/bluetoothsettingsplugin/bluetoothsettingsplugin.pro
+++ /dev/null
@@ -1,32 +0,0 @@
-TEMPLATE = lib
-CONFIG += plugin
-QT += qml bluetooth
-uri = com.theqtcompany.settings.bluetooth
-
-TARGET = btsettingsplugin
-
-include(bluez/bluez.pri)
-
-HEADERS = \
- bluetoothdevice.h \
- discoverymodel.h
-
-SOURCES += plugin.cpp \
- bluetoothdevice.cpp \
- discoverymodel.cpp
-
-
-pluginfiles.files += \
- qmldir \
-
-installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
-
-target.path = $$installPath
-pluginfiles.path += $$installPath
-INSTALLS += target pluginfiles
-
-
-RESOURCES += \
- icons.qrc \
- qml.qrc
-
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/bluetoothdevice_p.cpp b/src/qtdevicesettings/bluetoothsettingsplugin/bluez/bluetoothdevice_p.cpp
deleted file mode 100644
index ded84f2..0000000
--- a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/bluetoothdevice_p.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "bluetoothdevice_p.h"
-#include "datatypes.h"
-#include "objectmanager_interface.cpp"
-#include "moc_objectmanager_interface.cpp"
-#include "device1_interface.h"
-
-
-BluetoothDevicePrivate::BluetoothDevicePrivate(const QString& address, QObject *parent)
- :QObject(parent)
- ,m_address(address)
-{
-
-}
-
-OrgBluezDevice1Interface* BluetoothDevicePrivate::findDevice()
-{
- OrgFreedesktopDBusObjectManagerInterface manager(QStringLiteral("org.bluez"),
- QStringLiteral("/"),
- QDBusConnection::systemBus());
- QDBusPendingReply<ManagedObjectList> reply = manager.GetManagedObjects();
- reply.waitForFinished();
- if (reply.isError()) {
- qWarning() << "Failed to get objects";
- return NULL;
- }
-
- ManagedObjectList managedObjectList = reply.value();
- for (ManagedObjectList::const_iterator it = managedObjectList.constBegin(); it != managedObjectList.constEnd(); ++it) {
- const QDBusObjectPath &path = it.key();
-
- const InterfaceList &ifaceList = it.value();
- for (InterfaceList::const_iterator jt = ifaceList.constBegin(); jt != ifaceList.constEnd(); ++jt) {
- const QString &iface = jt.key();
- const QVariantMap &ifaceValues = jt.value();
- if (iface == QStringLiteral("org.bluez.Device1")) {
- if (ifaceValues["Address"] == m_address) {
- OrgBluezDevice1Interface *devIf = new OrgBluezDevice1Interface("org.bluez", path.path(), QDBusConnection::systemBus());
- return devIf;
- }
- }
- }
- }
- return NULL;
-}
-
-
-void BluetoothDevicePrivate::connectDevice()
-{
- OrgBluezDevice1Interface *dev = findDevice();
- if (dev) {
- dev->Connect();
- dev->deleteLater();
- }
-}
-
-void BluetoothDevicePrivate::disconnectDevice()
-{
- OrgBluezDevice1Interface *dev = findDevice();
- if (dev) {
- dev->Disconnect();
- dev->deleteLater();
- }
-}
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/bluetoothdevice_p.h b/src/qtdevicesettings/bluetoothsettingsplugin/bluez/bluetoothdevice_p.h
deleted file mode 100644
index 0bd9599..0000000
--- a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/bluetoothdevice_p.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utils module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef BLUETOOTHDEVICE__P_H
-#define BLUETOOTHDEVICE__P_H
-
-#include <QObject>
-#include <bluetooth/bluetooth.h>
-
-class OrgBluezDevice1Interface;
-
-class BluetoothDevicePrivate : public QObject
-{
-public:
- explicit BluetoothDevicePrivate(const QString& address, QObject *parent=0);
- void connectDevice();
- void disconnectDevice();
-
-private:
- OrgBluezDevice1Interface* findDevice();
- QString m_address;
-};
-
-#endif // BLUETOOTHDEVICE__P_H
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/bluez.pri b/src/qtdevicesettings/bluetoothsettingsplugin/bluez/bluez.pri
deleted file mode 100644
index f20be87..0000000
--- a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/bluez.pri
+++ /dev/null
@@ -1,21 +0,0 @@
-#-------------------------------------------------
-#
-# Project created by QtCreator 2015-11-03T13:52:45
-#
-#-------------------------------------------------
-
-QT += core dbus
-
-INCLUDEPATH += $${PWD}
-INCLUDEPATH += $${PWD}/bluez
-
-DBUS_INTERFACES = \
- $${PWD}/objectmanager.xml \
- $${PWD}/device1.xml \
-
-HEADERS += \
- $$PWD/bluetoothdevice_p.h \
- $$PWD/dbusdatatypes.h
-
-SOURCES += \
- $$PWD/bluetoothdevice_p.cpp
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/datatypes.h b/src/qtdevicesettings/bluetoothsettingsplugin/bluez/datatypes.h
deleted file mode 100644
index b794c47..0000000
--- a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/datatypes.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utils module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef DATATYPES_H
-#define DATATYPES_H
-
-#include <QObject>
-#include <QtDBus>
-#include <QMap>
-#include <QVariantMap>
-#include <QtDBus/QDBusObjectPath>
-#include <QtCore/QMetaType>
-
-typedef QMap<QString, QVariantMap> InterfaceList;
-typedef QMap<QDBusObjectPath, InterfaceList> ManagedObjectList;
-
-Q_DECLARE_METATYPE(InterfaceList)
-Q_DECLARE_METATYPE(ManagedObjectList)
-
-
-#endif // DATATYPES_H
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/device1.xml b/src/qtdevicesettings/bluetoothsettingsplugin/bluez/device1.xml
deleted file mode 100644
index 5b16992..0000000
--- a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/device1.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
- "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
-<node>
- <interface name="org.bluez.Device1">
- <method name="Disconnect"></method>
- <method name="Connect"></method>
- <method name="ConnectProfile">
- <arg name="UUID" type="s" direction="in"/>
- </method>
- <method name="DisconnectProfile">
- <arg name="UUID" type="s" direction="in"/>
- </method>
- <method name="Pair"></method>
- <method name="CancelPairing"></method>
- <property name="Address" type="s" access="read"></property>
- <property name="Name" type="s" access="read"></property>
- <property name="Alias" type="s" access="readwrite"></property>
- <property name="Appearance" type="q" access="read"></property>
- <property name="Icon" type="s" access="read"></property>
- <property name="Paired" type="b" access="read"></property>
- <property name="Trusted" type="b" access="readwrite"></property>
- <property name="Blocked" type="b" access="readwrite"></property>
- <property name="LegacyPairing" type="b" access="read"></property>
- <property name="RSSI" type="n" access="read"></property>
- <property name="Connected" type="b" access="read"></property>
- <property name="UUIDs" type="as" access="read"></property>
- <property name="Modalias" type="s" access="read"></property>
- <property name="Adapter" type="o" access="read"></property>
- </interface>
-</node>
-
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/objectmanager.xml b/src/qtdevicesettings/bluetoothsettingsplugin/bluez/objectmanager.xml
deleted file mode 100644
index e52d6fe..0000000
--- a/src/qtdevicesettings/bluetoothsettingsplugin/bluez/objectmanager.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
- "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
-<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <interface name="org.freedesktop.DBus.ObjectManager">
- <method name="GetManagedObjects">
- <arg type="a{oa{sa{sv}}}" name="object_paths_interfaces_and_properties" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="ManagedObjectList"/>
- </method>
- <signal name="InterfacesAdded">
- <arg type="o" name="object_path"/>
- <arg type="a{sa{sv}}" name="interfaces_and_properties"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="InterfaceList"/>
- </signal>
- <signal name="InterfacesRemoved">
- <arg type="o" name="object_path"/>
- <arg type="as" name="interfaces"/>
- </signal>
- </interface>
-</node>
-
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/discoverymodel.cpp b/src/qtdevicesettings/bluetoothsettingsplugin/discoverymodel.cpp
deleted file mode 100644
index 36d3a2e..0000000
--- a/src/qtdevicesettings/bluetoothsettingsplugin/discoverymodel.cpp
+++ /dev/null
@@ -1,246 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QBluetoothAddress>
-#include "discoverymodel.h"
-
-BtDeviceItem::BtDeviceItem(const QBluetoothDeviceInfo& bt, QObject *parent)
- : QObject(parent)
- ,m_name(bt.name())
- ,m_address(bt.address().toString())
- ,m_connected(false)
-{
- m_type = getDeviceType(bt.majorDeviceClass(), bt.minorDeviceClass());
-}
-
-QString BtDeviceItem::name() const
-{
- return m_name;
-}
-
-QString BtDeviceItem::address() const
-{
- return m_address;
-}
-
-bool BtDeviceItem::connected() const
-{
- return m_connected;
-}
-
-void BtDeviceItem::setConnected(bool aConnected)
-{
- m_connected = aConnected;
- emit connectedChanged();
-}
-
-BtDeviceItem::DeviceType BtDeviceItem::type() const
-{
- return m_type;
-}
-
-BtDeviceItem::DeviceType BtDeviceItem::getDeviceType(const QBluetoothDeviceInfo::MajorDeviceClass major, const quint8 minor) const
-{
- switch (major) {
- case QBluetoothDeviceInfo::ComputerDevice:
- return getComputerDeviceType(minor);
- break;
- case QBluetoothDeviceInfo::PhoneDevice:
- return getPhoneDeviceType(minor);
- break;
- case QBluetoothDeviceInfo::AudioVideoDevice:
- return getAudioDeviceType(minor);
- break;
- case QBluetoothDeviceInfo::PeripheralDevice:
- return getPeripheralDeviceType(minor);
- break;
- case QBluetoothDeviceInfo::ImagingDevice:
- return getImagingDeviceType(minor);
- break;
- default:
- return GenericDevice;
- }
- return GenericDevice;
-}
-
-BtDeviceItem::DeviceType BtDeviceItem::getComputerDeviceType(const quint8 minor) const
-{
- Q_UNUSED(minor);
- return Computer;
-}
-
-BtDeviceItem::DeviceType BtDeviceItem::getAudioDeviceType(const quint8 minor) const
-{
- switch (minor) {
- case QBluetoothDeviceInfo::Microphone:
- return Microphone;
- break;
- case QBluetoothDeviceInfo::WearableHeadsetDevice:
- case QBluetoothDeviceInfo::Headphones:
- return Headphones;
- break;
- case QBluetoothDeviceInfo::Camcorder:
- case QBluetoothDeviceInfo::VideoCamera:
- return Camcorder;
- break;
- default:
- return GenericDevice;
- break;
- }
-}
-
-BtDeviceItem::DeviceType BtDeviceItem::getPeripheralDeviceType(const quint8 minor) const
-{
- switch (minor) {
- case QBluetoothDeviceInfo::KeyboardPeripheral:
- return Keyboard;
- break;
- case QBluetoothDeviceInfo::PointingDevicePeripheral:
- return Mouse;
- break;
- default:
- return GenericDevice;
- break;
- }
-}
-
-BtDeviceItem::DeviceType BtDeviceItem::getImagingDeviceType(const quint8 minor) const
-{
- switch (minor) {
- case QBluetoothDeviceInfo::ImageCamera:
- return Camera;
- break;
- default:
- return GenericDevice;
- break;
- }
-}
-
-BtDeviceItem::DeviceType BtDeviceItem::getPhoneDeviceType(const quint8 minor) const
-{
- Q_UNUSED(minor);
- return Phone;
-}
-
-
-DiscoveryModel::DiscoveryModel(QObject *parent)
- : QAbstractListModel(parent)
- ,m_discoveryAgent(new QBluetoothDeviceDiscoveryAgent(this))
-{
- m_roleNames.insert(Qt::UserRole, "modelData");
- m_roleNames.insert(Address, "address");
- m_roleNames.insert(Name, "name");
- m_roleNames.insert(Type, "type");
- m_roleNames.insert(Connected, "connected");
-
- connect(m_discoveryAgent, SIGNAL(deviceDiscovered(QBluetoothDeviceInfo)),
- this, SLOT(deviceDiscovered(QBluetoothDeviceInfo)));
-
- connect(m_discoveryAgent, SIGNAL(finished()),
- this, SIGNAL(scanFinished()));
-
-}
-
-void DiscoveryModel::deviceDiscovered(const QBluetoothDeviceInfo &device)
-{
- beginInsertRows(QModelIndex(), m_items.count(), m_items.count());
- BtDeviceItem *item = new BtDeviceItem(device);
- m_items.append(item);
- endInsertRows();
-}
-
-DiscoveryModel::~DiscoveryModel()
-{
-
-}
-
-void DiscoveryModel::scanDevices()
-{
- m_discoveryAgent->start();
-}
-
-QHash<int, QByteArray> DiscoveryModel::roleNames() const
-{
- return m_roleNames;
-}
-
-int DiscoveryModel::rowCount(const QModelIndex & parent) const
-{
- Q_UNUSED(parent);
- return m_items.count();
-}
-
-QVariant DiscoveryModel::data(const QModelIndex & index, int role) const
-{
- if (!index.isValid()) return QVariant();
-
- BtDeviceItem *item = m_items[index.row()];
-
- switch (role) {
- case DiscoveryModel::Name:
- return item->name();
- break;
- case DiscoveryModel::Address:
- return item->address();
- break;
- case DiscoveryModel::Type:
- return item->type();
- break;
- case DiscoveryModel::Connected:
- return item->connected();
- default:
- return "";
- }
-}
-
-void DiscoveryModel::setConnected(const QString &aAddress, bool connected)
-{
- bool found = false;
- int i = 0;
- QVector<int> role;
- role.append(DiscoveryModel::Connected);
- foreach (BtDeviceItem *item, m_items) {
- if (item->address() == aAddress) {
- item->setConnected(connected);
- found = true;
- break;
- }
- i++;
- }
-
- if (found)
- emit dataChanged(index(i, 0), index(i, 0), role);
-}
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/discoverymodel.h b/src/qtdevicesettings/bluetoothsettingsplugin/discoverymodel.h
deleted file mode 100644
index de30c4c..0000000
--- a/src/qtdevicesettings/bluetoothsettingsplugin/discoverymodel.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef DISCOVERYMODEL_H
-#define DISCOVERYMODEL_H
-
-
-#include <QObject>
-#include <QAbstractListModel>
-#include <QBluetoothDeviceInfo>
-#include <QBluetoothDeviceDiscoveryAgent>
-
-class BtDeviceItem : public QObject
-{
- Q_OBJECT
- Q_ENUMS(DeviceType)
- Q_PROPERTY(QString address READ address CONSTANT)
- Q_PROPERTY(QString name READ name CONSTANT)
- Q_PROPERTY(bool connected READ connected NOTIFY connectedChanged)
- Q_PROPERTY(DeviceType type READ type CONSTANT)
-public:
- explicit BtDeviceItem(const QBluetoothDeviceInfo& id, QObject *parent=0);
- //The list of device type we want to show the icon
- enum DeviceType {
- Phone,
- Computer,
- Mouse,
- Keyboard,
- Headphones,
- Microphone,
- Camera,
- Camcorder,
- Clock,
- HealthDevice,
- GenericDevice=1000
- };
- QString name() const;
- QString address() const;
- DeviceType type() const;
- bool connected() const;
- void setConnected(bool aConnected);
-
-signals:
- void connectedChanged();
-
-protected:
- DeviceType getDeviceType(const QBluetoothDeviceInfo::MajorDeviceClass major,
- const quint8 minor) const;
- DeviceType getComputerDeviceType(const quint8 minor) const;
- DeviceType getAudioDeviceType(const quint8 minor) const;
- DeviceType getPeripheralDeviceType(const quint8 minor) const;
- DeviceType getImagingDeviceType(const quint8 minor) const;
- DeviceType getHealthDeviceType(const quint8 minor) const;
- DeviceType getPhoneDeviceType(const quint8 minor) const;
-
-private:
- QString m_name;
- QString m_address;
- bool m_connected;
- DeviceType m_type;
-};
-
-class DiscoveryModel : public QAbstractListModel
-{
- Q_OBJECT
- Q_ENUMS(DeviceType)
-public:
- explicit DiscoveryModel(QObject *parent=0);
- virtual ~DiscoveryModel();
- // from QAbstractItemModel
- int rowCount(const QModelIndex & parent = QModelIndex()) const;
- QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
- QHash<int, QByteArray> roleNames() const;
- Q_INVOKABLE QVariant itemFromRow(const int row) const;
- void setConnected(const QString& aAddress, bool connected);
- void scanDevices();
-
- enum Roles {
- Name = Qt::UserRole,
- Address,
- Type,
- Connected
- };
-
-signals:
- void scanFinished();
-
-private slots:
- void deviceDiscovered(const QBluetoothDeviceInfo &device);
- void canceled();
- void error(QBluetoothDeviceDiscoveryAgent::Error error);
- void finished();
-private:
- QList<BtDeviceItem*> m_items;
- QHash<int, QByteArray> m_roleNames;
- QBluetoothDeviceDiscoveryAgent *m_discoveryAgent;
-};
-#endif // DISCOVERYMODEL_H
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/icons.qrc b/src/qtdevicesettings/bluetoothsettingsplugin/icons.qrc
deleted file mode 100644
index a7c8d7e..0000000
--- a/src/qtdevicesettings/bluetoothsettingsplugin/icons.qrc
+++ /dev/null
@@ -1,16 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>../icons/Bluetooth_qt_1x.png</file>
- <file>../icons/Camcorder_qt_1x.png</file>
- <file>../icons/Camera_qt_1x.png</file>
- <file>../icons/Clock_qt_1x.png</file>
- <file>../icons/Headphones_qt_1x.png</file>
- <file>../icons/Heartbeat_qt_1x.png</file>
- <file>../icons/Keyboard_qt_1x.png</file>
- <file>../icons/Laptop_qt_1x.png</file>
- <file>../icons/Microphone_qt_1x.png</file>
- <file>../icons/MobilePhone_qt_1x.png</file>
- <file>../icons/Mouse_qt_1x.png</file>
- <file>../icons/Tablet_qt_1x.png</file>
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/plugin.cpp b/src/qtdevicesettings/bluetoothsettingsplugin/plugin.cpp
deleted file mode 100644
index 24e9705..0000000
--- a/src/qtdevicesettings/bluetoothsettingsplugin/plugin.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtQml/QQmlExtensionPlugin>
-#include <QtQml/qqml.h>
-#include <qcoreapplication.h>
-#include <QQmlEngine>
-#include <QQmlContext>
-
-#include "bluetoothdevice.h"
-#include "discoverymodel.h"
-
-class BluetoothSettingsQmlPlugin : public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
-
-public:
- void registerTypes(const char *uri)
- {
- Q_ASSERT(QLatin1String(uri) == QLatin1String("com.theqtcompany.settings.bluetooth"));
- qmlRegisterUncreatableType<BtDeviceItem>(uri, 1, 0, "BtDeviceItem", "Cannot be instantiated directly.");
- const QString prefix = "qrc:";
- qmlRegisterType(QUrl(prefix + "Bluetooth.qml"), uri, 1, 0, "Bluetooth");
- qmlRegisterType(QUrl(prefix + "Discovery.qml"), uri, 1, 0, "Discovery");
-
- }
-
- void initializeEngine(QQmlEngine * engine, const char * uri)
- {
- Q_ASSERT(QLatin1String(uri) == QLatin1String("com.theqtcompany.settings.bluetooth"));
- BluetoothDevice *device = new BluetoothDevice(engine);
- engine->rootContext()->setContextProperty("BtDevice", device);
- }
-};
-
-#include "plugin.moc"
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/qml.qrc b/src/qtdevicesettings/bluetoothsettingsplugin/qml.qrc
deleted file mode 100644
index 1d36902..0000000
--- a/src/qtdevicesettings/bluetoothsettingsplugin/qml.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>Bluetooth.qml</file>
- <file>Discovery.qml</file>
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/bluetoothsettingsplugin/qmldir b/src/qtdevicesettings/bluetoothsettingsplugin/qmldir
deleted file mode 100644
index febebc2..0000000
--- a/src/qtdevicesettings/bluetoothsettingsplugin/qmldir
+++ /dev/null
@@ -1,3 +0,0 @@
-module com.theqtcompany.settings.bluetooth
-Bluetooth 1.0 Bluetooth.qml
-plugin btsettingsplugin
diff --git a/src/qtdevicesettings/devicesettings.pro b/src/qtdevicesettings/devicesettings.pro
deleted file mode 100644
index 54758aa..0000000
--- a/src/qtdevicesettings/devicesettings.pro
+++ /dev/null
@@ -1,12 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS += \
- settingscomponents \
- networksettingsplugin \
- generalsettingsplugin \
- timedateplugin \
- settingsui \
- wifisettingsplugin \
- localesettingsplugin \
- bluetoothsettingsplugin \
-
-CONFIG += ordered
diff --git a/src/qtdevicesettings/generalsettingsplugin/Display.qml b/src/qtdevicesettings/generalsettingsplugin/Display.qml
deleted file mode 100644
index 33bdba8..0000000
--- a/src/qtdevicesettings/generalsettingsplugin/Display.qml
+++ /dev/null
@@ -1,137 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-import QtQuick.Layouts 1.1
-import QtQuick.Controls 1.4
-import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
-import B2Qt.Utils 1.0
-import QtQuick.Enterprise.VirtualKeyboard.Settings 1.2
-
-Item {
- id: root
-
- property string title: qsTr("Display Settings")
-
- GroupBox {
- title: qsTr("Display Settings")
- anchors.fill: parent
- anchors.margins: Math.round(40 * Flat.FlatStyle.scaleFactor)
- Layout.fillWidth: true
-
- Column {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- RowLayout {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
-
- TextLabel {
- text: qsTr("Brighness: ")
- }
-
- Slider {
- id: brightnessSlider
- value: B2QtDevice.displayBrightness
- Layout.fillWidth: true
- }
- }
-
- Binding {
- target: B2QtDevice
- property: "displayBrightness"
- value: brightnessSlider.value
- }
-
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
-
- TextLabel {
- text: qsTr("Physical screen size: ")
- }
-
- ColumnLayout {
- ExclusiveGroup { id: exgroup }
- RadioButton {
- text: qsTr("Default")
- exclusiveGroup: exgroup
- checked: !B2QtDevice.physicalScreenSizeOverride
- }
- RadioButton {
- id: custom
- text: qsTr("Custom")
- exclusiveGroup: exgroup
- checked: B2QtDevice.physicalScreenSizeOverride
-
- onCheckedChanged: B2QtDevice.physicalScreenSizeOverride = checked
- }
-
- GroupBox {
- title: qsTr("Size (in inches): " + sizeSlider.value)
- Layout.fillWidth: true
- flat: true
- visible: custom.checked
-
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- TextLabel {
- text: sizeSlider.minimumValue
- }
-
- Slider {
- id: sizeSlider
- value: B2QtDevice.physicalScreenSizeInch
- Layout.fillWidth: true
- stepSize: 1
- minimumValue: 4
- maximumValue: 60
- }
-
- TextLabel {
- text: sizeSlider.maximumValue
- }
-
- Binding {
- target: B2QtDevice
- property: "physicalScreenSizeInch"
- value: sizeSlider.value
- }
- }
- }
- }
- }
- }
- }
-}
-
diff --git a/src/qtdevicesettings/generalsettingsplugin/Sound.qml b/src/qtdevicesettings/generalsettingsplugin/Sound.qml
deleted file mode 100644
index 7d854f4..0000000
--- a/src/qtdevicesettings/generalsettingsplugin/Sound.qml
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-import QtQuick.Layouts 1.1
-import QtQuick.Controls 1.4
-import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
-import B2Qt.Utils 1.0
-
-Item {
- id: root
- property string title: qsTr("Audio Settings")
-
- GroupBox {
- title: qsTr("Audio Settings")
- anchors.fill: parent
- anchors.margins: Math.round(40 * Flat.FlatStyle.scaleFactor)
- Layout.fillWidth: true
-
- Column {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
-
- RowLayout {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
-
- TextLabel {
- text: qsTr("Master volume: ")
- }
-
- Image {
- source: "../icons/Volume_down_qt_1x.png"
- }
-
- Slider {
- id: volumeSlider
- value: B2QtDevice.masterVolume
- Layout.fillWidth: true
- }
-
- Image {
- source: "../icons/Volume_up_qt_1x.png"
- }
- }
-
- Binding {
- target: B2QtDevice
- property: "masterVolume"
- value: volumeSlider.value
- }
- }
- }
-}
-
diff --git a/src/qtdevicesettings/generalsettingsplugin/generalsettingsplugin.pro b/src/qtdevicesettings/generalsettingsplugin/generalsettingsplugin.pro
deleted file mode 100644
index 884437f..0000000
--- a/src/qtdevicesettings/generalsettingsplugin/generalsettingsplugin.pro
+++ /dev/null
@@ -1,24 +0,0 @@
-TEMPLATE = lib
-CONFIG += plugin
-QT += qml
-
-uri = com.theqtcompany.settings.general
-
-DESTDIR = imports/GeneralSettings
-TARGET = qmlgeneralsettingsplugin
-
-SOURCES += plugin.cpp
-
-pluginfiles.files += \
- qmldir \
-
-installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
-
-target.path = $$installPath
-pluginfiles.path += $$installPath
-INSTALLS += target pluginfiles
-
-RESOURCES += \
- icons.qrc \
- qml.qrc
-
diff --git a/src/qtdevicesettings/generalsettingsplugin/icons.qrc b/src/qtdevicesettings/generalsettingsplugin/icons.qrc
deleted file mode 100644
index 540913c..0000000
--- a/src/qtdevicesettings/generalsettingsplugin/icons.qrc
+++ /dev/null
@@ -1,7 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>../icons/Volume_down_qt_1x.png</file>
- <file>../icons/Volume_mute_qt_1x.png</file>
- <file>../icons/Volume_up_qt_1x.png</file>
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/generalsettingsplugin/plugin.cpp b/src/qtdevicesettings/generalsettingsplugin/plugin.cpp
deleted file mode 100644
index c7c6f40..0000000
--- a/src/qtdevicesettings/generalsettingsplugin/plugin.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtQml/QQmlExtensionPlugin>
-#include <QtQml/qqml.h>
-#include <qcoreapplication.h>
-
-class GeneralSettingsQmlPlugin : public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
-
-public:
- void registerTypes(const char *uri)
- {
- qmlRegisterType(QUrl("qrc:/Display.qml"), uri, 1, 0, "Display");
- }
-};
-
-#include "plugin.moc"
diff --git a/src/qtdevicesettings/generalsettingsplugin/qml.qrc b/src/qtdevicesettings/generalsettingsplugin/qml.qrc
deleted file mode 100644
index 03083d5..0000000
--- a/src/qtdevicesettings/generalsettingsplugin/qml.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>Display.qml</file>
- <file>Sound.qml</file>
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/generalsettingsplugin/qmldir b/src/qtdevicesettings/generalsettingsplugin/qmldir
deleted file mode 100644
index 410dcca..0000000
--- a/src/qtdevicesettings/generalsettingsplugin/qmldir
+++ /dev/null
@@ -1,2 +0,0 @@
-module com.theqtcompany.settings.general
-plugin qmlgeneralsettingsplugin
diff --git a/src/qtdevicesettings/icons/Alert_yellow_1x.png b/src/qtdevicesettings/icons/Alert_yellow_1x.png
deleted file mode 100644
index 2306ff6..0000000
--- a/src/qtdevicesettings/icons/Alert_yellow_1x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/Audio_qt_6x.png b/src/qtdevicesettings/icons/Audio_qt_6x.png
deleted file mode 100644
index 8251129..0000000
--- a/src/qtdevicesettings/icons/Audio_qt_6x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/Bluetooth_qt_1x.png b/src/qtdevicesettings/icons/Bluetooth_qt_1x.png
deleted file mode 100644
index af6968d..0000000
--- a/src/qtdevicesettings/icons/Bluetooth_qt_1x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/Bluetooth_qt_6x.png b/src/qtdevicesettings/icons/Bluetooth_qt_6x.png
deleted file mode 100644
index 55e4fb1..0000000
--- a/src/qtdevicesettings/icons/Bluetooth_qt_6x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/Camcorder_qt_1x.png b/src/qtdevicesettings/icons/Camcorder_qt_1x.png
deleted file mode 100644
index 7ffb2c8..0000000
--- a/src/qtdevicesettings/icons/Camcorder_qt_1x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/Camera_qt_1x.png b/src/qtdevicesettings/icons/Camera_qt_1x.png
deleted file mode 100644
index b84e53a..0000000
--- a/src/qtdevicesettings/icons/Camera_qt_1x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/Chevron-left_black_1x.png b/src/qtdevicesettings/icons/Chevron-left_black_1x.png
deleted file mode 100644
index 225176b..0000000
--- a/src/qtdevicesettings/icons/Chevron-left_black_1x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/Clock_qt_1x.png b/src/qtdevicesettings/icons/Clock_qt_1x.png
deleted file mode 100644
index ee58f95..0000000
--- a/src/qtdevicesettings/icons/Clock_qt_1x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/Clock_qt_6x.png b/src/qtdevicesettings/icons/Clock_qt_6x.png
deleted file mode 100644
index aba8b60..0000000
--- a/src/qtdevicesettings/icons/Clock_qt_6x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/Display_qt_6x.png b/src/qtdevicesettings/icons/Display_qt_6x.png
deleted file mode 100644
index e45c45c..0000000
--- a/src/qtdevicesettings/icons/Display_qt_6x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/Flag_qt_6x.png b/src/qtdevicesettings/icons/Flag_qt_6x.png
deleted file mode 100644
index f549ebd..0000000
--- a/src/qtdevicesettings/icons/Flag_qt_6x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/Headphones_qt_1x.png b/src/qtdevicesettings/icons/Headphones_qt_1x.png
deleted file mode 100644
index 82b04e7..0000000
--- a/src/qtdevicesettings/icons/Headphones_qt_1x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/Heartbeat_qt_1x.png b/src/qtdevicesettings/icons/Heartbeat_qt_1x.png
deleted file mode 100644
index 16a94bc..0000000
--- a/src/qtdevicesettings/icons/Heartbeat_qt_1x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/Keyboard_qt_1x.png b/src/qtdevicesettings/icons/Keyboard_qt_1x.png
deleted file mode 100644
index cc6417d..0000000
--- a/src/qtdevicesettings/icons/Keyboard_qt_1x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/Laptop_qt_1x.png b/src/qtdevicesettings/icons/Laptop_qt_1x.png
deleted file mode 100644
index 2924015..0000000
--- a/src/qtdevicesettings/icons/Laptop_qt_1x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/Microphone_qt_1x.png b/src/qtdevicesettings/icons/Microphone_qt_1x.png
deleted file mode 100644
index f76a963..0000000
--- a/src/qtdevicesettings/icons/Microphone_qt_1x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/MobilePhone_qt_1x.png b/src/qtdevicesettings/icons/MobilePhone_qt_1x.png
deleted file mode 100644
index 363d667..0000000
--- a/src/qtdevicesettings/icons/MobilePhone_qt_1x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/Mouse_qt_1x.png b/src/qtdevicesettings/icons/Mouse_qt_1x.png
deleted file mode 100644
index 24d057d..0000000
--- a/src/qtdevicesettings/icons/Mouse_qt_1x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/Power_black_1x.png b/src/qtdevicesettings/icons/Power_black_1x.png
deleted file mode 100644
index cca0fe8..0000000
--- a/src/qtdevicesettings/icons/Power_black_1x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/Tablet_qt_1x.png b/src/qtdevicesettings/icons/Tablet_qt_1x.png
deleted file mode 100644
index e218184..0000000
--- a/src/qtdevicesettings/icons/Tablet_qt_1x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/Volume_down_qt_1x.png b/src/qtdevicesettings/icons/Volume_down_qt_1x.png
deleted file mode 100644
index 2068819..0000000
--- a/src/qtdevicesettings/icons/Volume_down_qt_1x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/Volume_mute_qt_1x.png b/src/qtdevicesettings/icons/Volume_mute_qt_1x.png
deleted file mode 100644
index 1a41927..0000000
--- a/src/qtdevicesettings/icons/Volume_mute_qt_1x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/Volume_up_qt_1x.png b/src/qtdevicesettings/icons/Volume_up_qt_1x.png
deleted file mode 100644
index 45a8b61..0000000
--- a/src/qtdevicesettings/icons/Volume_up_qt_1x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/WifiAnim_black_2x.png b/src/qtdevicesettings/icons/WifiAnim_black_2x.png
deleted file mode 100644
index 76c850d..0000000
--- a/src/qtdevicesettings/icons/WifiAnim_black_2x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/Wifi_lightgray_2x.png b/src/qtdevicesettings/icons/Wifi_lightgray_2x.png
deleted file mode 100644
index 3e6183a..0000000
--- a/src/qtdevicesettings/icons/Wifi_lightgray_2x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/World_qt_6x.png b/src/qtdevicesettings/icons/World_qt_6x.png
deleted file mode 100644
index 9024031..0000000
--- a/src/qtdevicesettings/icons/World_qt_6x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/generate_icons.sh b/src/qtdevicesettings/icons/generate_icons.sh
deleted file mode 100755
index 55867b8..0000000
--- a/src/qtdevicesettings/icons/generate_icons.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-############################################################################
-##
-## Copyright (C) 2015 Digia Plc
-## All rights reserved.
-## For any questions to Digia, please use the contact form at
-## http://www.qt.io
-##
-## This file is part of Qt Enterprise Embedded.
-##
-## Licensees holding valid Qt Enterprise licenses may use this file in
-## accordance with the Qt Enterprise License Agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and Digia.
-##
-## If you have questions regarding the use of this file, please use
-## the contact form at http://www.qt.io
-##
-#############################################################################
-#!/bin/bash
-#
-# This script resizes and sets correct brand colors for the icons in ref folder
-#
-
-./scripts/cimages.sh ./ref/*.png
-./scripts/cimage.sh ./ref/extra/Alert.png red
-./scripts/cimage.sh ./ref/extra/Alert.png yellow
-./scripts/rimages.sh *.png
diff --git a/src/qtdevicesettings/icons/ref/Audio.png b/src/qtdevicesettings/icons/ref/Audio.png
deleted file mode 100644
index 8434f0a..0000000
--- a/src/qtdevicesettings/icons/ref/Audio.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Back.png b/src/qtdevicesettings/icons/ref/Back.png
deleted file mode 100644
index 9029fd0..0000000
--- a/src/qtdevicesettings/icons/ref/Back.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Bluetooth.png b/src/qtdevicesettings/icons/ref/Bluetooth.png
deleted file mode 100644
index e7c80a9..0000000
--- a/src/qtdevicesettings/icons/ref/Bluetooth.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Camcorder.png b/src/qtdevicesettings/icons/ref/Camcorder.png
deleted file mode 100644
index 8c317a2..0000000
--- a/src/qtdevicesettings/icons/ref/Camcorder.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Camera.png b/src/qtdevicesettings/icons/ref/Camera.png
deleted file mode 100644
index c71ab25..0000000
--- a/src/qtdevicesettings/icons/ref/Camera.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Chevron-left.png b/src/qtdevicesettings/icons/ref/Chevron-left.png
deleted file mode 100644
index 95006f4..0000000
--- a/src/qtdevicesettings/icons/ref/Chevron-left.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Chevron-right.png b/src/qtdevicesettings/icons/ref/Chevron-right.png
deleted file mode 100644
index 2860e9a..0000000
--- a/src/qtdevicesettings/icons/ref/Chevron-right.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Circle-x.png b/src/qtdevicesettings/icons/ref/Circle-x.png
deleted file mode 100644
index 2bbfa97..0000000
--- a/src/qtdevicesettings/icons/ref/Circle-x.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Clock.png b/src/qtdevicesettings/icons/ref/Clock.png
deleted file mode 100644
index 1dae63e..0000000
--- a/src/qtdevicesettings/icons/ref/Clock.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Cogs.png b/src/qtdevicesettings/icons/ref/Cogs.png
deleted file mode 100644
index feaae50..0000000
--- a/src/qtdevicesettings/icons/ref/Cogs.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Connections.png b/src/qtdevicesettings/icons/ref/Connections.png
deleted file mode 100644
index b042d3c..0000000
--- a/src/qtdevicesettings/icons/ref/Connections.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Display.png b/src/qtdevicesettings/icons/ref/Display.png
deleted file mode 100644
index cf1251a..0000000
--- a/src/qtdevicesettings/icons/ref/Display.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Flag.png b/src/qtdevicesettings/icons/ref/Flag.png
deleted file mode 100644
index 485ed48..0000000
--- a/src/qtdevicesettings/icons/ref/Flag.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Headphones.png b/src/qtdevicesettings/icons/ref/Headphones.png
deleted file mode 100644
index 9e5c483..0000000
--- a/src/qtdevicesettings/icons/ref/Headphones.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Heartbeat.png b/src/qtdevicesettings/icons/ref/Heartbeat.png
deleted file mode 100644
index 168135e..0000000
--- a/src/qtdevicesettings/icons/ref/Heartbeat.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Keyboard.png b/src/qtdevicesettings/icons/ref/Keyboard.png
deleted file mode 100644
index c814e8e..0000000
--- a/src/qtdevicesettings/icons/ref/Keyboard.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Laptop.png b/src/qtdevicesettings/icons/ref/Laptop.png
deleted file mode 100644
index 465bb54..0000000
--- a/src/qtdevicesettings/icons/ref/Laptop.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Lock.png b/src/qtdevicesettings/icons/ref/Lock.png
deleted file mode 100644
index 6afb6ac..0000000
--- a/src/qtdevicesettings/icons/ref/Lock.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Microphone.png b/src/qtdevicesettings/icons/ref/Microphone.png
deleted file mode 100644
index 63cb500..0000000
--- a/src/qtdevicesettings/icons/ref/Microphone.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/MobilePhone.png b/src/qtdevicesettings/icons/ref/MobilePhone.png
deleted file mode 100644
index b186c09..0000000
--- a/src/qtdevicesettings/icons/ref/MobilePhone.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Mouse.png b/src/qtdevicesettings/icons/ref/Mouse.png
deleted file mode 100644
index 146305b..0000000
--- a/src/qtdevicesettings/icons/ref/Mouse.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Plus.png b/src/qtdevicesettings/icons/ref/Plus.png
deleted file mode 100644
index 391fe94..0000000
--- a/src/qtdevicesettings/icons/ref/Plus.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Power.png b/src/qtdevicesettings/icons/ref/Power.png
deleted file mode 100644
index b54a084..0000000
--- a/src/qtdevicesettings/icons/ref/Power.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Settings.png b/src/qtdevicesettings/icons/ref/Settings.png
deleted file mode 100644
index d8b255c..0000000
--- a/src/qtdevicesettings/icons/ref/Settings.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Tablet.png b/src/qtdevicesettings/icons/ref/Tablet.png
deleted file mode 100644
index 71b0065..0000000
--- a/src/qtdevicesettings/icons/ref/Tablet.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Volume_down.png b/src/qtdevicesettings/icons/ref/Volume_down.png
deleted file mode 100644
index 0773b1d..0000000
--- a/src/qtdevicesettings/icons/ref/Volume_down.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Volume_mute.png b/src/qtdevicesettings/icons/ref/Volume_mute.png
deleted file mode 100644
index 36ab384..0000000
--- a/src/qtdevicesettings/icons/ref/Volume_mute.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Volume_up.png b/src/qtdevicesettings/icons/ref/Volume_up.png
deleted file mode 100644
index 61eebbd..0000000
--- a/src/qtdevicesettings/icons/ref/Volume_up.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Wifi.png b/src/qtdevicesettings/icons/ref/Wifi.png
deleted file mode 100644
index 5d1e0d9..0000000
--- a/src/qtdevicesettings/icons/ref/Wifi.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Wifi1.png b/src/qtdevicesettings/icons/ref/Wifi1.png
deleted file mode 100644
index f1b1489..0000000
--- a/src/qtdevicesettings/icons/ref/Wifi1.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Wifi2.png b/src/qtdevicesettings/icons/ref/Wifi2.png
deleted file mode 100644
index a22b472..0000000
--- a/src/qtdevicesettings/icons/ref/Wifi2.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Wifi3.png b/src/qtdevicesettings/icons/ref/Wifi3.png
deleted file mode 100644
index 76d412b..0000000
--- a/src/qtdevicesettings/icons/ref/Wifi3.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Wifi4.png b/src/qtdevicesettings/icons/ref/Wifi4.png
deleted file mode 100644
index 5d1e0d9..0000000
--- a/src/qtdevicesettings/icons/ref/Wifi4.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/WifiAnim.png b/src/qtdevicesettings/icons/ref/WifiAnim.png
deleted file mode 100644
index 0694f63..0000000
--- a/src/qtdevicesettings/icons/ref/WifiAnim.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/World.png b/src/qtdevicesettings/icons/ref/World.png
deleted file mode 100644
index cf6eaf0..0000000
--- a/src/qtdevicesettings/icons/ref/World.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/Wrench.png b/src/qtdevicesettings/icons/ref/Wrench.png
deleted file mode 100644
index 5b6e1c6..0000000
--- a/src/qtdevicesettings/icons/ref/Wrench.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/ref/extra/Alert.png b/src/qtdevicesettings/icons/ref/extra/Alert.png
deleted file mode 100644
index 80914fc..0000000
--- a/src/qtdevicesettings/icons/ref/extra/Alert.png
+++ /dev/null
Binary files differ
diff --git a/src/qtdevicesettings/icons/scripts/cimage.sh b/src/qtdevicesettings/icons/scripts/cimage.sh
deleted file mode 100755
index ae73622..0000000
--- a/src/qtdevicesettings/icons/scripts/cimage.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-############################################################################
-##
-## Copyright (C) 2015 Digia Plc
-## All rights reserved.
-## For any questions to Digia, please use the contact form at
-## http://www.qt.io
-##
-## This file is part of Qt Enterprise Embedded.
-##
-## Licensees holding valid Qt Enterprise licenses may use this file in
-## accordance with the Qt Enterprise License Agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and Digia.
-##
-## If you have questions regarding the use of this file, please use
-## the contact form at http://www.qt.io
-##
-#############################################################################
-#!/bin/bash
-
-fullfile=$1
-filename=$(basename "$fullfile")
-extension="${filename##*.}"
-filename="${filename%.*}"
-
-color=$2
-if [ "$color" = "qt" ]; then
- fill='rgb(128,195,66)'
-elif [ "$color" = "black" ]; then
- fill='rgb(32,40,42)'
-elif [ "$color" = "white" ]; then
- fill='rgb(255,255,255)'
-elif [ "$color" = "lightgray" ]; then
- fill='rgb(214,214,214)'
-elif [ "$color" = "red" ]; then
- fill='rgb(228,30,37)'
-elif [ "$color" = "yellow" ]; then
- fill='rgb(250,206,32)'
-else
- fill="black"
-fi
-
-separator="_"
-
-convert $fullfile -fuzz 100% -fill $fill -opaque black $filename$separator$color.$extension
diff --git a/src/qtdevicesettings/icons/scripts/cimages.sh b/src/qtdevicesettings/icons/scripts/cimages.sh
deleted file mode 100755
index 94ac1cd..0000000
--- a/src/qtdevicesettings/icons/scripts/cimages.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-############################################################################
-##
-## Copyright (C) 2015 Digia Plc
-## All rights reserved.
-## For any questions to Digia, please use the contact form at
-## http://www.qt.io
-##
-## This file is part of Qt Enterprise Embedded.
-##
-## Licensees holding valid Qt Enterprise licenses may use this file in
-## accordance with the Qt Enterprise License Agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and Digia.
-##
-## If you have questions regarding the use of this file, please use
-## the contact form at http://www.qt.io
-##
-#############################################################################
-#!/bin/bash
-
-for dir in "$@"
-do
- echo "$dir"
- scripts/cimage.sh $dir qt
- scripts/cimage.sh $dir black
- scripts/cimage.sh $dir white
- scripts/cimage.sh $dir lightgray
-done
diff --git a/src/qtdevicesettings/icons/scripts/rimage.sh b/src/qtdevicesettings/icons/scripts/rimage.sh
deleted file mode 100755
index d98088f..0000000
--- a/src/qtdevicesettings/icons/scripts/rimage.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-############################################################################
-##
-## Copyright (C) 2015 Digia Plc
-## All rights reserved.
-## For any questions to Digia, please use the contact form at
-## http://www.qt.io
-##
-## This file is part of Qt Enterprise Embedded.
-##
-## Licensees holding valid Qt Enterprise licenses may use this file in
-## accordance with the Qt Enterprise License Agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and Digia.
-##
-## If you have questions regarding the use of this file, please use
-## the contact form at http://www.qt.io
-##
-#############################################################################
-#!/bin/bash
-fullfile=$1
-filename=$(basename "$fullfile")
-extension="${filename##*.}"
-filename="${filename%.*}"
-
-postix="_1x"
-convert $fullfile -resize x16 $filename$postix.$extension
-postix="_2x"
-convert $fullfile -resize x32 $filename$postix.$extension
-postix="_3x"
-convert $fullfile -resize x48 $filename$postix.$extension
-postix="_4x"
-convert $fullfile -resize x64 $filename$postix.$extension
-postix="_5x"
-convert $fullfile -resize x80 $filename$postix.$extension
-postix="_6x"
-convert $fullfile -resize x96 $filename$postix.$extension
-
diff --git a/src/qtdevicesettings/icons/scripts/rimages.sh b/src/qtdevicesettings/icons/scripts/rimages.sh
deleted file mode 100755
index 7b76da8..0000000
--- a/src/qtdevicesettings/icons/scripts/rimages.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-############################################################################
-##
-## Copyright (C) 2015 Digia Plc
-## All rights reserved.
-## For any questions to Digia, please use the contact form at
-## http://www.qt.io
-##
-## This file is part of Qt Enterprise Embedded.
-##
-## Licensees holding valid Qt Enterprise licenses may use this file in
-## accordance with the Qt Enterprise License Agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and Digia.
-##
-## If you have questions regarding the use of this file, please use
-## the contact form at http://www.qt.io
-##
-#############################################################################
-#!/bin/bash
-
-for dir in "$@"
-do
- echo "$dir"
- scripts/rimage.sh $dir
-done
diff --git a/src/qtdevicesettings/localesettingsplugin/Language.qml b/src/qtdevicesettings/localesettingsplugin/Language.qml
deleted file mode 100644
index e630b00..0000000
--- a/src/qtdevicesettings/localesettingsplugin/Language.qml
+++ /dev/null
@@ -1,111 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-import QtQuick.Layouts 1.1
-import QtQuick.Controls 1.4
-import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
-import com.theqtcompany.settings.locale 1.0
-
-Item {
- id: root
- property string title: qsTr("Language and Region")
-
- Column {
- id: content
- anchors.fill: parent
- anchors.margins: Math.round(40 * Flat.FlatStyle.scaleFactor)
-
- GroupBox {
- id: groupBox
- width: parent.width
- title: qsTr("Regional Format")
- Layout.fillWidth: true
- property var currentRegion: Qt.locale(LocaleManager.locale)
-
- ColumnLayout {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- width: parent.width
- Layout.fillWidth: true
-
- Component {
- id: regionSelect
- RegionSelect { }
- }
-
- GroupBox {
- width: parent.width
- title: {
- if (groupBox.currentRegion.name === "C" || groupBox.currentRegion.name === "POSIX") {
- return qsTr("Default");
- }
- else if (groupBox.currentRegion.name !== "") {
- return qsTr("%L1/%L2").arg(groupBox.currentRegion.nativeLanguageName).arg(groupBox.currentRegion.nativeCountryName)
- }
- else {
- return qsTr("Region not set");
- }
- }
-
- flat: true
-
- ColumnLayout {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- Layout.fillWidth: true
- width: parent.width
-
- TextLabel {
- text: Date().toLocaleString(groupBox.currentRegion)
- }
-
- TextLabel {
- text: Number(2343.34).toLocaleString(groupBox.currentRegion)
- }
-
- TextLabel {
- text: Number(41334.34).toLocaleCurrencyString(groupBox.currentRegion)
- }
- }
- }
-
- Button {
- text: qsTr("Change region")
- onClicked: stackView.push(regionSelect)
- }
- }
- }
- }
-}
diff --git a/src/qtdevicesettings/localesettingsplugin/RegionSelect.qml b/src/qtdevicesettings/localesettingsplugin/RegionSelect.qml
deleted file mode 100644
index 9247630..0000000
--- a/src/qtdevicesettings/localesettingsplugin/RegionSelect.qml
+++ /dev/null
@@ -1,96 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-import QtQuick.Layouts 1.1
-import QtQuick.Controls 1.4
-import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
-import com.theqtcompany.settings.locale 1.0
-
-Item {
- id: root
- property string title: qsTr("Select language")
-
- Component.onCompleted: country.text = LocaleFilter.filter
-
- Column {
- id: content
- anchors.fill: parent
- anchors.margins: Math.round(20 * Flat.FlatStyle.scaleFactor)
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
-
- TextLabel {
- text: qsTr("Search region: ")
- }
-
- TextField {
- id: country
- text: ""
- onTextChanged: LocaleFilter.filter = country.text
- }
- }
-
- TableView {
- width: parent.width
- height: Math.round(parent.height - 40 * Flat.FlatStyle.scaleFactor)
- Layout.fillWidth: true
- model: LocaleFilter
- headerVisible: true
-
- TableViewColumn {
- role: "language"
- title: qsTr("Language")
- width: Math.round(parent.width * 0.66)
- }
-
- TableViewColumn {
- role: "country"
- title: qsTr("Region")
- width: Math.round(parent.width * 0.33)
- }
-
- onClicked: {
- var val = model.itemFromRow(row);
- if (val !== "") {
- LocaleManager.locale = val;
- stackView.pop();
- }
- }
- }
- }
-}
diff --git a/src/qtdevicesettings/localesettingsplugin/icons.qrc b/src/qtdevicesettings/localesettingsplugin/icons.qrc
deleted file mode 100644
index af8a564..0000000
--- a/src/qtdevicesettings/localesettingsplugin/icons.qrc
+++ /dev/null
@@ -1,4 +0,0 @@
-<RCC>
- <qresource prefix="/">
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/localesettingsplugin/locale.xml b/src/qtdevicesettings/localesettingsplugin/locale.xml
deleted file mode 100644
index b722456..0000000
--- a/src/qtdevicesettings/localesettingsplugin/locale.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<node name="/Service" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
-<node>
- <interface name="org.freedesktop.locale1">
- <property name="Locale" type="as" access="read"/>
- <method name="SetLocale">
- <arg name="locale" type="as" direction="in"/>
- <arg name="user_interaction" type="b" direction="in"/>
- </method>
- </interface>
-</node>
-
diff --git a/src/qtdevicesettings/localesettingsplugin/localefiltermodel.cpp b/src/qtdevicesettings/localesettingsplugin/localefiltermodel.cpp
deleted file mode 100644
index 027caba..0000000
--- a/src/qtdevicesettings/localesettingsplugin/localefiltermodel.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "localemodel.h"
-#include "localefiltermodel.h"
-
-LocaleFilterModel::LocaleFilterModel(QObject* parent)
- :QSortFilterProxyModel(parent)
-{
- connect(this, &LocaleFilterModel::filterChanged, this, &LocaleFilterModel::invalidate);
-}
-
-LocaleFilterModel::~LocaleFilterModel()
-{
-
-}
-
-QString LocaleFilterModel::filter() const
-{
- return m_filter;
-}
-
-void LocaleFilterModel::setFilter(const QString& aFilter)
-{
- m_filter = aFilter;
- emit filterChanged();
-}
-
-bool LocaleFilterModel::filterAcceptsRow( int source_row, const QModelIndex& source_parent ) const
-{
- bool ret = false;
- if (this->sourceModel())
- {
- QModelIndex index = this->sourceModel()->index( source_row, 0, source_parent );
- if (index.isValid())
- {
- QVariant nameRole = index.data(LocaleModel::Country);
- if (nameRole.isValid())
- {
- QString name = nameRole.toString();
- if (name.contains(m_filter, Qt::CaseInsensitive)) {
- ret = true;
- }
- }
- }
- }
- return ret;
-}
-
-QVariant LocaleFilterModel::itemFromRow(const int row) const
-{
- QModelIndex idx = index(row, 0);
- QModelIndex mapped = mapToSource(idx);
- if (mapped.isValid())
- {
- QVariant nameRole = mapped.data(LocaleModel::Code);
- if (nameRole.isValid())
- {
- return nameRole;
- }
- }
- return QVariant::fromValue(QString(""));
-}
-
diff --git a/src/qtdevicesettings/localesettingsplugin/localefiltermodel.h b/src/qtdevicesettings/localesettingsplugin/localefiltermodel.h
deleted file mode 100644
index f4dce1b..0000000
--- a/src/qtdevicesettings/localesettingsplugin/localefiltermodel.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef LOCALEFILTERMODEL_H
-#define LOCALEFILTERMODEL_H
-
-#include <QSortFilterProxyModel>
-
-class LocaleFilterModel : public QSortFilterProxyModel
-{
- Q_OBJECT
- Q_PROPERTY(QString filter READ filter WRITE setFilter NOTIFY filterChanged)
-public:
- explicit LocaleFilterModel(QObject* parent);
- virtual ~LocaleFilterModel();
- bool filterAcceptsRow( int source_row, const QModelIndex& source_parent ) const override;
- QString filter() const;
- void setFilter(const QString& aFilter);
- Q_INVOKABLE QVariant itemFromRow(const int row) const;
-signals:
- void filterChanged();
-private:
- QString m_filter;
-
-};
-
-#endif // LOCALEFILTERMODEL_H
diff --git a/src/qtdevicesettings/localesettingsplugin/localemodel.cpp b/src/qtdevicesettings/localesettingsplugin/localemodel.cpp
deleted file mode 100644
index be24e02..0000000
--- a/src/qtdevicesettings/localesettingsplugin/localemodel.cpp
+++ /dev/null
@@ -1,167 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QLocale>
-#include <QQmlPropertyMap>
-#include <QFuture>
-#include <QFutureWatcher>
-#include <QThread>
-#include <QtConcurrent/QtConcurrentRun>
-#include "localemodel.h"
-
-
-LocaleItem::LocaleItem(const QLocale& locale, QObject *parent)
- :QObject(parent)
-{
- m_code = locale.name();
- m_country = locale.nativeCountryName();
- if (m_country.isEmpty()) {
- m_country = locale.countryToString(locale.country());
- }
-
- m_language = locale.nativeLanguageName();
- if (m_language.isEmpty()) {
- m_language = locale.languageToString(locale.language());
- }
-}
-
-QString LocaleItem::language() const
-{
- return m_language;
-}
-
-QString LocaleItem::country() const
-{
- return m_country;
-}
-
-QString LocaleItem::code() const
-{
- return m_code;
-}
-
-LocaleModel::LocaleModel(QObject *parent)
- : QAbstractListModel(parent)
-{
- m_roleNames.insert(Qt::UserRole, "modelData");
- m_roleNames.insert(Country, "country");
- m_roleNames.insert(Language, "language");
- m_roleNames.insert(Code, "code");
-
- QFutureWatcher<void> *watcher = new QFutureWatcher<void>(this);
- QFuture<void> future = QtConcurrent::run(LocaleModel::generateModel, this);
- watcher->setFuture(future);
- connect(watcher, SIGNAL(finished()), this, SLOT(modelReady()));
-}
-
-void LocaleModel::modelReady()
-{
- beginResetModel();
- sort(0);
- endResetModel();
-}
-
-void LocaleModel::generateModel(LocaleModel* model)
-{
- QList<QLocale> allLocales = QLocale::matchingLocales(QLocale::AnyLanguage, QLocale::AnyScript, QLocale::AnyCountry);
-
- for (const QLocale &locale : allLocales) {
- if (locale.name() != "C") {
- LocaleItem *l = new LocaleItem(locale);
- l->moveToThread(model->thread());
- QMetaObject::invokeMethod(model, "addNewItem", Q_ARG( QObject*, qobject_cast<QObject*>(l)));
- }
- }
-
-}
-
-void LocaleModel::addNewItem(QObject *item)
-{
- beginInsertRows(QModelIndex(), m_items.count(), m_items.count());
- LocaleItem* newItem = qobject_cast<LocaleItem*>(item);
- if (newItem)
- m_items.append(newItem);
- endInsertRows();
-}
-
-LocaleModel::~LocaleModel()
-{
- qDeleteAll(m_items);
-}
-
-QHash<int, QByteArray> LocaleModel::roleNames() const
-{
- return m_roleNames;
-}
-
-int LocaleModel::rowCount(const QModelIndex & parent) const
-{
- Q_UNUSED(parent);
- return m_items.count();
-}
-
-QVariant LocaleModel::data(const QModelIndex & index, int role) const
-{
- if (!index.isValid()) return QVariant();
-
- LocaleItem *item = m_items[index.row()];
-
- switch (role) {
- case Country:
- return item->country();
- break;
- case Language:
- return item->language();
- break;
- case Code:
- return item->code();
- break;
- default:
- return "";
- }
-}
-
-bool LocaleModel::variantLessThan(const LocaleItem* v1, const LocaleItem* v2)
-{
- return v1->language() < v2->language();
-}
-
-void LocaleModel::sort(int column, Qt::SortOrder order)
-{
- Q_UNUSED(column);
- Q_UNUSED(order);
- qSort(m_items.begin(), m_items.end(), LocaleModel::variantLessThan);
-}
diff --git a/src/qtdevicesettings/localesettingsplugin/localemodel.h b/src/qtdevicesettings/localesettingsplugin/localemodel.h
deleted file mode 100644
index b83286e..0000000
--- a/src/qtdevicesettings/localesettingsplugin/localemodel.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef LOCALEMODEL_H
-#define LOCALEMODEL_H
-
-#include <QObject>
-#include <QAbstractListModel>
-#include <QLocale>
-#include <QMutex>
-
-class LocaleItem : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString code READ code CONSTANT)
- Q_PROPERTY(QString country READ country CONSTANT)
- Q_PROPERTY(QString language READ language CONSTANT)
-public:
- explicit LocaleItem(const QLocale &locale, QObject *parent=0);
- QString country() const;
- QString language() const;
- QString code() const;
-
-private:
- QString m_country;
- QString m_language;
- QString m_code;
-};
-
-class LocaleModel : public QAbstractListModel
-{
- Q_OBJECT
-
-public:
- explicit LocaleModel(QObject *parent=0);
- virtual ~LocaleModel();
- // from QAbstractItemModel
- int rowCount(const QModelIndex & parent = QModelIndex()) const;
- QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
- QHash<int, QByteArray> roleNames() const;
- Q_INVOKABLE QVariant itemFromRow(const int row) const;
- void sort(int column, Qt::SortOrder order=Qt::AscendingOrder);
- static bool variantLessThan(const LocaleItem* v1, const LocaleItem* v2);
-
- enum Roles {
- Language = Qt::DisplayPropertyRole,
- Country = Qt::UserRole,
- Code
- };
-
- static void generateModel(LocaleModel* model);
-
-signals:
- void addItem(LocaleItem* item);
-
-private slots:
- void addNewItem(QObject* item);
- void modelReady();
-
-private:
- QList<LocaleItem*> m_items;
- QHash<int, QByteArray> m_roleNames;
-};
-#endif // LOCALEMODEL_H
diff --git a/src/qtdevicesettings/localesettingsplugin/localesettingsplugin.pro b/src/qtdevicesettings/localesettingsplugin/localesettingsplugin.pro
deleted file mode 100644
index 8ff9157..0000000
--- a/src/qtdevicesettings/localesettingsplugin/localesettingsplugin.pro
+++ /dev/null
@@ -1,36 +0,0 @@
-TEMPLATE = lib
-CONFIG += plugin
-QT += qml dbus
-
-uri = com.theqtcompany.settings.locale
-
-DBUS_INTERFACES = locale.xml
-
-DESTDIR = imports/Locale
-TARGET = localesettingsplugin
-
-HEADERS = \
- systemlocale.h \
- systemlocale_p.h \
- localemodel.h \
- localefiltermodel.h
-SOURCES += plugin.cpp \
- systemlocale.cpp \
- localemodel.cpp \
- localefiltermodel.cpp
-
-pluginfiles.files += \
- qmldir \
- Language.qml \
- RegionSelect.qml
-
-installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
-
-target.path = $$installPath
-pluginfiles.path += $$installPath
-INSTALLS += target pluginfiles
-
-
-RESOURCES += \
- icons.qrc
-
diff --git a/src/qtdevicesettings/localesettingsplugin/plugin.cpp b/src/qtdevicesettings/localesettingsplugin/plugin.cpp
deleted file mode 100644
index a050615..0000000
--- a/src/qtdevicesettings/localesettingsplugin/plugin.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtQml/QQmlExtensionPlugin>
-#include <QtQml/qqml.h>
-#include <qcoreapplication.h>
-#include <QQmlEngine>
-#include <QQmlContext>
-
-#include "systemlocale.h"
-#include "localemodel.h"
-#include "localefiltermodel.h"
-
-template <typename T>
-QObject *instance(QQmlEngine *engine, QJSEngine *) {
- T *t = new T(engine);
- t->setObjectName(T::staticMetaObject.className());
- return t;
-}
-
-class LanguageSettingsQmlPlugin : public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
-
-public:
- void registerTypes(const char *uri)
- {
- qmlRegisterSingletonType<SystemLocale>(uri, 1, 0, "LocaleManager", &instance<SystemLocale>);
- }
-
- void initializeEngine(QQmlEngine * engine, const char * uri)
- {
- Q_ASSERT(QLatin1String(uri) == QLatin1String("com.theqtcompany.settings.locale"));
- LocaleModel*localeModel = new LocaleModel(engine);
- LocaleFilterModel* filter = new LocaleFilterModel(engine);
- filter->setSourceModel(localeModel);
- engine->rootContext()->setContextProperty("LocaleFilter", filter);
- }
-};
-
-#include "plugin.moc"
diff --git a/src/qtdevicesettings/localesettingsplugin/qml.qrc b/src/qtdevicesettings/localesettingsplugin/qml.qrc
deleted file mode 100644
index 27fef3d..0000000
--- a/src/qtdevicesettings/localesettingsplugin/qml.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>Language.qml</file>
- <file>RegionSelect.qml</file>
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/localesettingsplugin/qmldir b/src/qtdevicesettings/localesettingsplugin/qmldir
deleted file mode 100644
index e915482..0000000
--- a/src/qtdevicesettings/localesettingsplugin/qmldir
+++ /dev/null
@@ -1,3 +0,0 @@
-module com.theqtcompany.settings.locale
-Language 1.0 Language.qml
-plugin localesettingsplugin
diff --git a/src/qtdevicesettings/localesettingsplugin/systemlocale.cpp b/src/qtdevicesettings/localesettingsplugin/systemlocale.cpp
deleted file mode 100644
index 21a1105..0000000
--- a/src/qtdevicesettings/localesettingsplugin/systemlocale.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include <QLocale>
-#include "systemlocale.h"
-#include "systemlocale_p.h"
-
-SystemLocale::SystemLocale(QObject *parent)
- :QObject(parent)
- ,d_ptr(new SystemLocalePrivate(this))
-{
-}
-
-QString SystemLocale::locale() const
-{
- Q_D(const SystemLocale);
- return d->locale();
-}
-
-void SystemLocale::setLocale(const QString& aLocale)
-{
- Q_D(SystemLocale);
- d->setLocale(aLocale);
- emit localeChanged();
-}
diff --git a/src/qtdevicesettings/localesettingsplugin/systemlocale.h b/src/qtdevicesettings/localesettingsplugin/systemlocale.h
deleted file mode 100644
index c02fdd3..0000000
--- a/src/qtdevicesettings/localesettingsplugin/systemlocale.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef LOCALE_H
-#define LOCALE_H
-
-#include <QObject>
-
-class SystemLocalePrivate;
-
-class SystemLocale : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString locale READ locale WRITE setLocale NOTIFY localeChanged)
-public:
- explicit SystemLocale(QObject *parent = 0);
- QString locale() const;
- void setLocale(const QString& aLocale);
-signals:
- void localeChanged();
-public slots:
-
-protected:
- SystemLocalePrivate *d_ptr;
-
- Q_DISABLE_COPY(SystemLocale)
- Q_DECLARE_PRIVATE(SystemLocale)
-};
-
-#endif // LOCALE_H
diff --git a/src/qtdevicesettings/localesettingsplugin/systemlocale_p.h b/src/qtdevicesettings/localesettingsplugin/systemlocale_p.h
deleted file mode 100644
index 417b958..0000000
--- a/src/qtdevicesettings/localesettingsplugin/systemlocale_p.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef LOCALE_P_H
-#define LOCALE_P_H
-
-#include "systemlocale.h"
-#include "locale_interface.h"
-
-class SystemLocalePrivate
-{
- Q_DECLARE_PUBLIC(SystemLocale)
-public:
- SystemLocalePrivate(SystemLocale *qq)
- :q_ptr(qq)
- {
- m_localeInterface = new OrgFreedesktopLocale1Interface(QStringLiteral("org.freedesktop.locale1"),
- QStringLiteral("/org/freedesktop/locale1"),
- QDBusConnection::systemBus(), qq);
-
- QStringList locale = m_localeInterface->locale();
- foreach (QString l, locale) {
- QStringList nameValue = l.split('=');
- if (nameValue.length() == 2)
- m_localeCache[nameValue.at(0)] = nameValue.at(1);
- }
- }
-
- QString locale() const {
- return m_localeCache["LANG"];
- }
-
- void setLocale(const QString& aLocale) {
- m_localeCache["LANG"] = aLocale;
- updateLocale();
- }
-
- void updateLocale() {
- QStringList newLocale;
- QMap<QString, QString>::iterator i;
- for (i = m_localeCache.begin(); i != m_localeCache.end(); ++i) {
- QString val = i.key() + "=" + i.value();
- newLocale.append(val);
- }
- m_localeInterface->SetLocale(newLocale, true);
- }
-
-
-private:
- QMap<QString, QString> m_localeCache;
- OrgFreedesktopLocale1Interface *m_localeInterface;
- SystemLocale *q_ptr;
-};
-
-#endif // LOCALE_P_H
diff --git a/src/qtdevicesettings/networksettingsplugin/icons.qrc b/src/qtdevicesettings/networksettingsplugin/icons.qrc
deleted file mode 100644
index af8a564..0000000
--- a/src/qtdevicesettings/networksettingsplugin/icons.qrc
+++ /dev/null
@@ -1,4 +0,0 @@
-<RCC>
- <qresource prefix="/">
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/EditWiredSettings.qml b/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/EditWiredSettings.qml
deleted file mode 100644
index a09bdf8..0000000
--- a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/EditWiredSettings.qml
+++ /dev/null
@@ -1,640 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-import QtQuick.Layouts 1.1
-import QtQuick.Controls 1.4
-import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
-import com.theqtcompany.settings.network 1.0
-
-Item {
- id: root
- property string title: qsTr("Ethernet Settings")
- property var service: undefined
-
- property bool ipv4Changed: false
- property bool ipv6Changed: false
- property bool nameserversChanged: false
- property bool domainsChanged: false
- property bool proxyChanged: false
-
- Component.onDestruction: {
- //Clear all unsaved changes from models
- service.proxy.excludes.resetChanges();
- service.nameservers.resetChanges();
- service.domains.resetChanges();
- }
-
- Component.onCompleted: titlebar.title = service.name;
-
- Flickable {
- anchors.fill: parent
- anchors.top: saveButton.bottom
- anchors.margins: Math.round(40 * Flat.FlatStyle.scaleFactor)
- anchors.bottomMargin: Math.round(20 * Flat.FlatStyle.scaleFactor)
- contentHeight: content.height
- contentWidth: width
- interactive: !ipv4Method.popupVisible && !ipv6Method.popupVisible && !proxyMethodSel.popupVisible
- Column {
- id: content
- width: parent.width
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- property int titleWidth: Math.round(width * 0.382)
- property int groupWidth: Math.round(width - saveButton.width - 10 * Flat.FlatStyle.scaleFactor)
-
- //IPv4 Config
- GroupBox {
- flat: false
- width: content.groupWidth
- Layout.fillWidth: true
- title: qsTr("IPv4")
-
- ColumnLayout {
- anchors.fill: parent
-
- ListModel {
- id: methodsModel
-
- ListElement {
- text: "DHCP"
- method: IPv4Config.Dhcp
- }
- ListElement {
- text: "Manual"
- method: IPv4Config.Manual
- }
- ListElement {
- text: "Off"
- method: IPv4Config.Off
- }
- }
-
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- TextLabel {
- text: qsTr("Connection method")
- width: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
-
- CustomCombobox {
- id: ipv4Method
- model: methodsModel
- Component.onCompleted: selectedIndex = service.ipv4.method
-
- onSelectedIndexChanged : {
- ipv4Changed = true;
- service.ipv4.method = model.get(selectedIndex).method;
- }
- delegate: FlatStyledDropdownDelegate { }
- }
- }
-
- Column {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- visible: service.ipv4.method === IPv4Config.Dhcp
-
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- TextLabel {
- text: qsTr("Address")
- width: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
- TextLabel {
- text: service.ipv4.address
- }
- }
-
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- TextLabel {
- text: qsTr("Mask")
- width: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
- TextLabel {
- text: service.ipv4.mask
- }
- }
-
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- TextLabel {
- text: qsTr("Router")
- width: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
- TextLabel {
- text: service.ipv4.gateway
- }
- }
- }
-
- Column {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- visible: service.ipv4.method === IPv4Config.Manual
-
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- TextLabel {
- text: qsTr("Address")
- width: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
- IpAddressTextField {
- id: ipv4Address
- text: service.ipv4.address
- onTextChanged: ipv4Changed = true;
-
- onAccepted: if (text.length > 0) service.ipv4.address = text
- }
- }
-
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- TextLabel {
- text: qsTr("Mask")
- width: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
- IpAddressTextField {
- id: ipv4Mask
- text: service.ipv4.mask
- onTextChanged: ipv4Changed = true;
- onAccepted: if (text.length > 0) service.ipv4.mask = text
- }
- }
-
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- TextLabel {
- text: qsTr("Router")
- width: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
- IpAddressTextField {
- id: ipv4Gateway
- text: service.ipv4.gateway
-
- onTextChanged: ipv4Changed = true
-
- onAccepted: if (text.length > 0) service.ipv4.gateway = text
- }
- }
- }
- }
- }
-
- //IPv6 Config
- GroupBox {
- flat: false
- width: content.groupWidth
- Layout.fillWidth: true
- title: qsTr("IPv6")
-
- ColumnLayout {
- anchors.fill: parent
-
- ListModel {
- id: ipv6methodsmodel
-
- ListElement {
- text: qsTr("Auto")
- method: IPv6Config.Auto
- }
- ListElement {
- text: qsTr("Manual")
- method: IPv6Config.Manual
- }
- ListElement {
- text: qsTr("Off")
- method: IPv6Config.Off
- }
- }
-
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- TextLabel {
- text: qsTr("Connection method: ")
- width: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
-
- CustomCombobox {
- id: ipv6Method
- model: ipv6methodsmodel
- Component.onCompleted: selectedIndex = service.ipv6.method
- onSelectedIndexChanged : {
- ipv6Changed = true;
- service.ipv6.method = model.get(selectedIndex).method;
- }
- delegate: FlatStyledDropdownDelegate { }
- }
- }
-
- Column {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- visible: service.ipv6.method === IPv6Config.Auto
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- TextLabel {
- text: qsTr("Address")
- width: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
- TextLabel {
- text: service.ipv6.address
- }
- }
-
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- TextLabel {
- text: qsTr("Router")
- width: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
- TextLabel {
- text: service.ipv6.gateway
- }
- }
-
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- TextLabel {
- text: qsTr("Prefix length")
- width: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
- TextLabel {
- text: service.ipv6.prefixLength
- }
- }
- }
-
- Column {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- visible: service.ipv6.method === IPv6Config.Manual
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- TextLabel {
- text: qsTr("Address")
- width: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
- TextField {
- id: ipv6Address
- text: service.ipv6.address
- onTextChanged: ipv6Changed = true;
- onAccepted: if (text.length > 0) service.ipv6.address = text
- }
- }
-
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- TextLabel {
- text: qsTr("Router")
- width: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
- TextField {
- id: ipv6Gateway
- text: service.ipv6.gateway
- onTextChanged: ipv6Changed = true;
- onAccepted: if (text.length > 0) service.ipv4.gateway = text
- }
- }
-
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- TextLabel {
- text: qsTr("Prefix length")
- width: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
- TextField {
- id: ipv6PrefixLength
- text: service.ipv6.prefixLength
- validator: IntValidator { bottom: 0; top: 255 }
-
- onTextChanged: ipv6Changed = true
-
- onAccepted: if (text.length > 0) service.ipv6.prefixLength = parseInt(text)
- }
- }
- }
- }
- }
-
- GroupBox {
- flat: false
- width: content.groupWidth
- Layout.fillWidth: true
- title: qsTr("Name servers")
-
- ColumnLayout {
- anchors.fill: parent
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- TextLabel {
- text: qsTr("Address")
- width: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
- Column {
- Repeater {
- model: service.nameservers
-
- Row {
- TextField {
- text: edit
- onTextChanged: {
- nameserversChanged = true;
- edit = text;
- }
- }
- Button {
- implicitWidth: height
- text: "-"
- onClicked: {
- service.nameservers.remove(index);
- nameserversChanged = true;
- }
- }
- Button {
- implicitWidth: height
- visible: index==service.nameservers.count-1
- text: "+"
- onClicked: service.nameservers.append("")
- }
- }
- }
- }
- Row {
- TextField {
- id: nameServerEntryItem
- visible: service.nameservers.count === 0
- text: ""
- onAccepted: service.nameservers.append(text)
- }
- Button {
- implicitWidth: height
- visible: nameServerEntryItem.visible
- text: "+"
- onClicked: nameServerEntryItem.accepted()
- }
- }
- }
- }
- }
-
- GroupBox {
- flat: false
- width: content.groupWidth
- Layout.fillWidth: true
- title: qsTr("Domains")
-
- ColumnLayout {
- anchors.fill: parent
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- TextLabel {
- text: qsTr("Address")
- width: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
- Column {
- Repeater {
- model: service.domains
- Row {
- TextField {
- text: edit
- onTextChanged: {
- root.domainsChanged = true;
- edit = text;
- }
- }
- Button {
- implicitWidth: height
- text: "-"
- onClicked: {
- service.domains.remove(index);
- domainsChanged.domainsChanged = true;
- }
- }
- Button {
- implicitWidth: height
- visible: index==service.domains.count-1
- text: "+"
- onClicked: service.domains.append("")
- }
- }
- }
- }
- Row {
- TextField {
- id: domainsEntryItem
- visible: service.domains.count === 0
- text: ""
- onAccepted: service.domains.append(text)
- }
- Button {
- implicitWidth: height
- visible: domainsEntryItem.visible
- text: "+"
- onClicked: domainsEntryItem.accepted()
- }
- }
- }
- }
- }
-
- GroupBox {
- flat: false
- width: content.groupWidth
- Layout.fillWidth: true
- title: qsTr("Proxy Settings")
-
- ColumnLayout {
- anchors.fill: parent
-
- ListModel {
- id: proxyMethodModel
-
- ListElement {
- text: qsTr("Direct")
- method: ProxyConfig.Direct
- }
- ListElement {
- text: qsTr("Auto")
- method: ProxyConfig.Auto
- }
- ListElement {
- text: qsTr("Manual")
- method: ProxyConfig.Manual
- }
- }
-
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- TextLabel {
- text: qsTr("Configuration")
- width: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
-
- CustomCombobox {
- id: proxyMethodSel
- model: proxyMethodModel
- Component.onCompleted: selectedIndex = service.proxy.method
- onSelectedIndexChanged : {
- proxyChanged = true;
- service.proxy.method = model.get(selectedIndex).method;
- }
- delegate: FlatStyledDropdownDelegate { }
- }
- }
-
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- visible: service.proxy.method !== ProxyConfig.Direct
- TextLabel {
- text: service.proxy.method === ProxyConfig.Manual ? qsTr("Proxy address") : qsTr("Automatic configuration URL")
- width: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
- TextField {
- id: proxyUrl
- text: service.proxy.url
- onTextChanged: proxyChanged = true;
- onAccepted: service.proxy.url = text;
- }
- }
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- visible: service.proxy.method === ProxyConfig.Manual
-
- TextLabel {
- text: qsTr("No proxy for")
- width: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
-
- Column {
- Repeater {
- model: service.proxy.excludes
-
- Row {
- TextField {
- text: edit
- onTextChanged: edit = text
- }
- Button {
- implicitWidth: height
- text: "-"
- onClicked: {
- service.proxy.excludes.remove(index);
- proxyChanged = true;
- }
- }
- Button {
- implicitWidth: height
- visible: index==service.proxy.excludes.count-1
- text: "+"
- onClicked: service.proxy.excludes.append("")
- }
- }
- }
- }
- Row {
- TextField {
- id: proxyEntryItem
- visible: service.proxy.excludes.count === 0
- text: ""
- onAccepted: service.proxy.excludes.append(text)
- }
- Button {
- implicitWidth: height
- visible: proxyEntryItem.visible
- text: "+"
- onClicked: proxyEntryItem.accepted()
- }
- }
- }
- }
- }
- }
- }
-
- Button {
- id: saveButton
- anchors.right: parent.right
- anchors.top: parent.top
- anchors.margins: Math.round(10 * Flat.FlatStyle.scaleFactor)
- anchors.rightMargin: Math.round(40 * Flat.FlatStyle.scaleFactor)
- text: qsTr("Save")
-
- onClicked: {
- if (ipv4Changed) {
- ipv4Address.accepted();
- ipv4Mask.accepted();
- ipv4Gateway.accepted();
- service.setupIpv4Config();
- }
-
- if (ipv6Changed) {
- ipv6Address.accepted();
- ipv6Gateway.accepted();
- ipv6PrefixLength.accepted();
- service.setupIpv6Config();
- }
-
- if (nameserversChanged) {
- service.setupNameserversConfig();
- }
-
- if (domainsChanged) {
- service.setupDomainsConfig();
- }
- if (proxyChanged) {
- proxyUrl.accepted();
- service.setupProxyConfig();
- }
- stackView.pop();
- }
- }
-}
diff --git a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/IpAddressTextField.qml b/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/IpAddressTextField.qml
deleted file mode 100644
index 102d458..0000000
--- a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/IpAddressTextField.qml
+++ /dev/null
@@ -1,43 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-import QtQuick.Layouts 1.1
-import QtQuick.Controls 1.4
-
-TextField {
- Layout.fillWidth: true
- validator: RegExpValidator { regExp: /^(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))$/ }
-}
diff --git a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/NetworkDetails.qml b/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/NetworkDetails.qml
deleted file mode 100644
index 1540e03..0000000
--- a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/NetworkDetails.qml
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-
-Loader {
- id: root
- property var service: undefined
- anchors.fill: parent
-}
diff --git a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/NetworkSettings.qml b/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/NetworkSettings.qml
deleted file mode 100644
index daf3d1d..0000000
--- a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/NetworkSettings.qml
+++ /dev/null
@@ -1,135 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-import QtQuick.Layouts 1.1
-import QtQuick.Controls 1.4
-import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
-import com.theqtcompany.settings.network 1.0
-
-Item {
- property string title: qsTr("Network Settings")
- GroupBox {
- id: networkSelect
- anchors.fill: parent
- anchors.rightMargin: parent.width * 0.618
- anchors.leftMargin: Math.round(20 * Flat.FlatStyle.scaleFactor)
- anchors.topMargin: Math.round(20 * Flat.FlatStyle.scaleFactor)
- title: qsTr("Select Connection")
-
- function stateToStr(serviceState) {
- switch (serviceState) {
- case NetworkService.Idle:
- return qsTr("Idle");
- case NetworkService.Failure:
- return qsTr("Failure");
- case NetworkService.Association:
- return qsTr("Association");
- case NetworkService.Configuration:
- return qsTr("Configuration");
- case NetworkService.Ready:
- return qsTr("Ready");
- case NetworkService.Disconnect:
- return qsTr("Disconnect");
- case NetworkService.Online:
- return qsTr("Online");
- default:
- return qsTr("Undefined");
- }
- }
-
- ColumnLayout {
- width: networkSelect.width
- ExclusiveGroup {
- id: exgroup
- }
-
- Repeater {
- model: NetworkSettingsManager.networks
-
- Button {
- implicitWidth: networkSelect.width - Math.round(20 * Flat.FlatStyle.scaleFactor)
- implicitHeight: Math.round(54 * Flat.FlatStyle.scaleFactor)
- checkable: true
- exclusiveGroup: exgroup
-
- Row {
- anchors.fill: parent
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
-
- Image {
- id: typeId
- height: parent.height
- width: height
- }
-
- Column {
- height: Math.round(parent.height * 0.7)
- spacing: 0
- anchors.verticalCenter: parent.verticalCenter
- TextLabel {
- text: name
- }
-
- TextLabel {
- text: networkSelect.stateToStr(status)
- font.pixelSize: Math.round(12 * Flat.FlatStyle.scaleFactor)
- }
- }
- }
-
- onCheckedChanged: {
- if (checked) {
- networkDetails.service = NetworkSettingsManager.getService(name, type);
- if (type === NetworkType.Wired) {
- networkDetails.source = "WiredSettings.qml";
- }
- else if (type === NetworkType.Wifi) {
- networkDetails.source = "WifiSettings.qml";
- }
- }
- }
- }
- }
- }
- }
-
- NetworkDetails {
- id: networkDetails
- anchors.fill: parent
- anchors.leftMargin: networkSelect.width + Math.round(20 * Flat.FlatStyle.scaleFactor)
- }
-}
diff --git a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/WifiSettings.qml b/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/WifiSettings.qml
deleted file mode 100644
index 3221e88..0000000
--- a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/WifiSettings.qml
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-import QtQuick.Layouts 1.1
-import QtQuick.Controls 1.4
-import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
-import com.theqtcompany.settings.network 1.0
-import com.theqtcompany.settings.wifi 1.0
-
-Item {
- id: root
- anchors.fill: parent
- anchors.margins: Math.round(20 * Flat.FlatStyle.scaleFactor)
- GroupBox {
- id: content
- title: qsTr("Wireless Settings")
- anchors.fill: parent
- Layout.fillWidth: true
- flat: true
- width: parent.width
-
- Row {
- id: enableSwitch
- width: parent.width
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- TextLabel {
- width: root.width*0.382
- horizontalAlignment: Text.AlignRight
- text: NetworkSettingsManager.wifiPowered ? qsTr("Disable Wifi") : qsTr("Enable Wifi")
- }
- Switch {
- checked: NetworkSettingsManager.wifiPowered
- onCheckedChanged: NetworkSettingsManager.wifiPowered = checked
- }
- }
-
- Item {
- id: wifiManagerContainer
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: enableSwitch.bottom
- anchors.topMargin: Math.round(10 * Flat.FlatStyle.scaleFactor)
- anchors.bottom: parent.bottom
- Loader {
- id: wifiManagerLoader
- asynchronous: true
- sourceComponent: NetworkSettingsManager.wifiPowered ? wifiManager : undefined
- }
- }
- }
-
- Component {
- id: wifiManager
- WifiManagerView {
- id: wifiSettings
- width: root.width
- visible: true
- }
- }
-}
diff --git a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/WiredSettings.qml b/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/WiredSettings.qml
deleted file mode 100644
index 5a7e860..0000000
--- a/src/qtdevicesettings/networksettingsplugin/imports/NetworkSettings/WiredSettings.qml
+++ /dev/null
@@ -1,205 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-import QtQuick.Layouts 1.1
-import QtQuick.Controls 1.4
-import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
-import com.theqtcompany.settings.network 1.0
-
-Item {
- id: root
- anchors.fill: parent
- anchors.margins: Math.round(20 * Flat.FlatStyle.scaleFactor)
- property bool editMode: false
-
- onVisibleChanged: {
- if (visible)
- titlebar.title = qsTr("Network");
- }
-
- ListModel {
- id: methodsModel
-
- ListElement {
- text: "DHCP"
- method: IPv4Config.Dhcp
- }
- ListElement {
- text: "Manual"
- method: IPv4Config.Manual
- }
- ListElement {
- text: "Off"
- method: IPv4Config.Off
- }
- }
-
- GroupBox {
- title: qsTr("Ethernet Connection")
- anchors.fill: parent
- Layout.fillWidth: true
- flat: true
- Column {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- Row {
- TextLabel {
- text: qsTr("Connection method: ")
- }
-
- CustomCombobox {
- id: ipv4Method
- model: methodsModel
- Component.onCompleted: selectedIndex = service.ipv4.method
- onSelectedIndexChanged : {
- if (model.get(selectedIndex).method !== IPv4Config.Dhcp) {
- service.ipv4.method = model.get(selectedIndex).method;
- editMode = true;
- }
- else {
- //Enable DHCP
- if (service.ipv4.method !== model.get(selectedIndex).method) {
- service.ipv4.method = model.get(selectedIndex).method;
- service.setupIpv4Config();
- }
-
- editMode = false;
- }
- }
- delegate: FlatStyledDropdownDelegate { }
- }
- }
-
- Row {
- visible: service.ipv4.method !== IPv4Config.Off
- TextLabel {
- text: qsTr("IP Address: ")
- }
- TextLabel {
- text: service.ipv4.address
- visible: !editMode
- }
- IpAddressTextField {
- id: ipv4Address
- placeholderText: service.ipv4.address
- visible: editMode
- onAccepted: if (text.length > 0) service.ipv4.address = text
- }
- }
-
- Row {
- visible: service.ipv4.method !== IPv4Config.Off
- TextLabel {
- text: qsTr("Mask: ")
- }
- TextLabel {
- text: service.ipv4.mask
- visible: !editMode
- }
- IpAddressTextField {
- id: ipv4Mask
- placeholderText: service.ipv4.mask
- visible: editMode
- onAccepted: if (text.length > 0) service.ipv4.mask = text
- }
- }
-
- Row {
- visible: service.ipv4.method !== IPv4Config.Off
- TextLabel {
- text: qsTr("Router: ")
- }
- TextLabel {
- text: service.ipv4.gateway
- visible: !editMode
- }
- IpAddressTextField {
- id: ipv4Gateway
- placeholderText: service.ipv4.gateway
- visible: editMode
- onAccepted: if (text.length > 0) service.ipv4.gateway = text
- }
- }
-
- Row {
- visible: service.ipv4.method !== IPv4Config.Off
- TextLabel {
- text: qsTr("DNS server: ")
- }
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- Repeater {
- model: service.nameservers
-
- TextLabel {
- text: display
- }
- }
- }
- }
-
- Row {
- Button {
- text: qsTr("Save")
- visible: editMode
-
- onClicked: {
- ipv4Address.accepted();
- ipv4Mask.accepted();
- ipv4Gateway.accepted();
- service.setupIpv4Config();
- editMode = false;
- }
- }
- Button {
- text: qsTr("Cancel")
- visible: editMode
- onClicked: {
- editMode = false;
- methodSelection.currentIndex = service.ipv4.method
- }
- }
- }
- Button {
- text: qsTr("Edit")
- visible: !editMode
-
- onClicked: stackView.push( { item : Qt.resolvedUrl("EditWiredSettings.qml"), properties : { service: service } } )
- }
- }
- }
-}
-
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/connman_manager.xml b/src/qtdevicesettings/networksettingsplugin/networksettings/connman/connman_manager.xml
deleted file mode 100644
index 5c52b27..0000000
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/connman_manager.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<node name="/Manager" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <interface name="net.connman.Manager">
-
- <method name="GetProperties" tp:name-for-bindings="Get_Properties">
- <arg name="properties" type="a{sv}" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
- </method>
-
- <method name="SetProperty" tp:name-for-bindings="Set_Property">
- <arg name="name" type="s"/>
- <arg name="value" type="v"/>
- </method>
-
- <method name="GetTechnologies" tp:name-for-bindings="Get_Technologies">
- <arg name="technologies" type="a(oa{sv})" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="ConnmanMapList"/>
- </method>
-
- <method name="GetServices" tp:name-for-bindings="Get_Services">
- <arg name="services" type="a(oa{sv})" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="ConnmanMapList"/>
- </method>
-
- <method name="GetSavedServices" tp:name-for-bindings="Get_Saved_Services">
- <arg name="services" type="a(oa{sv})" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="ConnmanMapList"/>
- </method>
-
- <method name="RemoveSavedService" tp:name-for-bindings="Remove_Saved_Services">
- <arg name="identifier" type="s" direction="in"/>
- </method>
-
- <method name="RegisterAgent" tp:name-for-bindings="Register_Agent">
- <arg name="path" type="o"/>
- </method>
-
- <method name="UnregisterAgent" tp:name-for-bindings="Unregister_Agent">
- <arg name="path" type="o"/>
- </method>
-
- <method name="RegisterCounter" tp:name-for-bindings="Register_Counter">
- <arg name="path" type="o"/>
- <arg name="accuracy" type="u"/>
- <arg name="period" type="u"/>
- </method>
-
- <method name="UnregisterCounter" tp:name-for-bindings="Unregister_Counter">
- <arg name="path" type="o"/>
- </method>
-
- <method name="ResetCounters" tp:name-for-bindings="Reset_Counters">
- <arg name="type" type="s"/>
- </method>
-
- <method name="CreateSession" tp:name-for-bindings="Create_Session">
- <arg name="settings" type="a{sv}"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
- <arg name="notifier" type="o"/>
- <arg name="session" type="o" direction="out"/>
- </method>
-
- <method name="DestroySession" tp:name-for-bindings="Destroy_Session">
- <arg name="session" type="o"/>
- </method>
-
- <method name="RequestPrivateNetwork" tp:name-for-bindings="Request_Private_Network">
- <arg name="options" type="a{sv}"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
- <arg name="path" type="o" direction="out"/>
- <arg name="dict" type="a{sv}" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
- <arg name="fd" type="i" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
- </method>
-
- <method name="ReleasePrivateNetwork" tp:name-for-bindings="Release_Private_Network">
- <arg name="path" type="o"/>
- </method>
-
- <signal name="NetworkTypeAdded" tp:name-for-bindings="NetworkType_Added">
- <arg name="technology" type="o"/>
- <arg name="properties" type="a{sv}"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
- </signal>
-
- <signal name="NetworkTypeRemoved" tp:name-for-bindings="NetworkType_Removed">
- <arg name="technology" type="o"/>
- </signal>
-
- <signal name="ServicesChanged" tp:name-for-bindings="Services_Changed">
- <arg name="changed" type="a(oa{sv})"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="ConnmanMapList"/>
- <arg name="removed" type="ao"/>
- </signal>
-
- <signal name="SavedServicesChanged" tp:name-for-bindings="SavedServices_Changed">
- <arg name="changed" type="a(oa{sv})"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="ConnmanMapList"/>
- </signal>
-
- <signal name="PropertyChanged" tp:name-for-bindings="Property_Changed">
- <arg name="name" type="s"/>
- <arg name="value" type="v"/>
- </signal>
-
- </interface>
-</node>
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/connman_service.xml b/src/qtdevicesettings/networksettingsplugin/networksettings/connman/connman_service.xml
deleted file mode 100644
index c41aca4..0000000
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/connman_service.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<node name="/Service" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <interface name="net.connman.Service">
-
- <method name="GetProperties" tp:name-for-bindings="Get_Properties">
- <arg name="properties" type="a{sv}" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
- </method>
-
- <method name="SetProperty" tp:name-for-bindings="Set_Property">
- <arg name="name" type="s"/>
- <arg name="value" type="v"/>
- </method>
-
- <method name="ClearProperty" tp:name-for-bindings="Clear_Property">
- <arg name="name" type="s" />
- </method>
-
- <method name="Connect" tp:name-for-bindings="Connect" />
-
- <method name="Disconnect" tp:name-for-bindings="Disconnect" />
-
- <method name="Remove" tp:name-for-bindings="Remove" />
-
- <method name="MoveBefore" tp:name-for-bindings="Move_Before">
- <arg name="service" type="o"/>
- </method>
-
- <method name="MoveAfter" tp:name-for-bindings="Move_After">
- <arg name="service" type="o"/>
- </method>
-
- <method name="ResetCounters" tp:name-for-bindings="Reset_Counters" />
-
- <signal name="PropertyChanged" tp:name-for-bindings="Property_Changed">
- <arg name="name" type="s"/>
- <arg name="value" type="v"/>
- </signal>
-
- </interface>
-</node>
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/connman_technology.xml b/src/qtdevicesettings/networksettingsplugin/networksettings/connman/connman_technology.xml
deleted file mode 100644
index 08d780f..0000000
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/connman_technology.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<node name="/Service" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <interface name="net.connman.Technology">
-
- <method name="GetProperties" tp:name-for-bindings="Get_Properties">
- <arg name="properties" type="a{sv}" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
- </method>
-
- <method name="SetProperty" tp:name-for-bindings="Set_Property">
- <arg name="name" type="s"/>
- <arg name="value" type="v"/>
- </method>
-
- <method name="Scan" tp:name-for-bindings="Scan"/>
-
- <signal name="PropertyChanged" tp:name-for-bindings="Property_Changed">
- <arg name="name" type="s"/>
- <arg name="value" type="v"/>
- </signal>
-
- </interface>
-</node>
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/networksettingsmanager_linux.cpp b/src/qtdevicesettings/networksettingsplugin/networksettings/connman/networksettingsmanager_linux.cpp
deleted file mode 100644
index c4973ea..0000000
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/networksettingsmanager_linux.cpp
+++ /dev/null
@@ -1,583 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include <QQmlPropertyMap>
-
-#include "networkconfig.h"
-#include "networksettingsmanager_linux_p.h"
-#include "connman_manager_interface.cpp"
-#include "moc_connman_manager_interface.cpp"
-#include "connman_service_interface.h"
-#include "connman_technology_interface.h"
-
-const QString PropertyIPv4("IPv4");
-const QString PropertyIPv4Config("IPv4.Configuration");
-const QString PropertyIPv6("IPv6");
-const QString PropertyIPv6Config("IPv6.Configuration");
-const QString PropertyNameservers("Nameservers");
-const QString PropertyNameserversConfig("Nameservers.Configuration");
-const QString PropertyDomains("Domains");
-const QString PropertyDomainsConfig("Domains.Configuration");
-const QString PropertyProxy("Proxy");
-const QString PropertyProxyConfig("Proxy.Configuration");
-const QString PropertyState("State");
-const QString PropertyName("Name");
-const QString PropertyType("Type");
-const QString PropertyConnected("Connected");
-const QString PropertyPowered("Powered");
-const QString PropertyAddress("Address");
-const QString PropertyNetMask("Netmask");
-const QString PropertyGateway("Gateway");
-const QString PropertyPrefixLength("PrefixLength");
-const QString PropertyMethod("Method");
-const QString PropertyPrivacy("Privacy");
-const QString PropertyUrl("Url");
-const QString PropertyServers("Servers");
-const QString PropertyExcludes("Excludes");
-const QString AttributeAuto("auto");
-const QString AttributeDhcp("dhcp");
-const QString AttributeManual("manual");
-const QString AttributeOff("off");
-const QString AttributeDisabled("disabled");
-const QString AttributeEnabled("enabled");
-const QString AttributePreferred("preferred");
-const QString AttributeDirect("direct");
-const QString AttributeWifi("wifi");
-const QString AttributeEthernet("ethernet");
-const QString AttributeIdle("idle");
-const QString AttributeFailure("failure");
-const QString AttributeAssociation("association");
-const QString AttributeConfiguration("configuration");
-const QString AttributeReady("ready");
-const QString AttributeDisconnect("disconnect");
-const QString AttributeOneline("online");
-
-//Conversion operations for datatypes
-const QDBusArgument &operator>>(const QDBusArgument &argument, ConnmanMap &obj)
-{
- argument.beginStructure();
- argument >> obj.objectPath >> obj.propertyMap;
- argument.endStructure();
- return argument;
-}
-
-QDBusArgument &operator<<(QDBusArgument &argument, const ConnmanMap &obj)
-{
- argument.beginStructure();
- argument << obj.objectPath << obj.propertyMap;
- argument.endStructure();
- return argument;
-}
-
-const QVariantMap &operator>>(const QVariantMap &argument, IPv4Config &obj)
-{
- obj.setAddress(argument[PropertyAddress].toString());
- obj.setMask(argument[PropertyNetMask].toString());
- obj.setGateway(argument[PropertyGateway].toString());
-
- QString method = argument[PropertyMethod].toString();
-
- if (method == AttributeDhcp) {
- obj.setMethod(IPv4Config::Dhcp);
- }
- else if (method == AttributeManual) {
- obj.setMethod(IPv4Config::Manual);
- }
- else if (method == AttributeOff) {
- obj.setMethod(IPv4Config::Off);
- }
- else {
- obj.setMethod(IPv4Config::Off);
- }
- return argument;
-}
-
-const QVariantMap &operator<<(QVariantMap &argument, const IPv4Config &obj)
-{
- argument.insert(PropertyAddress, QVariant::fromValue(obj.address()));
-
- argument.insert(PropertyNetMask, QVariant::fromValue(obj.mask()));
-
- argument.insert(PropertyGateway, QVariant::fromValue(obj.gateway()));
-
- QString method;
- switch (obj.method()) {
- case IPv4Config::Dhcp:
- method = AttributeDhcp;
- break;
- case IPv4Config::Manual:
- method = AttributeManual;
- break;
- case IPv4Config::Off:
- method = AttributeOff;
- break;
- default:
- break;
- }
- argument.insert(PropertyMethod, QVariant::fromValue(method));
- return argument;
-}
-
-const QVariantMap &operator>>(const QVariantMap &argument, IPv6Config &obj)
-{
- obj.setAddress(argument[PropertyAddress].toString());
- obj.setGateway(argument[PropertyGateway].toString());
- obj.setPrefixLength(argument[PropertyPrefixLength].toInt());
- QString method = argument[PropertyMethod].toString();
- if (method == AttributeAuto) {
- obj.setMethod(IPv6Config::Auto);
- }
- else if (method == AttributeManual) {
- obj.setMethod(IPv6Config::Manual);
- }
- else if (method == AttributeOff) {
- obj.setMethod(IPv6Config::Off);
- }
- QString privacy = argument[PropertyPrivacy].toString();
-
- if (privacy == AttributeDisabled) {
- obj.setPrivacy(IPv6Config::Disabled);
- }
- else if (privacy == AttributeEnabled) {
- obj.setPrivacy(IPv6Config::Enabled);
- }
- else if (privacy == AttributePreferred) {
- obj.setPrivacy(IPv6Config::Preferred);
- }
- return argument;
-}
-
-const QVariantMap &operator<<(QVariantMap &argument, const IPv6Config &obj)
-{
- argument.insert(PropertyAddress, QVariant::fromValue(obj.address()));
- argument.insert(PropertyGateway, QVariant::fromValue(obj.address()));
- argument.insert(PropertyPrefixLength, QVariant::fromValue(obj.prefixLength()));
-
- QString method;
- switch (obj.method()) {
- case IPv6Config::Auto:
- method = AttributeAuto;
- break;
- case IPv6Config::Manual:
- method = AttributeManual;
- break;
- case IPv6Config::Off:
- method = AttributeOff;
- break;
- default:
- break;
- }
- argument.insert(PropertyMethod, QVariant::fromValue(method));
-
- QString privacy;
- switch (obj.privacy()) {
- case IPv6Config::Disabled:
- method = AttributeDisabled;
- break;
- case IPv6Config::Enabled:
- method = AttributeEnabled;
- break;
- case IPv6Config::Preferred:
- method = AttributePreferred;
- break;
- default:
- break;
- }
- argument.insert(PropertyPrivacy, QVariant::fromValue(privacy));
-
- return argument;
-}
-
-
-const QVariantMap &operator>>(const QVariantMap &argument, ProxyConfig &obj)
-{
- QString method = argument[PropertyMethod].toString();
- if (method == AttributeDirect) {
- obj.setMethod(ProxyConfig::Direct);
- }
- else if (method == AttributeAuto) {
- obj.setMethod(ProxyConfig::Auto);
- }
- else if (method == AttributeManual) {
- obj.setMethod(ProxyConfig::Manual);
- }
-
- QString urlStr = argument[PropertyUrl].toString();
- obj.setUrl(QUrl(urlStr));
-
- obj.setServers(argument[PropertyServers].toStringList());
- obj.setExcludes(argument[PropertyExcludes].toStringList());
-
- return argument;
-}
-
-const QVariantMap &operator<<(QVariantMap &argument, const ProxyConfig &obj)
-{
- QString method;
- switch (obj.method()) {
- case ProxyConfig::Direct:
- method = AttributeDirect;
- break;
- case ProxyConfig::Auto:
- method = AttributeAuto;
- break;
- case ProxyConfig::Manual:
- method = AttributeManual;
- break;
- default:
- break;
- }
- argument.insert(PropertyMethod, QVariant::fromValue(method));
- argument.insert(PropertyUrl, QVariant::fromValue(obj.url().toString()));
- argument.insert(PropertyServers, QVariant::fromValue(obj.servers()));
- argument.insert(PropertyServers, QVariant::fromValue(obj.excludes()));
-
- return argument;
-}
-
-const QString &operator>>(const QString &argument, NetworkType &obj)
-{
- if (argument == AttributeEthernet) {
- obj.setType(NetworkType::Wired);
- }
- else if (argument == AttributeWifi) {
- obj.setType(NetworkType::Wifi);
- }
- else {
- obj.setType(NetworkType::Unknown);
- }
-
- return argument;
-}
-
-const QString &operator>>(const QString &argument, NetworkState &obj)
-{
- if (argument == AttributeIdle) {
- obj.setState(NetworkState::Idle);
- }
- else if (argument == AttributeFailure) {
- obj.setState(NetworkState::Failure);
- }
- else if (argument == AttributeAssociation) {
- obj.setState(NetworkState::Association);
- }
- else if (argument == AttributeConfiguration) {
- obj.setState(NetworkState::Configuration);
- }
- else if (argument == AttributeReady) {
- obj.setState(NetworkState::Ready);
- }
- else if (argument == AttributeDisconnect) {
- obj.setState(NetworkState::Disconnect);
- }
- else if (argument == AttributeOneline) {
- obj.setState(NetworkState::Online);
- }
- else {
- obj.setState(NetworkState::Undefined);
- }
- return argument;
-}
-
-NetworkServicePrivate::NetworkServicePrivate(const QString& aPath, NetworkService *parent) :
- QObject(parent)
- ,q_ptr(parent)
- ,m_path(aPath)
-{
- qDBusRegisterMetaType<ConnmanMap>();
- qDBusRegisterMetaType<ConnmanMapList>();
-
- m_service = new NetConnmanServiceInterface("net.connman", m_path,
- QDBusConnection::systemBus(), this);
-
- connect(m_service, SIGNAL(PropertyChanged(QString,QDBusVariant)),
- this, SLOT(updateProperty(QString,QDBusVariant)));
-
- QDBusPendingReply<QVariantMap> reply = m_service->GetProperties();
- QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this);
-
- connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
- this, SLOT(propertiesUpdated(QDBusPendingCallWatcher*)));
-}
-
-void NetworkServicePrivate::setupIpv6Config()
-{
- QVariantMap param;
- param << m_ipv6config;
- if (m_service)
- m_service->SetProperty(PropertyIPv6Config, QDBusVariant(QVariant(param)));
-}
-
-void NetworkServicePrivate::setupNameserversConfig()
-{
- QVariant param = QVariant::fromValue(m_nameserverConfig.stringList());
- if (m_service)
- m_service->SetProperty(PropertyNameserversConfig, QDBusVariant(QVariant(param)));
-}
-
-void NetworkServicePrivate::setupDomainsConfig()
-{
- QVariant param = QVariant::fromValue(m_domainsConfig.stringList());
- if (m_service)
- m_service->SetProperty(PropertyDomainsConfig, QDBusVariant(QVariant(param)));
-}
-
-void NetworkServicePrivate::setupProxyConfig()
-{
- QVariantMap param;
- param << m_proxyConfig;
- if (m_service)
- m_service->SetProperty(PropertyProxyConfig, QDBusVariant(QVariant(param)));
-}
-
-void NetworkServicePrivate::setupIpv4Config()
-{
- QVariantMap param;
- param << m_ipv4config;
- if (m_service)
- m_service->SetProperty(PropertyIPv4Config, QDBusVariant(QVariant(param)));
-}
-
-
-void NetworkServicePrivate::propertiesUpdated(QDBusPendingCallWatcher *call)
-{
- QDBusPendingReply<QVariantMap> reply = *call;
- call->deleteLater();
-
- if (!reply.isError())
- setupConfiguration(reply.value());
-}
-
-void NetworkServicePrivate::updateProperty(const QString &name, const QDBusVariant &value)
-{
- updateProperty(name, value.variant());
-}
-
-void NetworkServicePrivate::updateProperty(const QString& key, const QVariant& val)
-{
- Q_Q(NetworkService);
-
- if (key == PropertyIPv4) {
- QVariantMap value = qdbus_cast<QVariantMap>(val);
- value >> m_ipv4config;
- emit q->ipv4Changed();
- }
- else if (key == PropertyIPv6) {
- QVariantMap value = qdbus_cast<QVariantMap>(val);
- value >> m_ipv6config;
- emit q->ipv6Changed();
- }
- else if (key == PropertyNameservers) {
- QStringList value = qdbus_cast<QStringList>(val);
- m_nameserverConfig.setStringList(value);
- emit q->nameserversChanged();
- }
- else if (key == PropertyDomains) {
- QStringList value = qdbus_cast<QStringList>(val);
- m_domainsConfig.setStringList(value);
- emit q->domainsChanged();
- }
- else if (key == PropertyProxy) {
- QVariantMap value = qdbus_cast<QVariantMap>(val);
- value >> m_proxyConfig;
- emit q->proxyChanged();
- }
- else if (key == PropertyState) {
- QString value = qdbus_cast<QString>(val);
- value >> m_state;
- emit q->stateChanged();
- }
- else if (key == PropertyName) {
- m_name = qdbus_cast<QString>(val);
- emit q->nameChanged();
- }
- else if (key == PropertyType) {
- QString value = qdbus_cast<QString>(val);
- value >> m_type;
- }
-}
-
-void NetworkServicePrivate::setupConfiguration(const QVariantMap &properties)
-{
- QVariantMap::const_iterator it = properties.constBegin(), end = properties.constEnd();
- for ( ; it != end; ++it) {
- updateProperty(it.key(), it.value());
- }
-}
-
-NetworkTechnology::NetworkTechnology(const QString& path, const QVariantMap& properties, QObject* parent)
- : NetworkItem(parent)
- {
- m_technology = new NetConnmanTechnologyInterface("net.connman", path,
- QDBusConnection::systemBus(), this);
- connect(m_technology, SIGNAL(PropertyChanged(QString,QDBusVariant)),
- this, SLOT(updateProperty(QString,QDBusVariant)));
-
- updateProperty(PropertyName, properties[PropertyName]);
- updateProperty(PropertyType, properties[PropertyType]);
- updateProperty(PropertyConnected, properties[PropertyConnected]);
- updateProperty(PropertyPowered, properties[PropertyPowered]);
- }
-
-void NetworkTechnology::updateProperty(const QString &name, const QDBusVariant &value)
-{
- updateProperty(name, value.variant());
-}
-
-void NetworkTechnology::updateProperty(const QString &name, const QVariant &value)
-{
- if (name == PropertyName) {
- m_name = qdbus_cast<QString>(value);
- }
- else if (name == PropertyType) {
- qdbus_cast<QString>(value) >> m_type;
- emit typeChanged();
- }
- else if (name == PropertyConnected) {
- bool connected = qdbus_cast<bool>(value);
- if (connected)
- m_state.setState(NetworkState::Online);
- else
- m_state.setState(NetworkState::Disconnect);
- emit stateChanged();
- }
- else if (name == PropertyPowered) {
- m_powered = qdbus_cast<bool>(value);
- emit poweredChanged();
- }
-}
-
-
-NetworkSettingsManagerPrivate::NetworkSettingsManagerPrivate(NetworkSettingsManager *parent)
- :QObject(parent)
- ,q_ptr(parent)
-{
- m_manager = new NetConnmanManagerInterface("net.connman", "/",
- QDBusConnection::systemBus(), this);
-
- if (m_manager->isValid()) {
- //List technologies
- QDBusPendingReply<ConnmanMapList> reply = m_manager->GetTechnologies();
- QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this);
- connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
- this, SLOT(getTechnologiesFinished(QDBusPendingCallWatcher*)));
-
- reply = m_manager->GetServices();
- watcher = new QDBusPendingCallWatcher(reply, this);
- connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
- this, SLOT(getServicesFinished(QDBusPendingCallWatcher*)));
- }
- else {
- delete m_manager;
- m_manager = NULL;
- }
-}
-
-void NetworkSettingsManagerPrivate::getServicesFinished(QDBusPendingCallWatcher *watcher)
-{
- Q_Q(NetworkSettingsManager);
- QDBusPendingReply<ConnmanMapList> reply = *watcher;
- watcher->deleteLater();
- if (reply.isError())
- return;
-
- foreach (const ConnmanMap &object, reply.value()) {
- const QString servicePath = object.objectPath.path();
- NetworkService *service = new NetworkService(servicePath, this);
- m_services.append(service);
-
- //Update status property
- QString n = qdbus_cast<QString>(object.propertyMap[PropertyName]);
- QString t = qdbus_cast<QString>(object.propertyMap[PropertyType]);
- QString s = qdbus_cast<QString>(object.propertyMap[PropertyState]);
-
- NetworkType type;
- t >> type;
- NetworkState state;
- s >> state;
-
- foreach (NetworkItem* item, m_networksModel.getModel()) {
- if (item->name() == n && item->type() == type.type()) {
- item->setState(state.state());
- }
- }
- }
- emit q->servicesChanged();
-}
-
-void NetworkSettingsManagerPrivate::getTechnologiesFinished(QDBusPendingCallWatcher *watcher)
-{
- Q_Q(NetworkSettingsManager);
- QDBusPendingReply<ConnmanMapList> reply = *watcher;
- watcher->deleteLater();
- if (reply.isError())
- return;
-
- foreach (const ConnmanMap &object, reply.value()) {
- NetworkTechnology *item = new NetworkTechnology(object.objectPath.path(), object.propertyMap, this);
-
- //Wired to the top
- if (item->type() == NetworkType::Wired)
- m_networksModel.insert(0, item);
- else if (item->type() == NetworkType::Wifi) {
- connect(item, &NetworkItem::poweredChanged, q, &NetworkSettingsManager::wifiPoweredChanged);
- m_networksModel.append(item);
- }
- emit q->networksChanged();
- }
-}
-
-bool NetworkSettingsManagerPrivate::wifiPowered()
-{
- foreach (NetworkItem* item, m_networksModel.getModel()) {
- if (item->type() == NetworkType::Wifi) {
- return item->powered();
- }
- }
- return false;
-}
-
-void NetworkSettingsManagerPrivate::setWifiPowered(const bool powered)
-{
- foreach (NetworkItem* item, m_networksModel.getModel()) {
- if (item->type() == NetworkType::Wifi) {
- NetworkTechnology* technology = qobject_cast<NetworkTechnology*>(item);
- if (technology) {
- NetConnmanTechnologyInterface *connmantech = technology->getTechnology();
- connmantech->SetProperty(PropertyPowered, QDBusVariant(QVariant(powered)));
- }
- }
- }
-}
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/networksettingsmanager_linux_p.h b/src/qtdevicesettings/networksettingsplugin/networksettings/connman/networksettingsmanager_linux_p.h
deleted file mode 100644
index bccbed8..0000000
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/connman/networksettingsmanager_linux_p.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef NETWORKSETTINGSMANAGERPRIVATE_H
-#define NETWORKSETTINGSMANAGERPRIVATE_H
-
-#include <QObject>
-#include <QtDBus>
-#include <QList>
-#include <QtDBus/QDBusObjectPath>
-#include <QtCore/QMetaType>
-#include "networkaddressmodel.h"
-#include "networksettingsmanager.h"
-#include "networksmodel.h"
-
-class NetConnmanManagerInterface;
-class NetConnmanServiceInterface;
-class NetworkService;
-class NetConnmanTechnologyInterface;
-
-struct ConnmanMap {
- QDBusObjectPath objectPath;
- QVariantMap propertyMap;
-};
-
-QDBusArgument &operator<<(QDBusArgument &argument, const ConnmanMap &obj);
-
-const QDBusArgument &operator>>(const QDBusArgument &argument, ConnmanMap &obj);
-
-typedef QList<ConnmanMap> ConnmanMapList;
-
-Q_DECLARE_METATYPE( ConnmanMap )
-Q_DECLARE_METATYPE( ConnmanMapList )
-
-class NetworkServicePrivate : public QObject
-{
- Q_OBJECT
- Q_DECLARE_PUBLIC(NetworkService)
-public:
- NetworkServicePrivate(const QString& aPath, NetworkService *parent=0);
-
- NetworkService *q_ptr;
-private slots:
- void propertiesUpdated(QDBusPendingCallWatcher *call);
- void updateProperty(const QString &name, const QDBusVariant &value);
-
-private:
- void setupConfiguration(const QVariantMap &properties);
- void updateProperty(const QString& key, const QVariant& value);
-
-protected:
- void setAutoConnect(const bool autoconnect);
- void setupIpv4Config();
- void setupIpv6Config();
- void setupNameserversConfig();
- void setupDomainsConfig();
- void setupProxyConfig();
-
- QString m_path;
- QString m_name;
- NetworkState m_state;
- IPv4Config m_ipv4config;
- IPv6Config m_ipv6config;
- NetworkAddressModel m_domainsConfig;
- NetworkAddressModel m_nameserverConfig;
- ProxyConfig m_proxyConfig;
- WifiConfig m_wifiConfig;
- NetworkType m_type;
- NetConnmanServiceInterface *m_service;
-};
-
-class NetworkTechnology : public NetworkItem
-{
- Q_OBJECT
-public:
- explicit NetworkTechnology(const QString& path, const QVariantMap& properties, QObject* parent=0);
- virtual ~NetworkTechnology() {
-
- }
-
- NetConnmanTechnologyInterface *getTechnology() {
- return m_technology;
- }
-
-public slots:
- void updateProperty(const QString &name, const QDBusVariant &value);
-protected:
- void updateProperty(const QString &name, const QVariant &value);
-
-private:
- NetConnmanTechnologyInterface *m_technology;
-};
-
-
-class NetworkSettingsManagerPrivate : public QObject
-{
- Q_OBJECT
- Q_DECLARE_PUBLIC(NetworkSettingsManager)
-public:
- explicit NetworkSettingsManagerPrivate(NetworkSettingsManager *parent);
- NetworkSettingsManager *q_ptr;
- void setWifiPowered(const bool powered);
- bool wifiPowered();
-
-public slots:
- void getServicesFinished(QDBusPendingCallWatcher *watcher);
- void getTechnologiesFinished(QDBusPendingCallWatcher *watcher);
-
-protected:
- QList<NetworkService*> m_services;
- NetworksModel m_networksModel;
-private:
- NetConnmanManagerInterface *m_manager;
-};
-
-#endif // NETWORKSETTINGSMANAGERPRIVATE_H
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/networkaddressmodel.cpp b/src/qtdevicesettings/networksettingsplugin/networksettings/networkaddressmodel.cpp
deleted file mode 100644
index 3df67ab..0000000
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/networkaddressmodel.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "networkaddressmodel.h"
-
-NetworkAddressModel::NetworkAddressModel(QObject *parent)
- :QStringListModel(parent)
-{
-}
-
-NetworkAddressModel::NetworkAddressModel(const QStringList &strings, QObject *parent)
- :QStringListModel(parent)
-{
- setStringList(strings);
-}
-
-void NetworkAddressModel::setStringList(const QStringList &addresses)
-{
- m_addresses = addresses;
- QStringListModel::setStringList(m_addresses);
- emit countChanged();
-}
-
-void NetworkAddressModel::append(const QString& address)
-{
- int row = rowCount();
-
- bool succeed = insertRows(row, 1);
- if (succeed)
- succeed = setData(index(row), QVariant::fromValue(address));
-
- Q_ASSERT(succeed == true);
-
- emit countChanged();
-}
-
-void NetworkAddressModel::remove(int index)
-{
- removeRows(index, 1);
- emit countChanged();
-}
-
-int NetworkAddressModel::count() const
-{
- return rowCount();
-}
-
-void NetworkAddressModel::resetChanges()
-{
- QStringListModel::setStringList(m_addresses);
-}
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/networkaddressmodel.h b/src/qtdevicesettings/networksettingsplugin/networksettings/networkaddressmodel.h
deleted file mode 100644
index b90958f..0000000
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/networkaddressmodel.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef NETWORKADDRESSMODEL_H
-#define NETWORKADDRESSMODEL_H
-
-#include <QStringListModel>
-
-class NetworkAddressModel : public QStringListModel
-{
- Q_OBJECT
- Q_PROPERTY(int count READ count NOTIFY countChanged)
-public:
- explicit NetworkAddressModel(QObject *parent = 0);
- explicit NetworkAddressModel(const QStringList &strings, QObject *parent = 0);
- Q_INVOKABLE void append(const QString& address);
- Q_INVOKABLE void remove(int index);
- Q_INVOKABLE void resetChanges();
- void setStringList(const QStringList &addresses);
- int count() const;
-
-signals:
- void countChanged();
-private:
- QStringList m_addresses;
-};
-
-#endif // NETWORKADDRESSMODEL_H
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/networkconfig.h b/src/qtdevicesettings/networksettingsplugin/networksettings/networkconfig.h
deleted file mode 100644
index cdff473..0000000
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/networkconfig.h
+++ /dev/null
@@ -1,394 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef NETWORKCONFIG_H
-#define NETWORKCONFIG_H
-
-#include <QObject>
-#include <QUrl>
-#include <QVariantMap>
-#include "networkaddressmodel.h"
-
-class NetworkState : public QObject
-{
- Q_OBJECT
- Q_ENUMS(States)
- Q_PROPERTY(States state READ state WRITE setState NOTIFY stateChanged)
-
-public:
- enum States {Idle, Failure, Association, Configuration, Ready, Disconnect, Online, Undefined};
-
- explicit NetworkState(States aState, QObject *parent = 0)
- : QObject(parent)
- {
- m_state = aState;
- }
-
- explicit NetworkState(QObject *parent = 0)
- : QObject(parent)
- {
- m_state = Undefined;
- }
-
- States state() const {
- return m_state;
- }
-
- void setState(const States aState) {
- m_state = aState;
- emit stateChanged();
- }
-
-signals:
- void stateChanged();
-
-private:
- States m_state;
-};
-
-class NetworkType : public QObject
-{
- Q_OBJECT
- Q_ENUMS(Types)
- Q_PROPERTY(Types type READ type WRITE setType NOTIFY typeChanged)
-
-public:
- enum Types {
- Wired,
- Wifi,
- Bluetooth,
- Unknown
- };
-
- explicit NetworkType(Types aType, QObject *parent = 0)
- : QObject(parent)
- {
- m_type = aType;
- }
-
- explicit NetworkType(QObject *parent = 0)
- : QObject(parent)
- {
- m_type = Unknown;
- }
-
-
- Types type() const {
- return m_type;
- }
-
- void setType(const Types aType) {
- m_type = aType;
- emit typeChanged();
- }
-
-signals:
- void typeChanged();
-
-private:
- Types m_type;
-};
-
-class IPv4Config : public QObject
-{
- Q_OBJECT
- Q_ENUMS(MethodType)
- Q_PROPERTY(QString address READ address WRITE setAddress NOTIFY addressChanged)
- Q_PROPERTY(QString gateway READ gateway WRITE setGateway NOTIFY gatewayChanged)
- Q_PROPERTY(MethodType method READ method WRITE setMethod NOTIFY methodChanged)
- Q_PROPERTY(QString mask READ mask WRITE setMask NOTIFY maskChanged)
-
-public:
- explicit IPv4Config(QObject *parent = 0)
- : QObject(parent)
- {
-
- }
-
- enum MethodType {Dhcp, Manual, Off};
-
- QString address() const {
- return m_address;
- }
- void setAddress(const QString& aAdderess) {
- m_address = aAdderess;
- emit addressChanged();
- }
-
- QString gateway() const {
- return m_gateway;
- }
-
- void setGateway(const QString& aGateway) {
- m_gateway = aGateway;
- emit gatewayChanged();
- }
-
- MethodType method() const {
- return m_method;
- }
-
- void setMethod(const MethodType aMethod) {
- m_method = aMethod;
- emit methodChanged();
- }
-
- QString mask() const {
- return m_mask;
- }
-
- void setMask(const QString& aMask) {
- m_mask = aMask;
- emit maskChanged();
- }
-
-signals:
- void addressChanged();
- void gatewayChanged();
- void methodChanged();
- void maskChanged();
-
-private:
- QString m_address;
- QString m_gateway;
- MethodType m_method;
- QString m_mask;
-};
-
-
-class IPv6Config : public QObject
-{
- Q_OBJECT
- Q_ENUMS(MethodType PrivacyType)
- Q_PROPERTY(QString address READ address WRITE setAddress NOTIFY addressChanged)
- Q_PROPERTY(QString gateway READ gateway WRITE setGateway NOTIFY gatewayChanged)
- Q_PROPERTY(MethodType method READ method WRITE setMethod NOTIFY methodChanged)
- Q_PROPERTY(PrivacyType privacy READ privacy WRITE setPrivacy NOTIFY privacyChanged)
- Q_PROPERTY(int prefixLength READ prefixLength WRITE setPrefixLength NOTIFY prefixLengthChanged)
-
-public:
- explicit IPv6Config(QObject *parent = 0)
- : QObject(parent)
- {
-
- }
-
- enum MethodType {Auto, Manual, Off};
- enum PrivacyType {Disabled, Enabled, Preferred};
-
- QString address() const {
- return m_address;
- }
- void setAddress(const QString& aAdderess) {
- m_address = aAdderess;
- emit addressChanged();
- }
-
- QString gateway() const {
- return m_gateway;
- }
-
- void setGateway(const QString& aGateway) {
- m_gateway = aGateway;
- emit gatewayChanged();
- }
-
- MethodType method() const {
- return m_method;
- }
-
- void setMethod(const MethodType aMethod) {
- m_method = aMethod;
- emit methodChanged();
- }
-
- PrivacyType privacy() const {
- return m_privacy;
- }
-
- void setPrivacy(const PrivacyType aPrivacy) {
- m_privacy = aPrivacy;
- emit privacyChanged();
- }
-
- int prefixLength() const {
- return m_prefixLength;
- }
-
- void setPrefixLength(const int& aPrefixLength) {
- m_prefixLength = aPrefixLength;
- emit prefixLengthChanged();
- }
-
-signals:
- void addressChanged();
- void gatewayChanged();
- void methodChanged();
- void privacyChanged();
- void prefixLengthChanged();
-
-private:
- QString m_address;
- QString m_gateway;
- MethodType m_method;
- PrivacyType m_privacy;
- int m_prefixLength;
-};
-
-class ProxyConfig : public QObject
-{
- Q_OBJECT
- Q_ENUMS(MethodType)
-public:
- Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged)
- Q_PROPERTY(QAbstractItemModel* servers READ servers NOTIFY serversChanged)
- Q_PROPERTY(QAbstractItemModel* excludes READ excludes NOTIFY excludesChanged)
- Q_PROPERTY(MethodType method READ method WRITE setMethod NOTIFY methodChanged)
-
- explicit ProxyConfig(QObject *parent=NULL)
- : QObject(parent)
- {
-
- }
-
- enum MethodType {Direct, Auto, Manual};
-
- QUrl url() const {
- return m_url;
- }
-
- void setUrl(const QUrl& aUrl) {
- m_url = aUrl;
- emit urlChanged();
- }
-
- QAbstractItemModel* servers(void) {
- return &m_servers;
- }
-
- void setServers(const QStringList& aServers) {
- m_servers.setStringList(aServers);
- emit serversChanged();
- }
-
- QStringList servers() const {
- return m_servers.stringList();
- }
-
- QAbstractItemModel* excludes(void) {
- return &m_excludes;
- }
-
- QStringList excludes() const {
- return m_excludes.stringList();
- }
-
- void setExcludes(const QStringList& aExcludes) {
- m_excludes.setStringList(aExcludes);
- emit excludesChanged();
- }
-
- MethodType method(void) const {
- return m_method;
- }
-
- void setMethod(const MethodType& aMethod) {
- m_method = aMethod;
- emit methodChanged();
- }
-
-signals:
- void urlChanged();
- void serversChanged();
- void excludesChanged();
- void methodChanged();
-private:
- QUrl m_url;
- NetworkAddressModel m_servers;
- NetworkAddressModel m_excludes;
- MethodType m_method;
-};
-
-class WifiConfig : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString bssid READ bssid NOTIFY bssidChanged)
- Q_PROPERTY(int maxRate READ maxRate NOTIFY maxRateChanged)
- Q_PROPERTY(int frequency READ frequency NOTIFY frequencyChanged)
- Q_PROPERTY(QString encryptionMode READ encryptionMode NOTIFY encryptionModeChanged)
- Q_PROPERTY(bool hidden READ hidden NOTIFY hiddenChanged)
-public:
- explicit WifiConfig(QObject* parent = 0) :
- QObject(parent) {
-
- }
-
- const QString bssid() {
- return m_bssid;
- }
-
- int maxRate() {
- return m_maxRate;
- }
-
- int frequency() {
- return m_frequency;
- }
-
- const QString encryptionMode() {
- return m_encryptionMode;
- }
-
- bool hidden() const {
- return m_hidden;
- }
-
-signals:
- void bssidChanged(const QString &bssid);
- void maxRateChanged(quint32 rate);
- void frequencyChanged(quint16 frequency);
- void encryptionModeChanged(const QString &mode);
- void hiddenChanged(bool);
-
-private:
- QString m_bssid;
- quint32 m_maxRate;
- quint16 m_frequency;
- QString m_encryptionMode;
- bool m_hidden;
-};
-
-
-#endif
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/networksettings.pri b/src/qtdevicesettings/networksettingsplugin/networksettings/networksettings.pri
deleted file mode 100644
index 7a81571..0000000
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/networksettings.pri
+++ /dev/null
@@ -1,28 +0,0 @@
-#-------------------------------------------------
-#
-# Project created by QtCreator 2015-11-03T13:52:45
-#
-#-------------------------------------------------
-
-QT += core network dbus
-
-INCLUDEPATH += $${PWD}/connman
-INCLUDEPATH += $${PWD}
-
-DBUS_INTERFACES = \
- networksettings/connman/connman_manager.xml \
- networksettings/connman/connman_service.xml \
- networksettings/connman/connman_technology.xml
-
-
-SOURCES += networksettings/networksettingsmanager.cpp \
- networksettings/connman/networksettingsmanager_linux.cpp \
- networksettings/networkaddressmodel.cpp \
- networksettings/networksmodel.cpp
-
-HEADERS += \
- networksettings/networkconfig.h \
- networksettings/connman/networksettingsmanager_linux_p.h \
- networksettings/networkaddressmodel.h \
- networksettings/networksettingsmanager.h \
- networksettings/networksmodel.h
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/networksettingsmanager.cpp b/src/qtdevicesettings/networksettingsplugin/networksettings/networksettingsmanager.cpp
deleted file mode 100644
index 6df0f22..0000000
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/networksettingsmanager.cpp
+++ /dev/null
@@ -1,167 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "networksettingsmanager.h"
-#include "connman/networksettingsmanager_linux_p.h"
-#include <QStringListModel>
-
-NetworkService::NetworkService(const QString& aServiceId, QObject* parent) :
- QObject(parent)
- ,d_ptr(new NetworkServicePrivate(aServiceId, this))
-{
-
-}
-
-QString NetworkService::name() const
-{
- Q_D(const NetworkService);
- return d->m_name;
-}
-
-NetworkState::States NetworkService::state()
-{
- Q_D(NetworkService);
- return d->m_state.state();
-}
-
-NetworkType::Types NetworkService::type()
-{
- Q_D(NetworkService);
- return d->m_type.type();
-}
-
-IPv4Config* NetworkService::ipv4()
-{
- Q_D(NetworkService);
- return &d->m_ipv4config;
-}
-
-IPv6Config* NetworkService::ipv6()
-{
- Q_D(NetworkService);
- return &d->m_ipv6config;
-}
-
-ProxyConfig* NetworkService::proxy()
-{
- Q_D(NetworkService);
- return &d->m_proxyConfig;
-}
-
-QAbstractItemModel* NetworkService::domains()
-{
- Q_D(NetworkService);
- return &d->m_domainsConfig;
-}
-
-QAbstractItemModel* NetworkService::nameservers()
-{
- Q_D(NetworkService);
- return &d->m_nameserverConfig;
-}
-
-void NetworkService::setupIpv4Config()
-{
- Q_D(NetworkService);
- d->setupIpv4Config();
-}
-
-void NetworkService::setupIpv6Config()
-{
- Q_D(NetworkService);
- d->setupIpv6Config();
-}
-
-void NetworkService::setupNameserversConfig()
-{
- Q_D(NetworkService);
- d->setupNameserversConfig();
-}
-
-void NetworkService::setupDomainsConfig()
-{
- Q_D(NetworkService);
- d->setupDomainsConfig();
-}
-
-void NetworkService::setupProxyConfig()
-{
- Q_D(NetworkService);
- d->setupProxyConfig();
-}
-
-NetworkSettingsManager::NetworkSettingsManager(QObject *parent) :
- QObject(parent)
- ,d_ptr(new NetworkSettingsManagerPrivate(this))
-{
-
-}
-
-QQmlListProperty<NetworkService> NetworkSettingsManager::services()
-{
- Q_D(NetworkSettingsManager);
- return QQmlListProperty<NetworkService>(this, d->m_services);
-}
-
-QAbstractItemModel* NetworkSettingsManager::networks()
-{
- Q_D(NetworkSettingsManager);
- return &d->m_networksModel;
-}
-
-NetworkService* NetworkSettingsManager::getService(const QString& aName, const int aType)
-{
- Q_D(NetworkSettingsManager);
-
- foreach (NetworkService* service, d->m_services) {
- if (service->name() == aName && service->type() == aType) {
- return service;
- }
- }
- return NULL;
-}
-
-
-bool NetworkSettingsManager::wifiPowered()
-{
- Q_D(NetworkSettingsManager);
- return d->wifiPowered();
-}
-
-void NetworkSettingsManager::setWifiPowered(const bool power)
-{
- Q_D(NetworkSettingsManager);
- d->setWifiPowered(power);
-}
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/networksettingsmanager.h b/src/qtdevicesettings/networksettingsplugin/networksettings/networksettingsmanager.h
deleted file mode 100644
index 8e51258..0000000
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/networksettingsmanager.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef NETWORKSETTINGSMANAGER_H
-#define NETWORKSETTINGSMANAGER_H
-
-#include "networkconfig.h"
-#include <QObject>
-#include <QQmlListProperty>
-#include <QStringListModel>
-
-QT_FORWARD_DECLARE_CLASS(NetworkSettingsManagerPrivate)
-QT_FORWARD_DECLARE_CLASS(NetworkServicePrivate)
-QT_FORWARD_DECLARE_CLASS(NetworkNetworkTypePrivate)
-
-class NetworkService : public QObject
-{
- Q_OBJECT
- Q_ENUMS(StateTypes)
- Q_PROPERTY(QString name READ name NOTIFY nameChanged)
- Q_PROPERTY(NetworkState::States state READ state NOTIFY stateChanged)
- Q_PROPERTY(NetworkType::Types type READ type NOTIFY typeChanged)
- Q_PROPERTY(IPv4Config* ipv4 READ ipv4 NOTIFY ipv4Changed)
- Q_PROPERTY(IPv6Config* ipv6 READ ipv6 NOTIFY ipv6Changed)
- Q_PROPERTY(ProxyConfig* proxy READ proxy NOTIFY proxyChanged)
- Q_PROPERTY(QAbstractItemModel* domains READ domains NOTIFY domainsChanged)
- Q_PROPERTY(QAbstractItemModel* nameservers READ nameservers NOTIFY nameserversChanged)
-public:
- explicit NetworkService(const QString& aServiceId, QObject* parent = 0);
-
- QString name() const;
- NetworkState::States state();
- NetworkType::Types type();
- IPv4Config* ipv4();
- IPv6Config* ipv6();
- ProxyConfig* proxy();
- QAbstractItemModel* domains();
- QAbstractItemModel* nameservers();
-
- Q_INVOKABLE void setAutoConnect(const bool autoconnect);
- Q_INVOKABLE void setupIpv4Config();
- Q_INVOKABLE void setupIpv6Config();
- Q_INVOKABLE void setupNameserversConfig();
- Q_INVOKABLE void setupDomainsConfig();
- Q_INVOKABLE void setupProxyConfig();
-
-Q_SIGNALS:
- void nameChanged();
- void stateChanged();
- void typeChanged();
- void proxyChanged();
- void ipv4Changed();
- void ipv6Changed();
- void domainsChanged();
- void nameserversChanged();
-
-protected:
- NetworkServicePrivate *d_ptr;
-
- Q_DISABLE_COPY(NetworkService)
- Q_DECLARE_PRIVATE(NetworkService)
-};
-
-class NetworkSettingsManager : public QObject
-{
- Q_OBJECT
- Q_ENUMS(StateTypes NetworkTypeTypes)
- Q_PROPERTY(QQmlListProperty<NetworkService> services READ services NOTIFY servicesChanged)
- Q_PROPERTY(QAbstractItemModel* networks READ networks NOTIFY networksChanged)
- Q_PROPERTY(bool wifiPowered READ wifiPowered WRITE setWifiPowered NOTIFY wifiPoweredChanged)
-public:
- explicit NetworkSettingsManager(QObject* parent = 0);
- QQmlListProperty<NetworkService> services();
-
- QAbstractItemModel* networks();
-
- Q_INVOKABLE NetworkService* getService(const QString& aName, const int aType);
-
- bool wifiPowered();
- void setWifiPowered(const bool power);
-
-Q_SIGNALS:
- void servicesChanged();
- void wifiPoweredChanged();
- void networksChanged();
-
-protected:
- NetworkSettingsManagerPrivate *d_ptr;
-
-private:
- Q_DISABLE_COPY(NetworkSettingsManager)
- Q_DECLARE_PRIVATE(NetworkSettingsManager)
-};
-
-#endif // NETWORKSETTINGSMANAGER_H
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/networksmodel.cpp b/src/qtdevicesettings/networksettingsplugin/networksettings/networksmodel.cpp
deleted file mode 100644
index 8524417..0000000
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/networksmodel.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include <QQmlPropertyMap>
-#include "networksmodel.h"
-
-NetworksModel::NetworksModel(QObject *parent)
- : QAbstractListModel(parent)
-{
- m_roleNames.insert(Qt::UserRole, "modelData");
- m_roleNames.insert(Type, "type");
- m_roleNames.insert(Status, "status");
- m_roleNames.insert(Name, "name");
-}
-
-NetworksModel::~NetworksModel()
-{
-
-}
-
-QHash<int, QByteArray> NetworksModel::roleNames() const
-{
- return m_roleNames;
-}
-
-
-int NetworksModel::rowCount(const QModelIndex & parent) const
-{
- Q_UNUSED(parent);
- return m_items.count();
-}
-
-QVariant NetworksModel::data(const QModelIndex & index, int role) const
-{
- if (!index.isValid()) return QVariant();
-
- NetworkItem *item = m_items[index.row()];
- if (role == Qt::UserRole) {
- return QVariant::fromValue(static_cast<QObject*>(item));
- }
-
- switch (role) {
- case Type:
- return item->type();
- break;
- case Name:
- return item->name();
- break;
- case Status:
- return item->state();
- break;
- default:
- return "";
- }
-
-}
-
-void NetworksModel::append(NetworkItem* item)
-{
- item->setParent(this);
-
- beginInsertRows(QModelIndex(), rowCount(), rowCount());
- m_items.append(item);
- endInsertRows();
-}
-
-void NetworksModel::insert(int row, NetworkItem* item)
-{
- item->setParent(this);
-
- beginInsertRows(QModelIndex(), row, row);
- m_items.insert(row, item);
- endInsertRows();
-}
-
-QList<NetworkItem*> NetworksModel::getModel()
-{
- return m_items;
-}
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettings/networksmodel.h b/src/qtdevicesettings/networksettingsplugin/networksettings/networksmodel.h
deleted file mode 100644
index d4c389c..0000000
--- a/src/qtdevicesettings/networksettingsplugin/networksettings/networksmodel.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef NETWORKSMODEL_H
-#define NETWORKSMODEL_H
-
-#include <QAbstractListModel>
-#include "networkconfig.h"
-
-QT_FORWARD_DECLARE_CLASS(NetworksModelPrivate)
-QT_FORWARD_DECLARE_CLASS(QQmlPropertyMap)
-
-class NetworkItem : public QObject {
- Q_OBJECT
- Q_PROPERTY(QString name READ name NOTIFY nameChanged)
- Q_PROPERTY(NetworkState::States state READ state NOTIFY stateChanged)
- Q_PROPERTY(NetworkType::Types type READ type NOTIFY typeChanged)
- Q_PROPERTY(bool powered READ powered NOTIFY poweredChanged)
-
-public:
- explicit NetworkItem(QObject* parent=0) :
- QObject(parent) {
-
- }
-
- QString name() const {
- return m_name;
- }
-
- void setName(const QString& aName) {
- m_name = aName;
- }
-
- NetworkState::States state() const {
- return m_state.state();
- }
-
- NetworkType::Types type() const {
- return m_type.type();
- }
-
- void setState(const NetworkState::States aState) {
- m_state.setState(aState);
- }
-
- void setType(const NetworkType::Types aType) {
- m_type.setType(aType);
- }
-
- bool powered() const {
- return m_powered;
- }
-
- void setPowered(const bool aPowered) {
- m_powered = aPowered;
- }
-
-signals:
- void nameChanged();
- void stateChanged();
- void typeChanged();
- void poweredChanged();
-
-protected:
- QString m_name;
- NetworkState m_state;
- NetworkType m_type;
- bool m_powered;
- friend class NetworksModel;
-};
-
-class NetworksModel : public QAbstractListModel
-{
- Q_OBJECT
-
-public:
- explicit NetworksModel(QObject *parent=0);
- virtual ~NetworksModel();
- // from QAbstractItemModel
- int rowCount(const QModelIndex & parent = QModelIndex()) const;
- QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
- QHash<int, QByteArray> roleNames() const;
-
- void append(NetworkItem* networkItem);
- void insert(int row, NetworkItem* networkItem);
- QList<NetworkItem*> getModel();
-
- enum Roles {
- Type = Qt::UserRole + 1,
- Status,
- Name
- };
-
-private:
- QList<NetworkItem*> m_items;
- QHash<int, QByteArray> m_roleNames;
-};
-
-#endif // NETWORKSMODEL_H
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettingsplugin.pro b/src/qtdevicesettings/networksettingsplugin/networksettingsplugin.pro
deleted file mode 100644
index c514393..0000000
--- a/src/qtdevicesettings/networksettingsplugin/networksettingsplugin.pro
+++ /dev/null
@@ -1,45 +0,0 @@
-TEMPLATE = lib
-TARGET = networksettingsplugin
-QT += qml quick
-CONFIG += qt plugin
-
-uri = com.theqtcompany.settings.network
-
-include(networksettings/networksettings.pri)
-
-# Input
-SOURCES += \
- networksettingsplugin_plugin.cpp
-HEADERS += \
- networksettingsplugin_plugin.h
-
-DISTFILES = qmldir
-
-!equals(_PRO_FILE_PWD_, $$OUT_PWD) {
- copy_qmldir.target = $$OUT_PWD/qmldir
- copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir
- copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\"
- QMAKE_EXTRA_TARGETS += copy_qmldir
- PRE_TARGETDEPS += $$copy_qmldir.target
-}
-
-qmldir.files = qmldir
-
-pluginfiles.files += \
- imports/NetworkSettings/EditWiredSettings.qml \
- imports/NetworkSettings/NetworkDetails.qml \
- imports/NetworkSettings/WifiSettings.qml \
- imports/NetworkSettings/IpAddressTextField.qml \
- imports/NetworkSettings/NetworkSettings.qml \
- imports/NetworkSettings/WiredSettings.qml
-
-installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
-
-pluginfiles.path = $$installPath
-qmldir.path = $$installPath
-target.path = $$installPath
-INSTALLS += target qmldir pluginfiles
-
-RESOURCES += \
- icons.qrc
-
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettingsplugin_plugin.cpp b/src/qtdevicesettings/networksettingsplugin/networksettingsplugin_plugin.cpp
deleted file mode 100644
index 684cef0..0000000
--- a/src/qtdevicesettings/networksettingsplugin/networksettingsplugin_plugin.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "networksettingsplugin_plugin.h"
-#include "networkconfig.h"
-#include "networksettingsmanager.h"
-
-#include <qqml.h>
-#include <QQmlEngine>
-
-template <typename T>
-QObject *instance(QQmlEngine *engine, QJSEngine *) {
- T *t = new T(engine);
- t->setObjectName(T::staticMetaObject.className());
- return t;
-}
-
-void NetworksettingspluginPlugin::registerTypes(const char *uri)
-{
- Q_ASSERT(QLatin1String(uri) == QLatin1String("com.theqtcompany.settings.network"));
- qmlRegisterUncreatableType<NetworkService>(uri, 1, 0, "NetworkService", "Cannot be instantiated directly.");
- qmlRegisterUncreatableType<IPv4Config>(uri, 1, 0, "IPv4Config", "Cannot be instantiated directly.");
- qmlRegisterUncreatableType<IPv6Config>(uri, 1, 0, "IPv6Config", "Cannot be instantiated directly.");
- qmlRegisterUncreatableType<ProxyConfig>(uri, 1, 0, "ProxyConfig", "Cannot be instantiated directly.");
- qmlRegisterUncreatableType<NetworkType>(uri, 1, 0, "NetworkType", "Cannot be instantiated directly.");
- qmlRegisterSingletonType<NetworkSettingsManager>(uri, 1, 0, "NetworkSettingsManager", &instance<NetworkSettingsManager>);
-}
-
-
diff --git a/src/qtdevicesettings/networksettingsplugin/networksettingsplugin_plugin.h b/src/qtdevicesettings/networksettingsplugin/networksettingsplugin_plugin.h
deleted file mode 100644
index 40e02e2..0000000
--- a/src/qtdevicesettings/networksettingsplugin/networksettingsplugin_plugin.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef NETWORKSETTINGSPLUGIN_PLUGIN_H
-#define NETWORKSETTINGSPLUGIN_PLUGIN_H
-
-#include <QQmlExtensionPlugin>
-
-class NetworksettingspluginPlugin : public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
-
-public:
- void registerTypes(const char *uri);
-};
-
-#endif // NETWORKSETTINGSPLUGIN_PLUGIN_H
-
diff --git a/src/qtdevicesettings/networksettingsplugin/qml.qrc b/src/qtdevicesettings/networksettingsplugin/qml.qrc
deleted file mode 100644
index 87c3639..0000000
--- a/src/qtdevicesettings/networksettingsplugin/qml.qrc
+++ /dev/null
@@ -1,10 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>qml/EditWiredSettings.qml</file>
- <file>qml/IpAddressTextField.qml</file>
- <file>qml/NetworkDetails.qml</file>
- <file>qml/NetworkSettings.qml</file>
- <file>qml/WifiSettings.qml</file>
- <file>qml/WiredSettings.qml</file>
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/networksettingsplugin/qmldir b/src/qtdevicesettings/networksettingsplugin/qmldir
deleted file mode 100644
index 71f3726..0000000
--- a/src/qtdevicesettings/networksettingsplugin/qmldir
+++ /dev/null
@@ -1,4 +0,0 @@
-module com.theqtcompany.settings.network
-NetworkSettings 1.0 NetworkSettings.qml
-plugin networksettingsplugin
-
diff --git a/src/qtdevicesettings/settingscomponents/icons.qrc b/src/qtdevicesettings/settingscomponents/icons.qrc
deleted file mode 100644
index d6ff9da..0000000
--- a/src/qtdevicesettings/settingscomponents/icons.qrc
+++ /dev/null
@@ -1,21 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>imports/Settings/Back.png</file>
- <file>imports/Settings/Chevron-left.png</file>
- <file>imports/Settings/Chevron-right.png</file>
- <file>imports/Settings/Circle-x.png</file>
- <file>imports/Settings/Cogs.png</file>
- <file>imports/Settings/Connections.png</file>
- <file>imports/Settings/Display.png</file>
- <file>imports/Settings/Lock.png</file>
- <file>imports/Settings/Plus.png</file>
- <file>imports/Settings/Settings.png</file>
- <file>imports/Settings/Wifi.png</file>
- <file>imports/Settings/World.png</file>
- <file>imports/Settings/Wrench.png</file>
- <file>imports/Settings/Chevron-left-med.png</file>
- <file>imports/Settings/Chevron-left-big.png</file>
- <file>imports/Settings/Settings-big.png</file>
- <file>imports/Settings/Connections-big.png</file>
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/settingscomponents/imports/Settings/CustomCombobox.qml b/src/qtdevicesettings/settingscomponents/imports/Settings/CustomCombobox.qml
deleted file mode 100644
index 72342e1..0000000
--- a/src/qtdevicesettings/settingscomponents/imports/Settings/CustomCombobox.qml
+++ /dev/null
@@ -1,184 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-import QtQuick.Layouts 1.1
-import QtQuick.Controls 1.4
-import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import QtQml.Models 2.1
-
-Item {
- id: control
- property alias popupParent: popupView.parent
- property bool popupVisible: popupView.visible
- property int selectedIndex: -1
- property alias model: comboboxModel.model
- property string textRole: "text"
- property bool modified: false
- property alias popupVisibility: popupView.visible
- property alias textValue: label.text
- property int popupHeight: comboboxModel.items.count * height
- property bool enabled: true
- property bool editable: true
- property Component delegate
-
- implicitWidth: Math.round(100 * Flat.FlatStyle.scaleFactor)
- implicitHeight: Math.round(26 * Flat.FlatStyle.scaleFactor)
-
- Component.onCompleted: {
- //Find root window for parent
- var p = control.parent
- while (p.parent) {
- p = p.parent;
- }
- popupParent = p;
- }
-
- function hide() {
- popupView.visible = false
- button.checked = false
- }
-
- function setSelectIndexToVal(value, role) {
- if (model) {
- for (var i=0, len=comboboxModel.items.count;i<len;i++) {
- if (comboboxModel.items.get(i).model[role] === value) {
- selectedIndex = i;
- return;
- }
- }
- }
- selectedIndex = -1;
- }
-
- Button {
- id: button
- checkable: true
- enabled: true
- anchors.fill: parent
- checked: popupView.visible
- onClicked: popupView.visible = !popupView.visible
-
- TextLabel {
- id: label
- anchors.fill: parent
- anchors.margins: 10 * Flat.FlatStyle.scaleFactor
- color: button.hovered || button.checked ? Flat.FlatStyle.selectedTextColor:Flat.FlatStyle.styleColor
- horizontalAlignment: Text.AlignLeft
- text: selectedIndex>=0 ? comboboxModel.items.count>0 ? comboboxModel.items.get(selectedIndex).model[textRole]:"":""
- }
-
- Flat.LeftArrowIcon {
- anchors.right: parent.right
- anchors.verticalCenter: parent.verticalCenter
- anchors.rightMargin: Math.round(10 * Flat.FlatStyle.scaleFactor)
- width: Math.round(14 * Flat.FlatStyle.scaleFactor)
- height: Math.round(14 * Flat.FlatStyle.scaleFactor)
- rotation: popupVisibility ? 90 : -90
- color: button.hovered || button.checked ? Flat.FlatStyle.selectedTextColor:Flat.FlatStyle.styleColor
- opacity: control.enabled || control.editable ? 1.0 : 0.2
- }
- }
-
- Item {
- id: popupView
- y: 0
- x: 0
- height: control.popupHeight
- width: control.width
- visible: false
- onVisibleChanged: {
- if (visible) {
- var pos = control.mapToItem(popupView.parent, 0, 0)
- x = pos.x
- y = pos.y + button.height
-
- if (y + control.popupHeight > popupParent.height) {
- y = popupParent.height - control.popupHeight;
- }
- }
- }
-
- Rectangle {
- anchors.fill: parent
- border.color: Flat.FlatStyle.darkFrameColor
- border.width: 1
- color: "white"
-
- Column {
- ExclusiveGroup {
- id: exgroup
- }
-
- DelegateModel {
- id: comboboxModel
- delegate: comboboxDelete
- }
-
- Repeater {
- id: comboboxView
- model: comboboxModel
- }
- }
- }
- }
-
- Component {
- id: comboboxDelete
- Item {
- id: comboboxViewDelegate
- property bool checked
- width: control.width
- height: control.height
-
- Loader {
- id: loader
- sourceComponent: delegate
- anchors.fill: parent
- property var modelData: model
- onLoaded : exgroup.bindCheckable(item)
- }
-
- Connections {
- target: loader.item
- onClicked: {
- popupView.visible = false;
- button.checked = false
- selectedIndex = index
- }
- }
- }
- }
-}
diff --git a/src/qtdevicesettings/settingscomponents/imports/Settings/FlatStyledDropdownDelegate.qml b/src/qtdevicesettings/settingscomponents/imports/Settings/FlatStyledDropdownDelegate.qml
deleted file mode 100644
index ca68e16..0000000
--- a/src/qtdevicesettings/settingscomponents/imports/Settings/FlatStyledDropdownDelegate.qml
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-import QtQuick.Layouts 1.1
-import QtQuick.Controls 1.4
-import QtQuick.Controls.Styles.Flat 1.0 as Flat
-
-Item {
- id: root
- property bool checkable: true
- property bool checked: false
- property bool pressed: false
- signal clicked()
-
- MouseArea {
- id: delegateButton
- anchors.fill: parent
- hoverEnabled: true
-
- onPressed: root.pressed = true
- onClicked: root.clicked();
- onEntered: checked = !checked;
-
- Rectangle {
- anchors.fill: parent
- color: root.checked ? Flat.FlatStyle.disabledColor : "transparent"
- opacity: root.checked ? 0.15 : 1.0
- }
- Rectangle {
- color: Flat.FlatStyle.darkFrameColor
- width: parent.width
- height: Flat.FlatStyle.onePixel
- anchors.bottom: parent.bottom
- }
- TextLabel {
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- anchors.margins: Math.round(10 * Flat.FlatStyle.scaleFactor)
- horizontalAlignment: Text.AlignLeft
- text: modelData.text
- }
- }
-}
diff --git a/src/qtdevicesettings/settingscomponents/imports/Settings/IconButton.qml b/src/qtdevicesettings/settingscomponents/imports/Settings/IconButton.qml
deleted file mode 100644
index 898e5e0..0000000
--- a/src/qtdevicesettings/settingscomponents/imports/Settings/IconButton.qml
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-
-MouseArea {
- id: root
- property alias pressedIcon: pressedImage.source
- property alias releasedIcon: releasedImage.source
- width: pressedImage.sourceSize.width
- height: pressedImage.sourceSize.height
-
- Image {
- id: pressedImage
- visible: root.pressed
- }
-
- Image {
- id: releasedImage
- visible: !root.pressed
- }
-}
diff --git a/src/qtdevicesettings/settingscomponents/imports/Settings/TextLabel.qml b/src/qtdevicesettings/settingscomponents/imports/Settings/TextLabel.qml
deleted file mode 100644
index 176f848..0000000
--- a/src/qtdevicesettings/settingscomponents/imports/Settings/TextLabel.qml
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-import QtQuick.Layouts 1.1
-import QtQuick.Controls 1.4
-
-Text {
- color: systemPalette.text
- font.family: Flat.FlatStyle.fontFamily
- font.pixelSize: Math.round(12 * Flat.FlatStyle.scaleFactor)
- renderType: Text.QtRendering
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
-}
diff --git a/src/qtdevicesettings/settingscomponents/imports/Settings/qmldir b/src/qtdevicesettings/settingscomponents/imports/Settings/qmldir
deleted file mode 100644
index 2810983..0000000
--- a/src/qtdevicesettings/settingscomponents/imports/Settings/qmldir
+++ /dev/null
@@ -1,5 +0,0 @@
-module com.theqtcompany.settings.common
-TextLabel 1.0 TextLabel.qml
-IconButton 1.0 IconButton.qml
-CustomCombobox 1.0 CustomCombobox.qml
-FlatStyledDropdownDelegate 1.0 FlatStyledDropdownDelegate.qml
diff --git a/src/qtdevicesettings/settingscomponents/settingscomponents.pro b/src/qtdevicesettings/settingscomponents/settingscomponents.pro
deleted file mode 100644
index 9d2567e..0000000
--- a/src/qtdevicesettings/settingscomponents/settingscomponents.pro
+++ /dev/null
@@ -1,26 +0,0 @@
-TEMPLATE = lib
-CONFIG += plugin
-QT += qml
-
-uri = com.theqtcompany.settings.common
-
-DESTDIR = imports/Settings
-TARGET = qmlsettingsplugin
-
-pluginfiles.files += \
- imports/Settings/qmldir \
- imports/Settings/TextLabel.qml \
- imports/Settings/IconButton.qml \
- imports/Settings/CustomCombobox.qml \
- imports/Settings/FlatStyledDropdownDelegate.qml
-
-installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
-
-target.path = $$installPath
-pluginfiles.path += $$installPath
-INSTALLS += target pluginfiles
-
-RESOURCES +=
-
-DISTFILES +=
-
diff --git a/src/qtdevicesettings/settingsui/deployment.pri b/src/qtdevicesettings/settingsui/deployment.pri
deleted file mode 100644
index 5441b63..0000000
--- a/src/qtdevicesettings/settingsui/deployment.pri
+++ /dev/null
@@ -1,27 +0,0 @@
-android-no-sdk {
- target.path = /data/user/qt
- export(target.path)
- INSTALLS += target
-} else:android {
- x86 {
- target.path = /libs/x86
- } else: armeabi-v7a {
- target.path = /libs/armeabi-v7a
- } else {
- target.path = /libs/armeabi
- }
- export(target.path)
- INSTALLS += target
-} else:unix {
- isEmpty(target.path) {
- qnx {
- target.path = /tmp/$${TARGET}/bin
- } else {
- target.path = /opt/$${TARGET}/bin
- }
- export(target.path)
- }
- INSTALLS += target
-}
-
-export(INSTALLS)
diff --git a/src/qtdevicesettings/settingsui/icons.qrc b/src/qtdevicesettings/settingsui/icons.qrc
deleted file mode 100644
index 8656aa4..0000000
--- a/src/qtdevicesettings/settingsui/icons.qrc
+++ /dev/null
@@ -1,12 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>../icons/Chevron-left_black_1x.png</file>
- <file>../icons/Power_black_1x.png</file>
- <file>../icons/Display_qt_6x.png</file>
- <file>../icons/Clock_qt_6x.png</file>
- <file>../icons/Flag_qt_6x.png</file>
- <file>../icons/World_qt_6x.png</file>
- <file>../icons/Audio_qt_6x.png</file>
- <file>../icons/Bluetooth_qt_6x.png</file>
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/settingsui/main.cpp b/src/qtdevicesettings/settingsui/main.cpp
deleted file mode 100644
index b345225..0000000
--- a/src/qtdevicesettings/settingsui/main.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the FOO module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QGuiApplication>
-#include <QQmlApplicationEngine>
-
-int main(int argc, char *argv[])
-{
- QGuiApplication app(argc, argv);
-
- QQmlApplicationEngine engine;
- engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
-
- return app.exec();
-}
diff --git a/src/qtdevicesettings/settingsui/main.qml b/src/qtdevicesettings/settingsui/main.qml
deleted file mode 100644
index 4c8080a..0000000
--- a/src/qtdevicesettings/settingsui/main.qml
+++ /dev/null
@@ -1,170 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the FOO module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-import QtQuick.Layouts 1.1
-import QtQuick.Controls 1.4
-import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import QtQuick.XmlListModel 2.0
-import com.theqtcompany.settings.common 1.0
-
-ApplicationWindow {
- id: root
- title: qsTr("Device settings")
- width: 800
- height: 600
- visible: true
- property var service
-
- SystemPalette { id: systemPalette; colorGroup: SystemPalette.Active }
-
- toolBar:ToolBar {
- id: titlebar
- property string title: ""
- implicitWidth: parent.width
- implicitHeight: Math.round(40 * Flat.FlatStyle.scaleFactor)
- Item {
- anchors.fill: parent
-
- ToolButton {
- iconSource: "../icons/Chevron-left_black_1x.png"
- text: ""
- visible: stackView.depth > 1
- height: parent.height
- width: parent.height
- onClicked: stackView.pop();
- }
- TextLabel {
- id: titleText
- font.pixelSize: Math.round(16 * Flat.FlatStyle.scaleFactor)
- anchors.fill: parent
- text: stackView.currentItem.title
- }
-
-
- ToolButton {
- iconSource: "../icons/Power_black_1x.png"
- text: ""
- visible: stackView.depth == 1
- height: parent.height
- width: parent.height
- anchors.right: parent.right
- onClicked: {
- menu.__xOffset = Math.round(-100 * Flat.FlatStyle.scaleFactor);
- menu.popup();
- }
- }
- }
- }
-
- Menu {
- id: menu
- title: ""
- enabled: false
-
- MenuItem {
- text: qsTr("Reboot")
- onTriggered: B2QtDevice.reboot()
- }
-
- MenuItem {
- text: qsTr("Shutdown")
- onTriggered: B2QtDevice.powerOff()
- }
- }
-
- StackView {
- id: stackView
- initialItem: mainView
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- anchors.right: parent.right
-
- Component {
- id: mainView
- Item {
- property string title: qsTr("Device Settings")
- XmlListModel {
- id: xmlModel
- source: "settingsview.xml"
- query: "/xml/settings/item"
- XmlRole { name: "title"; query: "title/string()"}
- XmlRole { name: "icon"; query: "icon/string()"}
- XmlRole { name: "plugin"; query: "plugin/string()"}
- XmlRole { name: "view"; query: "view/string()"}
- }
-
- GridView {
- id: grid
- anchors.fill: parent
- anchors.margins: Math.round(40 * Flat.FlatStyle.scaleFactor)
- cellHeight: Math.round(133 * Flat.FlatStyle.scaleFactor) + spacing
- cellWidth: Math.round(117 * Flat.FlatStyle.scaleFactor) + spacing
- property int spacing: Math.round(20 * Flat.FlatStyle.scaleFactor)
-
- model: xmlModel
- delegate:
- MouseArea {
- width: grid.cellWidth - grid.spacing
- height: grid.cellHeight - grid.spacing
-
- Rectangle {
- anchors.fill: parent
- color: "#d6d6d6"
- radius: 5
- visible: pressed
- }
-
- Column {
- anchors.fill: parent
- anchors.topMargin: Math.round(10 * Flat.FlatStyle.scaleFactor)
- Image {
- id: image
- source: icon
- anchors.horizontalCenter: parent.horizontalCenter
- }
-
- TextLabel {
- text: title
- anchors.horizontalCenter: parent.horizontalCenter
- font.pixelSize: Math.round(16 * Flat.FlatStyle.scaleFactor)
- }
- }
-
- onClicked: {
- var url = 'import ' + plugin + '; ' + view + ' {}';
- stackView.push({item: Qt.createQmlObject(url,stackView)});
- titlebar.title = title
- }
- }
- }
- }
- }
- }
-}
diff --git a/src/qtdevicesettings/settingsui/qml.qrc b/src/qtdevicesettings/settingsui/qml.qrc
deleted file mode 100644
index 7b1f07b..0000000
--- a/src/qtdevicesettings/settingsui/qml.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>main.qml</file>
- <file>settingsview.xml</file>
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/settingsui/settingsui.pro b/src/qtdevicesettings/settingsui/settingsui.pro
deleted file mode 100644
index 026d911..0000000
--- a/src/qtdevicesettings/settingsui/settingsui.pro
+++ /dev/null
@@ -1,17 +0,0 @@
-TEMPLATE = app
-
-QT += qml quick
-SOURCES += main.cpp
-
-RESOURCES += \
- qml.qrc \
- icons.qrc
-
-# Additional import path used to resolve QML modules in Qt Creator's code model
-QML_IMPORT_PATH =
-
-# Default rules for deployment.
-include(deployment.pri)
-
-DISTFILES += \
- settingsview.xml
diff --git a/src/qtdevicesettings/settingsui/settingsview.xml b/src/qtdevicesettings/settingsui/settingsview.xml
deleted file mode 100644
index b2cfc51..0000000
--- a/src/qtdevicesettings/settingsui/settingsview.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<xml>
- <settings>
- <item>
- <title>Network</title>
- <plugin>com.theqtcompany.settings.network 1.0</plugin>
- <view>NetworkSettings</view>
- <icon>../icons/World_qt_6x.png</icon>
- </item>
- <item>
- <title>Display</title>
- <plugin>com.theqtcompany.settings.general 1.0</plugin>
- <view>Display</view>
- <icon>../icons/Display_qt_6x.png</icon>
- </item>
- <item>
- <title>Audio</title>
- <plugin>com.theqtcompany.settings.general 1.0</plugin>
- <view>Sound</view>
- <icon>../icons/Audio_qt_6x.png</icon>
- </item>
- <item>
- <title>Date and Time</title>
- <plugin>com.theqtcompany.settings.timedate 1.0</plugin>
- <view>TimeDate</view>
- <icon>../icons/Clock_qt_6x.png</icon>
- </item>
- <item>
- <title>Language</title>
- <plugin>com.theqtcompany.settings.locale 1.0</plugin>
- <view>Language</view>
- <icon>../icons/Flag_qt_6x.png</icon>
- </item>
- <item>
- <title>Bluetooth</title>
- <plugin>com.theqtcompany.settings.bluetooth 1.0</plugin>
- <view>Bluetooth</view>
- <icon>../icons/Bluetooth_qt_6x.png</icon>
- </item>
- </settings>
-</xml>
diff --git a/src/qtdevicesettings/timedateplugin/AnalogClock.qml b/src/qtdevicesettings/timedateplugin/AnalogClock.qml
deleted file mode 100644
index 2b89401..0000000
--- a/src/qtdevicesettings/timedateplugin/AnalogClock.qml
+++ /dev/null
@@ -1,255 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-import com.theqtcompany.settings.common 1.0
-import com.theqtcompany.settings.timedate 1.0
-
-Item {
- property var currentTime: TimeManager.time
- property var newTime: new Date
- property bool editMode: false
-
- function showTime(time) {
- return time.getHours() + ":" + time.getMinutes()
- }
-
- onEditModeChanged: if (editMode) newTime = new Date
-
- Rectangle {
- border.color: "#bdbebf"
- border.width: 1
- color: "white"
- anchors.fill: parent
-
- Connections {
- target: TimeManager
- onTimeChanged : newTime.setSeconds(currentTime.getSeconds())
- onTimeZoneChanged : Date.timeZoneUpdated()
- }
-
- TextLabel {
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.topMargin: 10
- anchors.top: parent.top
- text: editMode ? newTime.toTimeString() : currentTime.toTimeString()
- }
-
- Rectangle {
- id: root
- anchors.fill: parent
- anchors.margins: Math.round(40 * Flat.FlatStyle.scaleFactor)
- color: "white"
- border.color: editMode ? "#d6d6d6" : "#5caa15"
- border.width: Math.round(root.width * 0.120)
- radius: parent.width / 2
- property int handOffset: Math.round(root.width * 0.040)
- antialiasing: true
-
- Rectangle {
- id: minutes
- x: root.height / 2 - width / 2
- y: root.height / 2 - height + root.handOffset
- color: editMode ? "#d6d6d6" : "#5caa15"
- width: Math.round(root.width * 0.080)
- height: Math.round(root.height / 2 * 0.65 + root.handOffset)
- antialiasing: true
- transform: Rotation {
- id: minuteRotation
- origin.x: Math.round(minutes.width / 2)
- origin.y: Math.round(minutes.height - root.handOffset)
- angle: currentTime.getMinutes() * 6
- Behavior on angle {
- SpringAnimation { spring: 2; damping: 0.2; modulus: 360 }
- }
- }
- }
-
- Rectangle {
- id: hours
- x: Math.round(root.height / 2 - width / 2)
- y: Math.round(root.height / 2 - height + root.handOffset)
- height: Math.round(root.height / 2 * 0.4 + root.handOffset)
- width: Math.round(root.width * 0.080)
- color: editMode ? "#d6d6d6" : "#80c342"
- antialiasing: true
- transform: Rotation {
- id: hourRotation
- origin.x: Math.round(hours.width / 2)
- origin.y: hours.height - root.handOffset;
- angle: (currentTime.getHours() * 30) + (currentTime.getMinutes() * 0.5)
- Behavior on angle {
- SpringAnimation { spring: 2; damping: 0.2; modulus: 360 }
- }
- }
- }
-
- Rectangle {
- id: seconds
- x: root.height / 2 - width / 2
- y: root.height / 2 - height + root.handOffset
- visible: !editMode
- color: "#46a2da"
- width: Math.round(root.width * 0.0128)
- height: Math.round(root.height / 2 * 0.74)
- radius: Math.round(width / 2)
- antialiasing: true
- transform: Rotation {
- id: secondRotation
- origin.x: Math.round(seconds.width / 2)
- origin.y: Math.round(seconds.height - root.handOffset)
- angle: currentTime.getSeconds() * 6
- Behavior on angle {
- SpringAnimation { spring: 2; damping: 0.2; modulus: 360 }
- }
- }
- }
-
- Component {
- id: editor
-
- Rectangle {
- id: rect
- property var angle: mouseArea.drag ? mouseArea.angle : defaultAngle
- property var defaultAngle: angleBinding
- x: Math.round(Math.cos((-90+ angle)*Math.PI/180) *
- (pos - root.handOffset - width /2 + radius) + root.width / 2 - width / 2)
- y: Math.round(Math.sin((-90+ angle)*Math.PI/180) *
- (pos - root.handOffset - width /2 + radius) + root.height / 2 - width / 2)
- color: "#5caa15"
- width: size
- radius: width / 2
- height: width
- antialiasing: true
-
- function calcAngle(mouse) {
- var mouseGlobal = mapToItem(root, mouse.x, mouse.y)
- var origin = root.width/2
- var angle = (90+Math.atan2((mouseGlobal.y-origin), (mouseGlobal.x-origin))*180/Math.PI)
- if (angle < 0)
- angle += 360;
- updateAngle(angle);
- return angle;
- }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- property int startX: 0
- property int startY: 0
- property bool drag: false
- property var angle: 0.0
- preventStealing: true
-
- onPressed: {
- var mouseGlobal = mapToItem(root, mouse.x, mouse.y);
- startX = mouseGlobal.x;
- startY = mouseGlobal.y;
- angle = calcAngle(mouse);
- drag = true;
- }
- onReleased: {
- drag = false;
- ready(angle)
- }
- onMouseXChanged: if (drag) angle = calcAngle(mouse)
- }
- }
- }
-
- Loader {
- property var angleBinding: (currentTime.getHours() * 30) + (currentTime.getMinutes() * 0.5)
- property int size: Math.round(root.width * 0.120)
- property int pos: hours.height
- property bool pm: false
- visible: editMode
-
- function updateAngle(angle) {
- var newHour = Math.floor(angle / 30);
- var preHour = newTime.getHours();
-
- if (preHour == 11 && newHour == 0) {
- newHour = 12;
- pm = true;
- }
- else if (preHour === 23 && newHour === 0) {
- pm = false;
- }
- else if (preHour == 0 && newHour === 11) {
- pm = true;
- }
- else if (preHour == 12 && newHour == 11) {
- pm = false;
- }
-
- if (pm == true) {
- newHour += 12;
- }
-
- newTime.setHours(newHour);
- }
-
- function ready(val) {
- var newhours = Math.round(val / 30);
- currentTime.setHours(newhours);
- TimeManager.time = currentTime;
- }
- sourceComponent: editor
- }
-
- Loader {
- property var angleBinding: currentTime.getMinutes() * 6
- property int size: Math.round(root.width * 0.120)
- property int pos: minutes.height
- visible: editMode
- sourceComponent: editor
-
- function updateAngle(angle) {
- var newMin = Math.round(angle / 6);
- var hours = newTime.getHours();
- newTime.setMinutes(newMin);
- newTime.setHours(hours);
- }
-
- function ready(val) {
- var newmins = Math.round(val / 6);
- currentTime.setMinutes(newmins);
- TimeManager.time = currentTime;
- }
- }
- }
- }
-}
-
diff --git a/src/qtdevicesettings/timedateplugin/TimeDate.qml b/src/qtdevicesettings/timedateplugin/TimeDate.qml
deleted file mode 100644
index 6731805..0000000
--- a/src/qtdevicesettings/timedateplugin/TimeDate.qml
+++ /dev/null
@@ -1,167 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-import QtQuick.Layouts 1.1
-import QtQuick.Controls 1.4
-import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
-import com.theqtcompany.settings.timedate 1.0
-
-Item {
- id: root
- property string title: qsTr("Time and Date settings")
-
- Flickable {
- anchors.fill: parent
- anchors.margins: Math.round(40 * Flat.FlatStyle.scaleFactor)
- anchors.bottomMargin: Math.round(20 * Flat.FlatStyle.scaleFactor)
- contentHeight: content.height
- contentWidth: width
-
- Column {
- id: content
- width: parent.width
-
- GroupBox {
- width: parent.width
- title: qsTr("Time Settings")
- Layout.fillWidth: true
-
- ColumnLayout {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- width: parent.width
- Layout.fillWidth: true
-
- ExclusiveGroup { id: exgroup }
-
- RadioButton {
- id: automatic
- text: qsTr("Automatic time set")
- exclusiveGroup: exgroup
- checked: TimeManager.ntp
- onCheckedChanged: if (checked) calloader.reload();
- }
- RadioButton {
- id: custom
- text: qsTr("Manual")
- exclusiveGroup: exgroup
- checked: !TimeManager.ntp
- onCheckedChanged: TimeManager.ntp = !checked
- }
- RowLayout {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- Layout.fillWidth: true
-
- Component {
- id: calendar
-
- Item {
- width: cal.width
- height: cal.height
-
- Timer {
- id: timer
- }
- function delay(delayTime, cb) {
- timer.interval = delayTime;
- timer.repeat = false;
- timer.triggered.connect(cb);
- timer.start();
- }
-
- Calendar {
- id: cal
- weekNumbersVisible: false
- enabled: !automatic.checked
- onClicked: {
- var currentTime = TimeManager.time;
- var newDate = date;
- newDate.setHours(currentTime.getHours());
- newDate.setMinutes(currentTime.getMinutes());
- newDate.setSeconds(currentTime.getSeconds());
- TimeManager.time = newDate;
- delay(100, function() {
- calloader.reload();
- });
- }
- }
- }
- }
-
- Loader {
- id: calloader
- sourceComponent: calendar
- function reload() {
- calloader.sourceComponent = undefined;
- calloader.sourceComponent = calendar;
- }
- }
-
- AnalogClock {
- id: clock
- width: calloader.width
- height: width
- editMode: !automatic.checked
- }
- }
-
- Component {
- id: zoneselect
- TimezonesView { }
- }
-
- GroupBox {
- title: qsTr("Timezone Settings")
- Layout.fillWidth: true
- width: parent.width
- visible: true
- flat: true
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- TextLabel {
- text: TimeManager.timeZone
- }
- Button {
- text: "Change"
- onClicked : stackView.push(zoneselect)
- }
- }
- }
- }
- }
- }
- }
-}
diff --git a/src/qtdevicesettings/timedateplugin/TimezonesView.qml b/src/qtdevicesettings/timedateplugin/TimezonesView.qml
deleted file mode 100644
index 458d611..0000000
--- a/src/qtdevicesettings/timedateplugin/TimezonesView.qml
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-import QtQuick.Layouts 1.1
-import QtQuick.Controls 1.4
-import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
-import com.theqtcompany.settings.timedate 1.0
-
-
-Item {
- id: root
- Component.onCompleted: timezone.text = TimezonesFilter.filter
-
- Column {
- id: content
- anchors.fill: parent
- anchors.margins: Math.round(20 * Flat.FlatStyle.scaleFactor)
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
-
- TextLabel {
- text: qsTr("Search area: ")
- }
-
- TextField {
- id: timezone
- text: ""
- onTextChanged: TimezonesFilter.filter = timezone.text
- }
- }
-
- TableView {
- width: parent.width
- height: Math.round(parent.height - 40 * Flat.FlatStyle.scaleFactor)
- Layout.fillWidth: true
- model: TimezonesFilter
- headerVisible: true
-
- TableViewColumn {
- role: "name"
- title: qsTr("Timezone")
- width: Math.round(parent.width * 0.66)
- }
- TableViewColumn {
- role: "country"
- title: qsTr("Country")
- width: Math.round(parent.width * 0.33)
- }
-
- onClicked: {
- var val = model.itemFromRow(row);
- if (val !== "") {
- TimeManager.timeZone = val;
- stackView.pop();
- }
- }
- }
- }
-}
diff --git a/src/qtdevicesettings/timedateplugin/icons.qrc b/src/qtdevicesettings/timedateplugin/icons.qrc
deleted file mode 100644
index af8a564..0000000
--- a/src/qtdevicesettings/timedateplugin/icons.qrc
+++ /dev/null
@@ -1,4 +0,0 @@
-<RCC>
- <qresource prefix="/">
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/timedateplugin/plugin.cpp b/src/qtdevicesettings/timedateplugin/plugin.cpp
deleted file mode 100644
index 3fa4939..0000000
--- a/src/qtdevicesettings/timedateplugin/plugin.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtQml/QQmlExtensionPlugin>
-#include <QtQml/qqml.h>
-#include <qcoreapplication.h>
-#include <QQmlEngine>
-#include <QQmlContext>
-
-#include "systemtime.h"
-#include "timezonemodel.h"
-#include "timezonefiltermodel.h"
-
-template <typename T>
-QObject *instance(QQmlEngine *engine, QJSEngine *) {
- T *t = new T(engine);
- t->setObjectName(T::staticMetaObject.className());
- return t;
-}
-
-class TimeDateSettingsQmlPlugin : public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
-
-public:
- void registerTypes(const char *uri)
- {
- const QString prefix = "qrc:";
- qmlRegisterSingletonType<SystemTime>(uri, 1, 0, "TimeManager", &instance<SystemTime>);
- }
-
- void initializeEngine(QQmlEngine * engine, const char * uri)
- {
- Q_ASSERT(QLatin1String(uri) == QLatin1String("com.theqtcompany.settings.timedate"));
- TimezoneModel* timezoneModel = new TimezoneModel(engine);
- TimezoneFilterModel* filter = new TimezoneFilterModel(engine);
- filter->setSourceModel(timezoneModel);
-
- engine->rootContext()->setContextProperty("Timezones", timezoneModel);
- engine->rootContext()->setContextProperty("TimezonesFilter", filter);
- }
-};
-
-#include "plugin.moc"
diff --git a/src/qtdevicesettings/timedateplugin/qml.qrc b/src/qtdevicesettings/timedateplugin/qml.qrc
deleted file mode 100644
index e04454d..0000000
--- a/src/qtdevicesettings/timedateplugin/qml.qrc
+++ /dev/null
@@ -1,7 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>TimeDate.qml</file>
- <file>AnalogClock.qml</file>
- <file>TimezonesView.qml</file>
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/timedateplugin/qmldir b/src/qtdevicesettings/timedateplugin/qmldir
deleted file mode 100644
index 2d7a8a6..0000000
--- a/src/qtdevicesettings/timedateplugin/qmldir
+++ /dev/null
@@ -1,3 +0,0 @@
-module com.theqtcompany.settings.timedate
-TimeDate 1.0 TimeDate.qml
-plugin qmltimedatesettingsplugin
diff --git a/src/qtdevicesettings/timedateplugin/systemtime.cpp b/src/qtdevicesettings/timedateplugin/systemtime.cpp
deleted file mode 100644
index c84b036..0000000
--- a/src/qtdevicesettings/timedateplugin/systemtime.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "systemtime.h"
-#include "systemtime_p.h"
-
-SystemTime::SystemTime(QObject *parent) :
- QObject(parent)
- ,d_ptr(new SystemTimePrivate(this))
-{
- QTimer *secTimer = new QTimer(this);
- connect(secTimer, &QTimer::timeout, this, &SystemTime::timeChanged);
- secTimer->setInterval(1001);
- secTimer->setSingleShot(false);
- secTimer->start();
-}
-
-bool SystemTime::ntp() const
-{
- const Q_D(SystemTime);
- return d->ntp();
-}
-
-void SystemTime::setNtp(const bool aNtp)
-{
- Q_D(SystemTime);
- d->setNtp(aNtp);
-}
-
-void SystemTime::setTime(const QDateTime& aTime)
-{
- Q_D(SystemTime);
- d->setTime(aTime.toMSecsSinceEpoch()*1000);
- emit timeChanged();
-}
-
-QString SystemTime::timeZone() const
-{
- Q_D(const SystemTime);
- return d->timeZone();
-}
-
-void SystemTime::setTimeZone(const QString& aTimeZone)
-{
- Q_D(SystemTime);
- d->setTimeZone(aTimeZone);
- emit timeZoneChanged();
-}
-
-QDateTime SystemTime::time() const
-{
- return QDateTime::currentDateTime();
-}
diff --git a/src/qtdevicesettings/timedateplugin/systemtime.h b/src/qtdevicesettings/timedateplugin/systemtime.h
deleted file mode 100644
index 092712c..0000000
--- a/src/qtdevicesettings/timedateplugin/systemtime.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef SYSTEMTIME_H
-#define SYSTEMTIME_H
-
-#include <QObject>
-#include <QTime>
-
-class SystemTimePrivate;
-
-class SystemTime : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString timeZone READ timeZone WRITE setTimeZone NOTIFY timeZoneChanged)
- Q_PROPERTY(bool ntp READ ntp WRITE setNtp NOTIFY ntpChanged)
- Q_PROPERTY(QDateTime time READ time WRITE setTime NOTIFY timeChanged)
-public:
- explicit SystemTime(QObject *parent = 0);
- bool ntp() const;
- void setNtp(const bool aNtp);
- void setTime(const QDateTime& aTime);
- QString timeZone() const;
- QDateTime time() const;
- void setTimeZone(const QString& aTimeZone);
-
-signals:
- void timeZoneChanged();
- void ntpChanged();
- void timeChanged();
-
-public slots:
-
-protected:
- SystemTimePrivate *d_ptr;
-
- Q_DISABLE_COPY(SystemTime)
- Q_DECLARE_PRIVATE(SystemTime)
-};
-
-#endif // SYSTEMTIME_H
diff --git a/src/qtdevicesettings/timedateplugin/systemtime_p.h b/src/qtdevicesettings/timedateplugin/systemtime_p.h
deleted file mode 100644
index 5ee6eef..0000000
--- a/src/qtdevicesettings/timedateplugin/systemtime_p.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef SYSTEMTIME_P_H
-#define SYSTEMTIME_P_H
-
-#include "systemtime.h"
-#include "timedated_interface.h"
-
-class SystemTimePrivate
-{
- Q_DECLARE_PUBLIC(SystemTime)
-public:
- SystemTimePrivate(SystemTime *qq)
- :q_ptr(qq)
- {
- m_timeInterface = new OrgFreedesktopTimedate1Interface(QStringLiteral("org.freedesktop.timedate1"),
- QStringLiteral("/org/freedesktop/timedate1"),
- QDBusConnection::systemBus(), qq);
-
- }
-
- bool ntp() const {
- if (m_timeInterface)
- return m_timeInterface->nTP();
- return false;
- }
-
- void setNtp(bool val) {
- if (m_timeInterface)
- m_timeInterface->SetNTP(val, true);
- }
-
- QString timeZone() const {
- if (m_timeInterface)
- return m_timeInterface->timezone();
- return "";
- }
-
- void setTimeZone(const QString& aTimeZone) {
- if (m_timeInterface)
- m_timeInterface->SetTimezone(aTimeZone, true);
- }
-
- void setTime(qlonglong usecsSinceEpoch) {
- if (m_timeInterface)
- m_timeInterface->SetTime(usecsSinceEpoch, false, true);
- }
-
-private:
- OrgFreedesktopTimedate1Interface *m_timeInterface;
- SystemTime *q_ptr;
-};
-
-
-#endif // SYSTEMTIME_P_H
diff --git a/src/qtdevicesettings/timedateplugin/timedated.xml b/src/qtdevicesettings/timedateplugin/timedated.xml
deleted file mode 100644
index 95bafb8..0000000
--- a/src/qtdevicesettings/timedateplugin/timedated.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<node name="/Service" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
-<node>
- <interface name="org.freedesktop.timedate1">
- <property name="Timezone" type="s" access="read"/>
- <property name="LocalRTC" type="b" access="read"/>
- <property name="CanNTP" type="b" access="read"/>
- <property name="NTP" type="b" access="read"/>
- <method name="SetTime">
- <arg name="usec_utc" type="x" direction="in"/>
- <arg name="relative" type="b" direction="in"/>
- <arg name="user_interaction" type="b" direction="in"/>
- </method>
- <method name="SetTimezone">
- <arg name="timezone" type="s" direction="in"/>
- <arg name="user_interaction" type="b" direction="in"/>
- </method>
- <method name="SetLocalRTC">
- <arg name="local_rtc" type="b" direction="in"/>
- <arg name="fix_system" type="b" direction="in"/>
- <arg name="user_interaction" type="b" direction="in"/>
- </method>
- <method name="SetNTP">
- <arg name="use_ntp" type="b" direction="in"/>
- <arg name="user_interaction" type="b" direction="in"/>
- </method>
- </interface>
-</node>
-
-
diff --git a/src/qtdevicesettings/timedateplugin/timedateplugin.pro b/src/qtdevicesettings/timedateplugin/timedateplugin.pro
deleted file mode 100644
index d82529d..0000000
--- a/src/qtdevicesettings/timedateplugin/timedateplugin.pro
+++ /dev/null
@@ -1,42 +0,0 @@
-TEMPLATE = lib
-CONFIG += plugin
-QT += qml dbus
-
-uri = com.theqtcompany.settings.timedate
-
-DBUS_INTERFACES = timedated.xml
-
-DESTDIR = imports/TimeDate
-TARGET = qmltimedatesettingsplugin
-
-SOURCES += plugin.cpp \
- systemtime.cpp \
- timezonemodel.cpp \
- timezonefiltermodel.cpp
-
-pluginfiles.files += \
- qmldir
-
-
-pluginfiles.files += \
- AnalogClock.qml \
- TimeDate.qml \
- TimezonesView.qml \
-
-installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
-
-target.path = $$installPath
-pluginfiles.path += $$installPath
-INSTALLS += target pluginfiles
-
-
-RESOURCES += \
- icons.qrc
-
-HEADERS += \
- systemtime.h \
- systemtime_p.h \
- timezonemodel.h \
- timezonefiltermodel.h
-
-
diff --git a/src/qtdevicesettings/timedateplugin/timezonefiltermodel.cpp b/src/qtdevicesettings/timedateplugin/timezonefiltermodel.cpp
deleted file mode 100644
index 3d1c0a4..0000000
--- a/src/qtdevicesettings/timedateplugin/timezonefiltermodel.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "timezonemodel.h"
-#include "timezonefiltermodel.h"
-
-TimezoneFilterModel::TimezoneFilterModel(QObject* parent)
- :QSortFilterProxyModel(parent)
-{
- connect(this, &TimezoneFilterModel::filterChanged, this, &TimezoneFilterModel::invalidate);
-}
-
-TimezoneFilterModel::~TimezoneFilterModel()
-{
-
-}
-
-QString TimezoneFilterModel::filter() const
-{
- return m_filter;
-}
-
-void TimezoneFilterModel::setFilter(const QString& aFilter)
-{
- m_filter = aFilter;
- emit filterChanged();
-}
-
-bool TimezoneFilterModel::filterAcceptsRow( int source_row, const QModelIndex& source_parent ) const
-{
- bool ret = false;
- if (this->sourceModel())
- {
- QModelIndex index = this->sourceModel()->index( source_row, 0, source_parent );
- if (index.isValid())
- {
- QVariant nameRole = index.data(TimezoneModel::Name);
- if (nameRole.isValid())
- {
- QString name = nameRole.toString();
- if (name.contains(m_filter, Qt::CaseInsensitive)) {
- ret = true;
- }
- }
- QVariant countryRole = index.data(TimezoneModel::Country);
- if (ret == false && countryRole.isValid())
- {
- QString country = countryRole.toString();
- if (country.contains(m_filter, Qt::CaseInsensitive)) {
- ret = true;
- }
- }
- }
- }
- return ret;
-}
-
-QVariant TimezoneFilterModel::itemFromRow(const int row) const
-{
- QModelIndex idx = index(row, 0);
- QModelIndex mapped = mapToSource(idx);
- if (mapped.isValid())
- {
- QVariant nameRole = mapped.data(TimezoneModel::Name);
- if (nameRole.isValid())
- {
- return nameRole;
- }
- }
- return QVariant::fromValue(QString(""));
-}
-
diff --git a/src/qtdevicesettings/timedateplugin/timezonefiltermodel.h b/src/qtdevicesettings/timedateplugin/timezonefiltermodel.h
deleted file mode 100644
index dd9009f..0000000
--- a/src/qtdevicesettings/timedateplugin/timezonefiltermodel.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef TIMEZONEFILTERMODEL_H
-#define TIMEZONEFILTERMODEL_H
-
-#include <QSortFilterProxyModel>
-
-class TimezoneFilterModel : public QSortFilterProxyModel
-{
- Q_OBJECT
- Q_PROPERTY(QString filter READ filter WRITE setFilter NOTIFY filterChanged)
-public:
- explicit TimezoneFilterModel(QObject* parent);
- virtual ~TimezoneFilterModel();
- bool filterAcceptsRow( int source_row, const QModelIndex& source_parent ) const override;
- QString filter() const;
- void setFilter(const QString& aFilter);
- Q_INVOKABLE QVariant itemFromRow(const int row) const;
-signals:
- void filterChanged();
-private:
- QString m_filter;
-
-};
-
-#endif // TIMEZONEFILTERMODEL_H
diff --git a/src/qtdevicesettings/timedateplugin/timezonemodel.cpp b/src/qtdevicesettings/timedateplugin/timezonemodel.cpp
deleted file mode 100644
index b6cf27b..0000000
--- a/src/qtdevicesettings/timedateplugin/timezonemodel.cpp
+++ /dev/null
@@ -1,140 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QLocale>
-#include <QQmlPropertyMap>
-#include <QFuture>
-#include <QThread>
-#include <QtConcurrent/QtConcurrentRun>
-#include "timezonemodel.h"
-
-TimezoneItem::TimezoneItem(const QByteArray& id, QObject *parent)
- :QObject(parent)
-{
- QTimeZone tz = QTimeZone(id);
- m_name = tz.displayName(QTimeZone::StandardTime);
- m_country = QLocale::countryToString(tz.country());
- m_id = id;
-}
-
-QString TimezoneItem::name() const
-{
- return m_name;
-}
-
-QString TimezoneItem::country() const
-{
- return m_country;
-}
-
-QString TimezoneItem::id() const
-{
- return m_id;
-}
-
-TimezoneModel::TimezoneModel(QObject *parent)
- : QAbstractListModel(parent)
-{
- m_roleNames.insert(Qt::UserRole, "modelData");
- m_roleNames.insert(Country, "country");
- m_roleNames.insert(Name, "name");
- m_roleNames.insert(Id, "id");
-
- QFuture<void> t1 = QtConcurrent::run(TimezoneModel::generateModel, this);
-}
-
-void TimezoneModel::generateModel(TimezoneModel* model)
-{
- QList<QByteArray> ids = QTimeZone::availableTimeZoneIds();
- foreach (QByteArray id, ids) {
- TimezoneItem *zone = new TimezoneItem(id);
- zone->moveToThread(model->thread());
- QMetaObject::invokeMethod(model, "addNewItem", Q_ARG( QObject*, qobject_cast<QObject*>(zone)));
- }
-}
-
-void TimezoneModel::addNewItem(QObject* item)
-{
- beginInsertRows(QModelIndex(), m_items.count(), m_items.count());
- TimezoneItem* newItem = qobject_cast<TimezoneItem*>(item);
- if (newItem)
- m_items.append(newItem);
- endInsertRows();
-}
-
-TimezoneModel::~TimezoneModel()
-{
- qDeleteAll(m_items);
-}
-
-QHash<int, QByteArray> TimezoneModel::roleNames() const
-{
- return m_roleNames;
-}
-
-
-int TimezoneModel::rowCount(const QModelIndex & parent) const
-{
- Q_UNUSED(parent);
- return m_items.count();
-}
-
-QVariant TimezoneModel::data(const QModelIndex & index, int role) const
-{
- if (!index.isValid()) return QVariant();
-
- TimezoneItem *item = m_items[index.row()];
- if (role == Qt::UserRole) {
- return item->id();
- }
-
- switch (role) {
- case Name:
- return item->id();
- break;
- case Country:
- return item->country();
- break;
- case Id:
- return item->id();
- break;
- case Qt::DisplayRole:
- return item->id();
- break;
- default:
- return "";
- }
-}
diff --git a/src/qtdevicesettings/timedateplugin/timezonemodel.h b/src/qtdevicesettings/timedateplugin/timezonemodel.h
deleted file mode 100644
index af86c75..0000000
--- a/src/qtdevicesettings/timedateplugin/timezonemodel.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef TIMEZONEMODEL_H
-#define TIMEZONEMODEL_H
-
-#include <QObject>
-#include <QAbstractListModel>
-#include <QTimeZone>
-#include <QMutex>
-
-class TimezoneItem : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QString id READ id CONSTANT)
-public:
- explicit TimezoneItem(const QByteArray& id, QObject *parent=0);
- QString name() const;
- QString country() const;
- QString id() const;
-
-private:
- QString m_name;
- QString m_country;
- QString m_id;
-};
-
-class TimezoneModel : public QAbstractListModel
-{
- Q_OBJECT
-
-public:
- explicit TimezoneModel(QObject *parent=0);
- virtual ~TimezoneModel();
- // from QAbstractItemModel
- int rowCount(const QModelIndex & parent = QModelIndex()) const;
- QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
- QHash<int, QByteArray> roleNames() const;
- Q_INVOKABLE QVariant itemFromRow(const int row) const;
-
- enum Roles {
- Name = Qt::UserRole + 1,
- Country,
- Id
- };
-
- static void generateModel(TimezoneModel* model);
-
-private slots:
- void addNewItem(QObject* item);
-
-private:
- QList<TimezoneItem*> m_items;
- QHash<int, QByteArray> m_roleNames;
-};
-
-#endif // TIMEZONEMODEL_H
diff --git a/src/qtdevicesettings/wifisettingsplugin/WifiManagerView.qml b/src/qtdevicesettings/wifisettingsplugin/WifiManagerView.qml
deleted file mode 100644
index 71115d5..0000000
--- a/src/qtdevicesettings/wifisettingsplugin/WifiManagerView.qml
+++ /dev/null
@@ -1,180 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-import QtQuick.Layouts 1.1
-import QtQuick.Controls 1.4
-import QtQuick.Controls.Styles.Flat 1.0 as Flat
-import com.theqtcompany.settings.common 1.0
-import com.theqtcompany.settings.wifi 1.0
-import B2Qt.Wifi 1.0
-
-Item {
- id: root
- Component.onCompleted: {
- if (WifiManager.backendState === WifiManager.NotRunning) {
- WifiManager.start();
- }
- else if (WifiManager.backendState == WifiManager.Running) {
- WifiManager.scanning = true;
- }
- }
-
- WifiConfiguration {
- id: config
- property bool connected: WifiManager.networkState === WifiManager.Connected
- }
-
- ColumnLayout {
- id: content
- anchors.fill: parent
-
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
-
- TextLabel {
- text: qsTr("Selected network ")
- width: root.width*0.382
- horizontalAlignment: Text.AlignRight
- }
-
- CustomCombobox {
- id: networkSelection
- model: WifiManager.networks
- width: Math.round(200 * Flat.FlatStyle.scaleFactor)
- textRole: "ssid"
- Component.onCompleted: {
- setSelectIndexToVal(WifiManager.currentSSID, "ssid");
- }
- onSelectedIndexChanged : {
- var ssid = networkSelection.textValue;
- config.ssid = ssid;
- if (WifiManager.currentSSID !== ssid || !config.connected) {
- connectView.visible = true;
- }
- }
- delegate: WifiSelectorDelegate { }
- }
-
- Image {
- id: warning
- anchors.verticalCenter: parent.verticalCenter
- source: "../icons/Alert_yellow_1x.png"
- visible: WifiManager.state === WifiManager.HandshakeFailed ||
- WifiManager.state === WifiManager.DhcpRequestFailed
- }
- }
-
- Button {
- id: disconnect
- text: qsTr("Disconnect")
- visible: config.connected
- onClicked: {
- WifiManager.disconnect();
- networkSelection.currentIndex = -1;
- }
- }
-
- GroupBox {
- id: connectView
- title: qsTr("Enter a password")
- flat: false
- visible: false
- ColumnLayout {
- Row {
- id: errorView
- property alias text: text.text
- visible: text.text !== ""
-
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- Image {
- source: "../icons/Alert_yellow_1x.png"
- }
- Text {
- id: text
- color: "#face20"
- text: ""
- }
- }
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- visible: false
- TextLabel {
- text: qsTr("User name")
- width: root.width*0.382
- horizontalAlignment: Text.AlignRight
- }
- TextField {
- text: ""
- inputMethodHints: Qt.ImhNoPredictiveText
- }
- }
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- TextLabel {
- text: qsTr("Password")
- horizontalAlignment: Text.AlignRight
- }
- TextField {
- id: password
- text: ""
- echoMode: TextInput.Password
- inputMethodHints: Qt.ImhNoPredictiveText
- }
- }
- Row {
- spacing: Math.round(10 * Flat.FlatStyle.scaleFactor)
- Button {
- text: qsTr("Connect")
- onClicked: {
- config.passphrase = password.text
- if (!WifiManager.connect(config)) {
- print("failed to connect: " + WifiManager.lastError)
- errorView.text = qsTr("Invalid password");
- }
- else {
- connectView.visible = false
- }
- }
- }
- Button {
- text: qsTr("Cancel")
- onClicked:connectView.visible = false
- }
- }
- }
- }
- }
-}
diff --git a/src/qtdevicesettings/wifisettingsplugin/WifiSelectorDelegate.qml b/src/qtdevicesettings/wifisettingsplugin/WifiSelectorDelegate.qml
deleted file mode 100644
index cea3750..0000000
--- a/src/qtdevicesettings/wifisettingsplugin/WifiSelectorDelegate.qml
+++ /dev/null
@@ -1,87 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-import QtQuick.Layouts 1.1
-import QtQuick.Controls 1.4
-import com.theqtcompany.settings.common 1.0
-import com.theqtcompany.settings.wifi 1.0
-
-Item {
- id: root
- property bool checkable: true
- property bool checked: false
- property bool pressed: false
- signal clicked()
-
- MouseArea {
- id: delegateButton
- anchors.fill: parent
- hoverEnabled: true
- onPressed: root.pressed = true
- onClicked: root.clicked()
- onEntered: checked = !checked
-
- Rectangle {
- anchors.fill: parent
- color: root.checked ? Flat.FlatStyle.disabledColor : "transparent"
- opacity: root.checked ? 0.15 : 1.0
- }
- Rectangle {
- color: Flat.FlatStyle.darkFrameColor
- width: parent.width
- height: Flat.FlatStyle.onePixel
- anchors.bottom: parent.bottom
- }
- TextLabel {
- id: text
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- anchors.margins: Math.round(10 * Flat.FlatStyle.scaleFactor)
- horizontalAlignment: Text.AlignLeft
- text: modelData["ssid"]
- }
- WifiSignalMonitor {
- anchors.verticalCenter: parent.verticalCenter
- anchors.right: parent.right
- anchors.margins: Math.round(10 * Flat.FlatStyle.scaleFactor)
- height: Math.round(parent.height * .8)
- width: height
- signalStrength: modelData["signalStrength"]
- }
- }
-}
diff --git a/src/qtdevicesettings/wifisettingsplugin/WifiSignalMonitor.qml b/src/qtdevicesettings/wifisettingsplugin/WifiSignalMonitor.qml
deleted file mode 100644
index e3ab0c8..0000000
--- a/src/qtdevicesettings/wifisettingsplugin/WifiSignalMonitor.qml
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.5
-
-Item {
- id: root
-
- property bool scanning: false
- property int signalStrength: 100
- property bool connected: false
-
- onSignalStrengthChanged: {
- sprite.visible = true;
-
- if (signalStrength < 10) {
- sprite.visible = false;
- }
- else if (signalStrength < 30) {
- sprite.currentFrame = 0;
- }
- else if (signalStrength < 60) {
- sprite.currentFrame = 1;
- }
- else if (signalStrength < 80) {
- sprite.currentFrame = 2;
- }
- else if (signalStrength <= 100) {
- sprite.currentFrame = 3;
- }
- }
-
- Image {
- anchors.fill: parent
- source: "../icons/Wifi_lightgray_2x.png"
- }
-
- AnimatedSprite {
- id: sprite
- anchors.fill: parent
- source: connected ? "../icons/WifiAnim_qt_2x.png" : "../icons/WifiAnim_black_2x.png"
- frameDuration: 500
- frameCount: 4
- currentFrame: 3
- frameSync: false
- frameWidth: 32
- frameHeight: 32
- loops: 40
- running: scanning
- }
-}
diff --git a/src/qtdevicesettings/wifisettingsplugin/icons.qrc b/src/qtdevicesettings/wifisettingsplugin/icons.qrc
deleted file mode 100644
index ac67804..0000000
--- a/src/qtdevicesettings/wifisettingsplugin/icons.qrc
+++ /dev/null
@@ -1,7 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>../icons/Wifi_lightgray_2x.png</file>
- <file>../icons/WifiAnim_black_2x.png</file>
- <file>../icons/Alert_yellow_1x.png</file>
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/wifisettingsplugin/plugin.cpp b/src/qtdevicesettings/wifisettingsplugin/plugin.cpp
deleted file mode 100644
index c87f68a..0000000
--- a/src/qtdevicesettings/wifisettingsplugin/plugin.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Device Utilities module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtQml/QQmlExtensionPlugin>
-#include <QtQml/qqml.h>
-#include <qcoreapplication.h>
-
-class WifiSettingsQmlPlugin : public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
-
-public:
- void registerTypes(const char *uri)
- {
- Q_ASSERT(QLatin1String(uri) == QLatin1String("com.theqtcompany.settings.wifi"));
- const QString prefix = "qrc:";
- qmlRegisterType(QUrl(prefix + "WifiManagerView.qml"), uri, 1, 0, "WifiManagerView");
- qmlRegisterType(QUrl(prefix + "WifiSignalMonitor.qml"), uri, 1, 0, "WifiSignalMonitor");
- qmlRegisterType(QUrl(prefix + "WifiSelectorDelegate.qml"), uri, 1, 0, "WifiSelectorDelegate");
-
- }
-};
-
-#include "plugin.moc"
diff --git a/src/qtdevicesettings/wifisettingsplugin/qml.qrc b/src/qtdevicesettings/wifisettingsplugin/qml.qrc
deleted file mode 100644
index b43e801..0000000
--- a/src/qtdevicesettings/wifisettingsplugin/qml.qrc
+++ /dev/null
@@ -1,7 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>WifiManagerView.qml</file>
- <file>WifiSignalMonitor.qml</file>
- <file>WifiSelectorDelegate.qml</file>
- </qresource>
-</RCC>
diff --git a/src/qtdevicesettings/wifisettingsplugin/qmldir b/src/qtdevicesettings/wifisettingsplugin/qmldir
deleted file mode 100644
index d5c237e..0000000
--- a/src/qtdevicesettings/wifisettingsplugin/qmldir
+++ /dev/null
@@ -1,2 +0,0 @@
-module com.theqtcompany.settings.wifi
-plugin qmlwifiplugin
diff --git a/src/qtdevicesettings/wifisettingsplugin/wifisettingsplugin.pro b/src/qtdevicesettings/wifisettingsplugin/wifisettingsplugin.pro
deleted file mode 100644
index aa50429..0000000
--- a/src/qtdevicesettings/wifisettingsplugin/wifisettingsplugin.pro
+++ /dev/null
@@ -1,26 +0,0 @@
-TEMPLATE = lib
-CONFIG += plugin
-QT += qml
-
-uri = com.theqtcompany.settings.wifi
-
-DESTDIR = imports/Wifi
-TARGET = qmlwifiplugin
-
-SOURCES += plugin.cpp
-
-pluginfiles.files += \
- qmldir \
-
-installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
-
-target.path = $$installPath
-pluginfiles.path += $$installPath
-INSTALLS += target pluginfiles
-
-
-RESOURCES += \
- icons.qrc \
- qml.qrc
-
-HEADERS +=