diff options
author | Lassi Lehikoinen <lassi.lehikoinen@qt.io> | 2020-11-20 10:10:39 +0200 |
---|---|---|
committer | Lassi Lehikoinen <lassi.lehikoinen@qt.io> | 2020-12-16 11:49:13 +0200 |
commit | 1ace321e373ad19287c41cef9ae17fcfb7ab938d (patch) | |
tree | fcaaa1763fc94f77443cb134d9e0a50955f1ad36 /src/settingsui/bluetooth | |
parent | 764eb9529aa163302aac3fec70cdbb3b6589752b (diff) |
Remove all device utilities except network settings
Also remove USB ethernet functionality from Qt Network Settings.
Task-number: QTBUG-88315
Change-Id: I06c41b61854b57f57c264b3c98940333902222d2
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Diffstat (limited to 'src/settingsui/bluetooth')
-rw-r--r-- | src/settingsui/bluetooth/Bluetooth.qml | 110 | ||||
-rw-r--r-- | src/settingsui/bluetooth/Discovery.qml | 138 |
2 files changed, 0 insertions, 248 deletions
diff --git a/src/settingsui/bluetooth/Bluetooth.qml b/src/settingsui/bluetooth/Bluetooth.qml deleted file mode 100644 index d4cec78..0000000 --- a/src/settingsui/bluetooth/Bluetooth.qml +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Device Utilities 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.6 -import QtQuick.Layouts 1.3 -import QtQuick.Controls 2.0 -import QtDeviceUtilities.BluetoothSettings 1.0 -import "../common" - -Item { - id: root - - Row { - id: bluetoothRow - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - spacing: parent.width * 0.025 - - Text { - id: bluetoothSwitchText - anchors.verticalCenter: parent.verticalCenter - font.pixelSize: pluginMain.subTitleFontSize - font.family: appFont - color: "white" - text: qsTr("Bluetooth") - } - CustomSwitch { - anchors.verticalCenter: parent.verticalCenter - indicatorWidth: root.width * 0.15 - indicatorHeight: root.height * 0.06 - - enabled: BtDevice.available - checked: BtDevice.powered - onCheckedChanged: BtDevice.powered = checked - } - - Text { - id: scanningText - anchors.verticalCenter: parent.verticalCenter - verticalAlignment: Text.AlignVCenter - font.pixelSize: pluginMain.valueFontSize - color: "white" - text: "Scanning" - font.family: appFont - opacity: (BtDevice.scanning && BtDevice.powered) ? 1.0 : 0.0 - visible: opacity > 0 - Behavior on opacity { - NumberAnimation {duration: 150} - } - - Timer { - id: scanningTimer - interval: 1000 - repeat: true - running: BtDevice.scanning - - onTriggered: { - if (scanningText.text.indexOf("...") !== -1) - scanningText.text = "Scanning" - else - scanningText.text += "." - } - } - } - - Connections { - target: BtDevice - function onPoweredChanged() { - if (BtDevice.powered) - BtDevice.scanning = true - } - } - } - - Discovery { - id: discovery - anchors.top: bluetoothRow.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - anchors.bottomMargin: parent.height * 0.085 - visible: BtDevice.powered - } -} diff --git a/src/settingsui/bluetooth/Discovery.qml b/src/settingsui/bluetooth/Discovery.qml deleted file mode 100644 index 515d37a..0000000 --- a/src/settingsui/bluetooth/Discovery.qml +++ /dev/null @@ -1,138 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Device Utilities 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.6 -import QtQuick.Layouts 1.3 -import QtQuick.Controls 2.0 -import QtDeviceUtilities.BluetoothSettings 1.0 -import QtDeviceUtilities.QtButtonImageProvider 1.0 - -Item { - id: top - - ListView { - id: mainList - anchors.fill: parent - opacity: BtDevice.scanning ? .5 : 1.0 - interactive: !BtDevice.scanning - clip: true - model: BtDevice.deviceModel - - 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" - } - } - - delegate: Item { - id: btDelegate - width: parent.width - height: expanded || connected ? mainList.height * 0.175 + mainList.height * 0.05 : mainList.height * 0.175 - property bool expanded: false - MouseArea { - anchors.fill: parent - onClicked: { - if (!connected){ - btDelegate.expanded = !btDelegate.expanded - } - } - } - Image { - id: bticon - sourceSize.width: parent.width - sourceSize.height: parent.height - height: parent.height * 0.5 - width: height - anchors.left: parent.left - anchors.verticalCenter: parent.verticalCenter - source: mainList.getIcon(type) - } - Column { - anchors.left: bticon.right - anchors.leftMargin: parent.width * 0.025 - anchors.right: connectButton.left - anchors.verticalCenter: parent.verticalCenter - Label { - id: bttext - horizontalAlignment: Text.AlignLeft - verticalAlignment: Text.AlignVCenter - font.pixelSize: mainList.height * 0.06 - text: name - color: connected ? viewSettings.buttonGreenColor : "white" - font.family: appFont - font.styleName: connected ? "SemiBold" : "Regular" - } - Label { - id: details - height: btDelegate.height * 0.275 * opacity - opacity: btDelegate.expanded || connected ? 1 : 0.0 - visible: opacity > 0 - text: address - color: connected ? viewSettings.buttonGreenColor : "white" - font.family: appFont - Behavior on opacity { NumberAnimation { duration: 200} } - } - } - QtButton { - id: connectButton - height: mainList.height * 0.125 - anchors.right: parent.right - anchors.verticalCenter: parent.verticalCenter - opacity: (expanded || connected) && !BtDevice.scanning ? 1.0 : 0.0 - visible: opacity > 0 - fillColor: connected ? viewSettings.buttonGrayColor : viewSettings.buttonGreenColor - borderColor: "transparent" - text: connected ? qsTr("Disconnect") : qsTr("Connect") - onClicked : connected ? BtDevice.requestDisconnect(address) : BtDevice.requestPairing(address); - Behavior on opacity { NumberAnimation { duration: 200 } } - } - Behavior on height { NumberAnimation { duration: 200} } - - Rectangle { - id: delegateBottom - width: btDelegate.width - color: viewSettings.borderColor - height: 2 - anchors.bottom: btDelegate.bottom - anchors.horizontalCenter: btDelegate.horizontalCenter - } - } - focus: true - } -} |