summaryrefslogtreecommitdiffstats
path: root/src/settingsui
diff options
context:
space:
mode:
Diffstat (limited to 'src/settingsui')
-rw-r--r--src/settingsui/ViewSettings.qml1
-rw-r--r--src/settingsui/bluetooth/Bluetooth.qml110
-rw-r--r--src/settingsui/bluetooth/Discovery.qml138
-rw-r--r--src/settingsui/display/Display.qml193
-rw-r--r--src/settingsui/locale/Language.qml114
-rw-r--r--src/settingsui/locale/RegionSelect.qml158
-rw-r--r--src/settingsui/locale/TableKey.qml35
-rw-r--r--src/settingsui/locale/TableValue.qml35
-rw-r--r--src/settingsui/network/NetworkSettings.qml136
-rw-r--r--src/settingsui/power/Power.qml55
-rw-r--r--src/settingsui/settingsuiapp.qrc11
-rw-r--r--src/settingsui/settingsuiplugin/ShutdownPopup.qml108
-rw-r--r--src/settingsui/settingsuiplugin/icons.qrc5
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/bluetooth_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/date-time_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/display_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/language_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/power_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/pluginMain.qml17
-rw-r--r--src/settingsui/settingsuiplugin/settingsui.qrc21
-rw-r--r--src/settingsui/settingsuiplugin/settingsview.xml30
-rw-r--r--src/settingsui/timedate/AnalogClock.qml172
-rw-r--r--src/settingsui/timedate/ClockHand.qml70
-rw-r--r--src/settingsui/timedate/CustomCalendar.qml216
-rw-r--r--src/settingsui/timedate/CustomComboBox.qml98
-rw-r--r--src/settingsui/timedate/ManualTime.qml248
-rw-r--r--src/settingsui/timedate/TimeDate.qml162
-rw-r--r--src/settingsui/timedate/TimezonesView.qml72
28 files changed, 1 insertions, 2209 deletions
diff --git a/src/settingsui/ViewSettings.qml b/src/settingsui/ViewSettings.qml
index e9a1c74..9bbbc10 100644
--- a/src/settingsui/ViewSettings.qml
+++ b/src/settingsui/ViewSettings.qml
@@ -40,5 +40,4 @@ Item {
property string buttonGrayColor: "#9d9faa"
property string buttonActiveColor: "#216729"
property string scrollBarColor: "#41cd52"
- property bool usbEthernetSettingVisible: false
}
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
- }
-}
diff --git a/src/settingsui/display/Display.qml b/src/settingsui/display/Display.qml
deleted file mode 100644
index 97d05a2..0000000
--- a/src/settingsui/display/Display.qml
+++ /dev/null
@@ -1,193 +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.DisplaySettings 1.0
-import QtDeviceUtilities.QtButtonImageProvider 1.0
-
-Item {
- id: root
- anchors.fill: parent
-
- Column {
- spacing: pluginMain.spacing
- anchors.top: parent.top
-
- Text {
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: pluginMain.subTitleFontSize
- font.family: appFont
- text: qsTr("Brightness ") + (brightnessSlider.value / 255 * 100).toFixed(1) + "%"
- color: "white"
- height: pluginMain.fieldTextHeight
- }
-
- Slider {
- id: brightnessSlider
- width: root.width
- height: pluginMain.buttonHeight
- Layout.alignment: Qt.AlignVCenter
- Layout.fillWidth: true
- from: 0
- to: 255
- onValueChanged: DisplaySettings.setDisplayBrightness(value)
-
- background: Rectangle {
- id: sliderBackground
- x: brightnessSlider.leftPadding
- y: brightnessSlider.topPadding + brightnessSlider.availableHeight / 2 - height / 2
- implicitWidth: root.width
- implicitHeight: root.height * 0.01
- width: brightnessSlider.availableWidth
- height: implicitHeight
- radius: 2
- color: viewSettings.buttonGrayColor
- Rectangle {
- width: brightnessSlider.visualPosition * parent.width
- height: parent.height
- color: "white"
- radius: 2
- }
- }
- handle: Rectangle {
- x: brightnessSlider.leftPadding + brightnessSlider.visualPosition * (brightnessSlider.availableWidth - width)
- y: brightnessSlider.topPadding + brightnessSlider.availableHeight / 2 - height / 2
- height: sliderBackground.height * 7
- width: height
- radius: width * 0.5
- antialiasing: true
- color: viewSettings.buttonGreenColor
- }
-
- Component.onCompleted: brightnessSlider.value = DisplaySettings.displayBrightness
- }
-
- Text {
- verticalAlignment: Text.AlignVCenter
- height: pluginMain.fieldTextHeight
- font.pixelSize: pluginMain.subTitleFontSize
- font.family: appFont
- text: qsTr("Physical screen size in millimeters")
- Layout.preferredWidth: root.width * 0.3
- Layout.alignment: Qt.AlignVCenter
- wrapMode: Label.WordWrap
- color: "white"
- }
-
- Column {
- leftPadding: pluginMain.margin
- spacing: pluginMain.spacing
-
- Row {
- spacing: pluginMain.spacing
-
- Text {
- id: widthText
- height: pluginMain.buttonHeight
- text: qsTr("Width")
- color: "white"
- font.pixelSize: pluginMain.valueFontSize
- font.family: appFont
- verticalAlignment: Text.AlignVCenter
- }
- TextField {
- id: widthField
- leftPadding: pluginMain.margin
- rightPadding: pluginMain.margin
- bottomPadding: 6
- topPadding: 6
- height: pluginMain.buttonHeight
- width: root.width * 0.13
- color: "black"
- font.pixelSize: pluginMain.valueFontSize
- text: DisplaySettings.physicalScreenWidthMm
- horizontalAlignment: Text.AlignHCenter
- inputMethodHints: Qt.ImhDigitsOnly
- background: Rectangle {
- border.color: widthField.focus ? viewSettings.buttonGreenColor : "transparent"
- border.width: parent.width * 0.05
- }
- }
- Text {
- id: heightText
- height: pluginMain.buttonHeight
- text: qsTr("Height")
- color: "white"
- font.pixelSize: pluginMain.valueFontSize
- font.family: appFont
- verticalAlignment: Text.AlignVCenter
- }
- TextField {
- id: heightField
- leftPadding: pluginMain.margin
- rightPadding: pluginMain.margin
- bottomPadding: 6
- topPadding: 6
- width: widthField.width
- height: pluginMain.buttonHeight
- color: "black"
- font.pixelSize: pluginMain.valueFontSize
- text: DisplaySettings.physicalScreenHeightMm
- horizontalAlignment: Text.AlignHCenter
- inputMethodHints: Qt.ImhDigitsOnly
- background: Rectangle {
- border.color: heightField.focus ? viewSettings.buttonGreenColor : "transparent"
- border.width: parent.width * 0.05
- }
- }
- }
-
- Row {
- spacing: pluginMain.margin
-
- QtButton {
- id: setButton
- height: pluginMain.buttonHeight
- text: qsTr("SET")
- onClicked: {
- DisplaySettings.physicalScreenHeightMm = parseInt(heightField.text)
- DisplaySettings.physicalScreenWidthMm = parseInt(widthField.text)
- }
- }
- QtButton {
- id: resetButton
- height: pluginMain.buttonHeight
- borderColor: "transparent"
- fillColor: viewSettings.buttonGrayColor
- text: qsTr("RESET TO DEFAULT")
- onClicked: {
- DisplaySettings.physicalScreenHeightMm = 90
- DisplaySettings.physicalScreenWidthMm = 154
- }
- }
- }
- }
- }
-}
diff --git a/src/settingsui/locale/Language.qml b/src/settingsui/locale/Language.qml
deleted file mode 100644
index 23d1b64..0000000
--- a/src/settingsui/locale/Language.qml
+++ /dev/null
@@ -1,114 +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.LocaleSettings 1.0
-import QtQml 2.2
-import QtDeviceUtilities.QtButtonImageProvider 1.0
-
-Item {
- id: root
- property var currentRegion: Qt.locale(LocaleManager.locale)
-
- Column {
- spacing: pluginMain.spacing
-
- Text {
- color: "white"
- text: qsTr("Region")
- font.pixelSize: pluginMain.subTitleFontSize
- font.family: appFont
- }
-
- Row {
- leftPadding: pluginMain.margin
- spacing: pluginMain.spacing
- Text {
- color: "white"
- text: root.currentRegion.nativeCountryName == "" ? "Default" : root.currentRegion.nativeCountryName
- font.pixelSize: pluginMain.valueFontSize
- font.family: appFont
- verticalAlignment: Text.AlignVCenter
- height: parent.height
- }
- QtButton {
- id: regionButton
- height: pluginMain.buttonHeight
- text: qsTr("CHANGE")
- onClicked: settingsLoader.source = "qrc:/locale/RegionSelect.qml"
- }
- }
-
- Text {
- color: "white"
- text: qsTr("Format")
- font.pixelSize: pluginMain.subTitleFontSize
- font.family: appFont
- }
-
- Grid {
- columns: 2
- leftPadding: pluginMain.margin
- spacing: pluginMain.spacing
-
- TableKey {
- text: qsTr("Region")
- }
- TableValue {
- text: root.currentRegion.nativeCountryName
- }
-
- TableKey {
- text: qsTr("Short date:")
- }
- TableValue {
- text: root.currentRegion.dateFormat(1)
- }
- TableKey {
- text: qsTr("Short time:")
- }
- TableValue {
- text: root.currentRegion.timeFormat(1)
- }
- TableKey {
- text: qsTr("Currency:")
- }
- TableValue {
- text: root.currentRegion.currencySymbol(1)
- }
- TableKey {
- text: qsTr("First day of week:")
- }
- TableValue {
- text: root.currentRegion.firstDayOfWeek
- }
- }
- }
-}
diff --git a/src/settingsui/locale/RegionSelect.qml b/src/settingsui/locale/RegionSelect.qml
deleted file mode 100644
index b811a77..0000000
--- a/src/settingsui/locale/RegionSelect.qml
+++ /dev/null
@@ -1,158 +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.LocaleSettings 1.0
-import "../common"
-import QtGraphicalEffects 1.0
-
-Item {
- id: root
- property var currentRegion: Qt.locale(LocaleManager.locale)
-
- Row {
- id: backRow
- anchors.top: parent.top
- anchors.left: parent.left
- width: parent.width * 0.2
- height: parent.height * 0.04
- Image {
- id: languageBackIcon
- anchors.verticalCenter: parent.verticalCenter
- height: parent.height * 0.8
- width: height
- fillMode: Image.PreserveAspectFit
- source: "../newIcons/back_icon.svg"
-
- ColorOverlay {
- source: languageBackIcon
- anchors.fill: languageBackIcon
- color: viewSettings.buttonGreenColor
- visible: true
- }
- MouseArea {
- anchors.fill: parent
- onClicked: settingsLoader.source = "qrc:/locale/Language.qml"
- }
- }
- Text {
- anchors.top: parent.top
- height: parent.height
- anchors.verticalCenter: parent.verticalCenter
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: pluginMain.subTitleFontSize
- color: viewSettings.buttonGreenColor
- text: "Back"
- font.family: appFont
- MouseArea {
- anchors.fill: parent
- onClicked: settingsLoader.source = "qrc:/locale/Language.qml"
- }
- }
- }
-
- Text {
- id: changeLanguageText
- anchors.top: backRow.bottom
- anchors.topMargin: parent.height * 0.05
- anchors.left: parent.left
- font.pixelSize: pluginMain.subTitleFontSize
- color: "white"
- text: qsTr("Change Language")
- font.family: appFont
- font.styleName: "Bold"
- }
- Rectangle {
- id: btmLine
- anchors.top: changeLanguageText.bottom
- anchors.topMargin: parent.height * 0.025
- anchors.left: changeLanguageText.left
- width: parent.width * 0.275
- height: parent.height * 0.005
- }
-
- ColumnLayout {
- id: content
- anchors.top: btmLine.bottom
- anchors.left: parent.left
- anchors.bottom: parent.bottom
- anchors.right: parent.right
- anchors.topMargin: parent.height * 0.025
- TextField {
- id: country
- Layout.preferredWidth: root.width * 0.5
- font.pixelSize: pluginMain.valueFontSize
- leftPadding: pluginMain.margin
- rightPadding: pluginMain.margin
- bottomPadding: 6
- topPadding: 6
- color: "white"
- text: ""
- placeholderText: "Search..."
- placeholderTextColor: "white"
- font.family: appFont
- font.styleName: "Regular"
- onTextChanged: LocaleFilter.filter = country.text
- Layout.alignment: Qt.AlignVCenter
- background: Rectangle {
- color: "transparent"
- border.color: viewSettings.borderColor
- border.width: 1
- }
- }
-
- CustomTableView {
- id: localeTableView
- headerTexts: [qsTr("Language"), qsTr("Country")]
- roleNames: ["language", "country"]
- model: LocaleFilter
- onClicked: {
- var val = model.itemFromRow(index);
- if (val !== "") {
- LocaleManager.locale = val;
- settingsLoader.source = "qrc:/locale/Language.qml"
- }
- }
- }
- }
- Component.onCompleted: {
- country.text = LocaleFilter.filter
- var n = LocaleFilter.indexForCountry(root.currentRegion.nativeCountryName)
- localeTableView.localeIndex = n
- }
-
- Connections {
- target: LocaleFilter.sourceModel
- function onReady() {
- var n = LocaleFilter.indexForCountry(root.currentRegion.nativeCountryName)
- localeTableView.localeIndex = n
- }
- }
-}
diff --git a/src/settingsui/locale/TableKey.qml b/src/settingsui/locale/TableKey.qml
deleted file mode 100644
index 523f0dd..0000000
--- a/src/settingsui/locale/TableKey.qml
+++ /dev/null
@@ -1,35 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 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.0
-
-Text {
- color: "white"
- font.pixelSize: pluginMain.valueFontSize
- font.family: appFont
-}
diff --git a/src/settingsui/locale/TableValue.qml b/src/settingsui/locale/TableValue.qml
deleted file mode 100644
index 523f0dd..0000000
--- a/src/settingsui/locale/TableValue.qml
+++ /dev/null
@@ -1,35 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 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.0
-
-Text {
- color: "white"
- font.pixelSize: pluginMain.valueFontSize
- font.family: appFont
-}
diff --git a/src/settingsui/network/NetworkSettings.qml b/src/settingsui/network/NetworkSettings.qml
index f18173e..8aa8cc0 100644
--- a/src/settingsui/network/NetworkSettings.qml
+++ b/src/settingsui/network/NetworkSettings.qml
@@ -31,147 +31,13 @@ import QtQuick.Layouts 1.3
import QtQuick.Controls 2.2
import QtDeviceUtilities.NetworkSettings 1.0
import QtDeviceUtilities.QtButtonImageProvider 1.0
-import QtDeviceUtilities.LocalDeviceSettings 1.0
import "../common"
-import "../timedate"
Item {
id: networkSettingsRoot
property string title: qsTr("Network Settings")
- property bool usbEthernetSettingVisibility: ( viewSettings.usbEthernetSettingVisible && NetworkSettingsManager.hasUsbEthernetProtocolConfiguration() ) ? true : false
anchors.fill: parent
- Text {
- id: usbEthernetTitleText
- visible: usbEthernetSettingVisibility
- text: qsTr("USB Ethernet")
- font.pixelSize: pluginMain.subTitleFontSize
- font.family: appFont
- font.styleName: "SemiBold"
- color: "white"
- anchors.left: parent.left
- }
- TextArea {
- id: ipAddressTextArea
- visible: usbEthernetSettingVisibility
- text: qsTr("IP Address:") + NetworkSettingsManager.usbEthernetIpAddress
- color: viewSettings.buttonGreenColor
- font.family: appFont
- font.styleName: "SemiBold"
- font.pixelSize: pluginMain.subTitleFontSize - 2
- opacity: 1.0
- readOnly: true
- anchors.left: usbEthernetTitleText.left
- anchors.verticalCenter: usbEthernetCustomComboBox.verticalCenter
- anchors.leftMargin: 15
- }
- CustomComboBox {
- id: usbEthernetCustomComboBox
- visible: usbEthernetSettingVisibility
- width: root.width * 0.15
- height: pluginMain.buttonHeight
- anchors.top: usbEthernetTitleText.bottom
- anchors.left: ipAddressTextArea.right
- anchors.right: setUsbEthernetButton.left
- anchors.rightMargin: 15
- anchors.leftMargin: 15
- model: ["RNDIS", "CDCECM" ]
- currentIndex: 0
- delegate: ItemDelegate {
- id: usbEthernetDelegate
- contentItem: Text {
- anchors.left: usbEthernetDelegate.left
- anchors.leftMargin: pluginMain.margin
- text: modelData
- color: usbEthernetCustomComboBox.currentIndex == index ? viewSettings.buttonGreenColor : "white"
- elide: Text.ElideRight
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: pluginMain.valueFontSize
- font.family: appFont
- font.styleName: "Regular"
- }
- }
- Component.onCompleted: {
- usbEthernetCustomComboBox.currentIndex = "RNDIS" === NetworkSettingsManager.usbEthernetProtocol ? 0 : 1
- }
- }
- QtButton {
- id: setUsbEthernetButton
- visible: usbEthernetSettingVisibility
- height: pluginMain.buttonHeight
- text: qsTr("SAVE & REBOOT")
- anchors.right: parent.right
- anchors.verticalCenter: usbEthernetCustomComboBox.verticalCenter
- onClicked: {
- showRebootAcceptPopup();
- }
- }
-
- function showRebootAcceptPopup() {
- messageDialog.visible = true
- }
- Dialog {
- function rebootAccepted() {
- NetworkSettingsManager.setUsbVirtualEthernetLinkProtocol(usbEthernetCustomComboBox.currentText)
- LocalDevice.reboot()
- }
- id: messageDialog
- anchors.centerIn: parent
- width: parent.width
- height: parent.height
- opacity: 0.9
- background: Rectangle{
- id: messageDialogMainRectangle
- width: parent.width
- height: parent.height
- color: viewSettings.backgroundColor
- }
- Rectangle {
- id: messageDialogPopupRectangle
- color: viewSettings.backgroundColor
- border.color: viewSettings.borderColor
- border.width: 3
- anchors.centerIn: parent
- width: parent.width * 0.75
- height: parent.height * 0.75
- Column {
- anchors.centerIn: parent
- spacing: viewSettings.pageMargin
- Text {
- id: shutDownConfirmText
- width: messageDialogPopupRectangle.width * 0.75
- height: messageDialogPopupRectangle.height * 0.25
- horizontalAlignment: Text.AlignHCenter
- anchors.horizontalCenter: parent.horizontalCenter
- fontSizeMode: Text.Fit
- minimumPixelSize: 1
- font.pixelSize: messageDialogPopupRectangle.width * 0.3
- color: "white"
- font.family: viewSettings.appFont
- font.styleName: "SemiBold"
- text: "Save and reboot the system?"
- }
- QtButton {
- id: saveRebootConfirm
- height: pluginMain.buttonHeight
- anchors.horizontalCenter: parent.horizontalCenter
- text: "OK"
- onClicked: messageDialog.rebootAccepted();
- }
- QtButton {
- id: saveRebootCancel
- height: pluginMain.buttonHeight
- anchors.horizontalCenter: parent.horizontalCenter
- borderColor: "transparent"
- fillColor: viewSettings.buttonGrayColor
- text: qsTr("CANCEL")
- onClicked: {
- messageDialog.visible = false
- }
- }
- }
- }
- }
Text {
id: wlanText
text: qsTr("WLAN")
@@ -179,7 +45,7 @@ Item {
font.family: appFont
font.styleName: "SemiBold"
color: "white"
- anchors.top: usbEthernetSettingVisibility ? usbEthernetCustomComboBox.bottom : networkSettingsRoot.top
+ anchors.top: networkSettingsRoot.top
anchors.left: parent.left
}
CustomSwitch {
diff --git a/src/settingsui/power/Power.qml b/src/settingsui/power/Power.qml
deleted file mode 100644
index 1bcc658..0000000
--- a/src/settingsui/power/Power.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 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.0
-import QtQuick.Controls 2.1
-import QtDeviceUtilities.QtButtonImageProvider 1.0
-
-Item {
- id: root
-
- Column {
- anchors.top: parent.top
- spacing: pluginMain.margin
-
- QtButton {
- id: shutdownButton
- width: root.width * 0.4
- height: pluginMain.fieldHeight
- text: qsTr("SHUTDOWN")
- onClicked: shutdownPopup.open(true)
- }
- QtButton {
- id: rebootButton
- width: root.width * 0.4
- height: pluginMain.fieldHeight
- text: qsTr("REBOOT")
- onClicked: shutdownPopup.open(false)
- }
- }
-}
diff --git a/src/settingsui/settingsuiapp.qrc b/src/settingsui/settingsuiapp.qrc
index 110cf83..844ba29 100644
--- a/src/settingsui/settingsuiapp.qrc
+++ b/src/settingsui/settingsuiapp.qrc
@@ -3,16 +3,8 @@
<file>main.qml</file>
<file>common/HandwritingModeButton.qml</file>
<file>AutoScroller.qml</file>
- <file>power/Power.qml</file>
- <file>timedate/ManualTime.qml</file>
- <file>timedate/CustomComboBox.qml</file>
<file>common/CustomSwitch.qml</file>
<file>network/PassphraseEnter.qml</file>
- <file>locale/TableKey.qml</file>
- <file>locale/TableValue.qml</file>
- <file>display/Display.qml</file>
- <file>locale/Language.qml</file>
- <file>locale/RegionSelect.qml</file>
<file>network/AddressListEntry.qml</file>
<file>network/ComboBoxEntry.qml</file>
<file>network/EditWiredSettings.qml</file>
@@ -28,9 +20,6 @@
<file>settingsuiplugin/SettingsDelegate.qml</file>
<file>settingsuiplugin/SettingsHeader.qml</file>
<file>settingsuiplugin/SettingsTitleItem.qml</file>
- <file>settingsuiplugin/ShutdownPopup.qml</file>
- <file>bluetooth/Bluetooth.qml</file>
- <file>bluetooth/Discovery.qml</file>
<file>ViewSettings.qml</file>
</qresource>
</RCC>
diff --git a/src/settingsui/settingsuiplugin/ShutdownPopup.qml b/src/settingsui/settingsuiplugin/ShutdownPopup.qml
deleted file mode 100644
index 4ae9480..0000000
--- a/src/settingsui/settingsuiplugin/ShutdownPopup.qml
+++ /dev/null
@@ -1,108 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 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.0
-import QtDeviceUtilities.QtButtonImageProvider 1.0
-
-Rectangle {
- id: shutdownPopup
- width: parent.width
- height: parent.height
- color: viewSettings.backgroundColor
- opacity: 0.9
-
- signal accepted()
- property bool shutdown: false
-
- function open(sd)
- {
- shutdown = sd
- if (sd) {
- shutDownConfirmText.text = qsTr("Shut down the system?")
- shutDownConfirm.text = qsTr("SHUT DOWN")
- }
- else {
- shutDownConfirmText.text = qsTr("Reboot the system?")
- shutDownConfirm.text = qsTr("REBOOT")
- }
-
- visible = true;
- }
-
- function close()
- {
- visible = false;
- }
-
- Rectangle {
- id: frame
- color: viewSettings.backgroundColor
- border.color: viewSettings.borderColor
- border.width: 3
- anchors.centerIn: parent
- width: parent.width * 0.35
- height: parent.height * 0.4
-
- Column {
- anchors.centerIn: parent
- spacing: viewSettings.pageMargin
-
- Text {
- id: shutDownConfirmText
- width: frame.width * 0.75
- height: frame.height * 0.25
- horizontalAlignment: Text.AlignHCenter
- anchors.horizontalCenter: parent.horizontalCenter
- fontSizeMode: Text.Fit
- minimumPixelSize: 1
- font.pixelSize: frame.width * 0.3
- color: "white"
- font.family: viewSettings.appFont
- font.styleName: "SemiBold"
- text: ""
- }
- QtButton {
- id: shutDownConfirm
- height: frame.height * 0.15
- width: frame.width * 0.45
- anchors.horizontalCenter: parent.horizontalCenter
- text: ""
- onClicked: shutdownPopup.accepted()
- }
- QtButton {
- height: frame.height * 0.15
- width: frame.width * 0.45
- anchors.horizontalCenter: parent.horizontalCenter
- borderColor: "transparent"
- fillColor: viewSettings.buttonGrayColor
- text: qsTr("CANCEL")
- onClicked: shutdownPopup.close()
- }
- }
- }
-}
diff --git a/src/settingsui/settingsuiplugin/icons.qrc b/src/settingsui/settingsuiplugin/icons.qrc
index 91c3a76..eddec64 100644
--- a/src/settingsui/settingsuiplugin/icons.qrc
+++ b/src/settingsui/settingsuiplugin/icons.qrc
@@ -31,21 +31,16 @@
<file>icons/Chevron-left_black.png</file>
<file>icons/Power_black_6x.png</file>
<file>newIcons/back_icon.svg</file>
- <file>newIcons/bluetooth_icon.svg</file>
<file>newIcons/close_icon.svg</file>
- <file>newIcons/date-time_icon.svg</file>
<file>newIcons/detail_icon.svg</file>
- <file>newIcons/display_icon.svg</file>
<file>newIcons/grid_icon.svg</file>
<file>newIcons/header_toggle_icon.svg</file>
<file>newIcons/info_icon.svg</file>
- <file>newIcons/language_icon.svg</file>
<file>newIcons/mouse_icon.svg</file>
<file>newIcons/mute_icon.svg</file>
<file>newIcons/network_icon.svg</file>
<file>newIcons/pause_icon.svg</file>
<file>newIcons/play_icon.svg</file>
- <file>newIcons/power_icon.svg</file>
<file>newIcons/settings_icon.svg</file>
<file>newIcons/settingsmenu_launcher_icon.svg</file>
<file>newIcons/stop_icon.svg</file>
diff --git a/src/settingsui/settingsuiplugin/newIcons/bluetooth_icon.svg b/src/settingsui/settingsuiplugin/newIcons/bluetooth_icon.svg
deleted file mode 100644
index 5dfaa97..0000000
--- a/src/settingsui/settingsuiplugin/newIcons/bluetooth_icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg id="bluetooth" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>bluetooth_icon</title><path d="M22.38,43.5a1.79,1.79,0,0,1-1.79-1.79V25.82l-9.08,7.86A1.79,1.79,0,1,1,9.18,31l10.37-9L9.1,13a1.79,1.79,0,0,1,2.34-2.7l9.16,7.92V2.29a1.79,1.79,0,0,1,3-1.35l11.34,9.81a1.79,1.79,0,0,1,0,2.7L25,22l9.88,8.55a1.79,1.79,0,0,1,0,2.7L23.55,43.06A1.79,1.79,0,0,1,22.38,43.5ZM24.17,26V37.81L31,31.9Zm0-19.8V18L31,12.1Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/date-time_icon.svg b/src/settingsui/settingsuiplugin/newIcons/date-time_icon.svg
deleted file mode 100644
index 2b86128..0000000
--- a/src/settingsui/settingsuiplugin/newIcons/date-time_icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg id="date_time" data-name="date time" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>date-time_icon</title><polygon points="9.98 20.74 6.69 20.74 6.69 24.03 9.98 24.03 9.98 20.74 9.98 20.74" style="fill:#fff"/><polygon points="15.68 20.74 12.39 20.74 12.39 24.03 15.68 24.03 15.68 20.74 15.68 20.74" style="fill:#fff"/><polygon points="21.39 20.74 18.09 20.74 18.09 24.03 21.39 24.03 21.39 20.74 21.39 20.74" style="fill:#fff"/><polygon points="9.98 26.03 6.69 26.03 6.69 29.32 9.98 29.32 9.98 26.03 9.98 26.03" style="fill:#fff"/><polygon points="15.68 26.03 12.39 26.03 12.39 29.32 15.68 29.32 15.68 26.03 15.68 26.03" style="fill:#fff"/><polygon points="21.39 26.03 18.09 26.03 18.09 29.32 21.39 29.32 21.39 26.03 21.39 26.03" style="fill:#fff"/><path d="M38.59,21.72V7.28a1.7,1.7,0,0,0-1.7-1.7H32.08V4.45a1.7,1.7,0,1,0-3.4,0V5.58H10.44V4.45a1.7,1.7,0,1,0-3.4,0V5.58H2a1.7,1.7,0,0,0-1.7,1.7V35A1.7,1.7,0,0,0,2,36.69H24.43v0a10.53,10.53,0,1,0,14.16-15ZM3.74,9H7V10.1a1.7,1.7,0,0,0,3.4,0V9H28.68V10.1a1.7,1.7,0,0,0,3.4,0V9h3.11V15.6H3.74Zm0,24.33v-16H35.19v3.08a11,11,0,0,0-2.08-.2,10.43,10.43,0,0,0-6,1.9V20.74h-3.3V24H25A10.53,10.53,0,0,0,22.9,33.3Zm29.37,6.25A8.84,8.84,0,1,1,42,30.71,8.85,8.85,0,0,1,33.11,39.55Z" style="fill:#fff"/><path d="M39.47,30.71a.87.87,0,0,1-.88.88H33.11a.89.89,0,0,1-.88-.88V25.24a.88.88,0,1,1,1.76,0v4.59h4.6A.88.88,0,0,1,39.47,30.71Z" style="fill:#fff"/><path d="M33.2,31.59h-.09a.81.81,0,0,1-.62-.27.84.84,0,0,0,.62.26Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/display_icon.svg b/src/settingsui/settingsuiplugin/newIcons/display_icon.svg
deleted file mode 100644
index 598d2ee..0000000
--- a/src/settingsui/settingsuiplugin/newIcons/display_icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg id="display" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>display_icon</title><path d="M42.16,32.5H1.83A1.83,1.83,0,0,1,0,30.67V5A1.83,1.83,0,0,1,1.83,3.17H42.16A1.83,1.83,0,0,1,44,5V30.67a1.83,1.83,0,0,1-1.84,1.83ZM3.67,28.84H40.33v-22H3.67v22Z" style="fill:#fff"/><path d="M28.76,40.83H15.24a1.83,1.83,0,1,1,0-3.67H28.76a1.83,1.83,0,1,1,0,3.67Z" style="fill:#fff"/><path d="M17.34,40.29a1.83,1.83,0,0,1-1.83-1.83V31.05a1.83,1.83,0,1,1,3.67,0v7.41a1.83,1.83,0,0,1-1.83,1.83Z" style="fill:#fff"/><path d="M26.66,40.29a1.83,1.83,0,0,1-1.83-1.83V31.05a1.83,1.83,0,1,1,3.67,0v7.41a1.83,1.83,0,0,1-1.83,1.83Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/language_icon.svg b/src/settingsui/settingsuiplugin/newIcons/language_icon.svg
deleted file mode 100644
index f1235c5..0000000
--- a/src/settingsui/settingsuiplugin/newIcons/language_icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg id="language" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>language_icon</title><path d="M22,43.5A21.5,21.5,0,1,1,43.5,22,21.52,21.52,0,0,1,22,43.5ZM22,4.12A17.88,17.88,0,1,0,39.88,22,17.9,17.9,0,0,0,22,4.12Z" style="fill:#fff"/><path d="M22,42.6C15.22,42.6,9.7,33.36,9.7,22S15.22,1.41,22,1.41,34.29,10.64,34.29,22,28.78,42.6,22,42.6ZM22,3.22c-5.78,0-10.48,8.43-10.48,18.78S16.22,40.78,22,40.78,32.48,32.36,32.48,22,27.78,3.22,22,3.22Z" style="fill:#fff"/><path d="M22,42.6a.9.9,0,0,1-.91-.91V2.31A.9.9,0,0,1,22,1.41,20.59,20.59,0,0,1,22,42.6ZM22.9,3.24V40.76a18.78,18.78,0,0,0,0-37.53Z" style="fill:#fff"/><path d="M40.41,29.85H3.59a.91.91,0,0,1-.85-.59,20.37,20.37,0,0,1,0-14.52.91.91,0,0,1,.85-.59H40.41a.91.91,0,0,1,.85.59,20.34,20.34,0,0,1,0,14.52.91.91,0,0,1-.85.59ZM4.23,28H39.77a18.45,18.45,0,0,0,0-12.07H4.23A18.49,18.49,0,0,0,4.23,28Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/power_icon.svg b/src/settingsui/settingsuiplugin/newIcons/power_icon.svg
deleted file mode 100644
index b922c0e..0000000
--- a/src/settingsui/settingsuiplugin/newIcons/power_icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg id="power" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>power_icon</title><path d="M22,17.4a1.82,1.82,0,0,1-1.82-1.82V2.3a1.82,1.82,0,0,1,3.65,0V15.57A1.82,1.82,0,0,1,22,17.4Z" style="fill:#fff"/><path d="M22,43.48A19.15,19.15,0,0,1,15.7,6.25,1.82,1.82,0,0,1,16.9,9.7a15.51,15.51,0,1,0,10.19,0,1.82,1.82,0,0,1,1.2-3.45A19.15,19.15,0,0,1,22,43.48Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/pluginMain.qml b/src/settingsui/settingsuiplugin/pluginMain.qml
index 28e2464..5701034 100644
--- a/src/settingsui/settingsuiplugin/pluginMain.qml
+++ b/src/settingsui/settingsuiplugin/pluginMain.qml
@@ -31,7 +31,6 @@ import QtQuick.Layouts 1.2
import QtQuick.Controls 2.0
import Qt.labs.settings 1.0
import QtQuick.XmlListModel 2.0
-import QtDeviceUtilities.LocalDeviceSettings 1.0
import QtDeviceUtilities.NetworkSettings 1.0
import QtGraphicalEffects 1.0
@@ -125,20 +124,4 @@ Rectangle {
anchors.leftMargin: pluginMain.margin * 2
anchors.rightMargin: pluginMain.margin * 2
}
-
- ShutdownPopup {
- id: shutdownPopup
- visible: false
-
- onAccepted: {
- if (shutdown) {
- console.log("Powering off!")
- LocalDevice.powerOff()
- }
- else {
- console.log("Rebooting!")
- LocalDevice.reboot()
- }
- }
- }
}
diff --git a/src/settingsui/settingsuiplugin/settingsui.qrc b/src/settingsui/settingsuiplugin/settingsui.qrc
index ad2a9b6..673bb6a 100644
--- a/src/settingsui/settingsuiplugin/settingsui.qrc
+++ b/src/settingsui/settingsuiplugin/settingsui.qrc
@@ -1,13 +1,8 @@
<RCC>
<qresource prefix="/">
<file>pluginMain.qml</file>
- <file>../bluetooth/Bluetooth.qml</file>
- <file>../bluetooth/Discovery.qml</file>
<file>../common/CustomTableView.qml</file>
<file>../common/HandwritingModeButton.qml</file>
- <file>../display/Display.qml</file>
- <file>../locale/Language.qml</file>
- <file>../locale/RegionSelect.qml</file>
<file>../network/AddressListEntry.qml</file>
<file>../network/ComboBoxEntry.qml</file>
<file>../network/EditWiredSettings.qml</file>
@@ -18,24 +13,13 @@
<file>../network/WifiSettings.qml</file>
<file>../network/WifiSignalMonitor.qml</file>
<file>../network/WiredSettings.qml</file>
- <file>../timedate/AnalogClock.qml</file>
- <file>../timedate/ClockHand.qml</file>
- <file>../timedate/CustomCalendar.qml</file>
- <file>../timedate/TimeDate.qml</file>
- <file>../timedate/TimezonesView.qml</file>
<file>settingsview.xml</file>
- <file>../power/Power.qml</file>
- <file>../timedate/ManualTime.qml</file>
- <file>../timedate/CustomComboBox.qml</file>
<file>../common/CustomSwitch.qml</file>
<file>../network/NetworkListView.qml</file>
<file>../network/PassphraseEnter.qml</file>
- <file>../locale/TableKey.qml</file>
- <file>../locale/TableValue.qml</file>
<file>SettingsHeader.qml</file>
<file>SettingsDelegate.qml</file>
<file>SettingsTitleItem.qml</file>
- <file>ShutdownPopup.qml</file>
<file>icons/Alert_yellow_1x.png</file>
<file>icons/Audio_qt_6x.png</file>
<file>icons/Bluetooth_qt_1x.png</file>
@@ -67,21 +51,16 @@
<file>icons/Chevron-left_black.png</file>
<file>icons/Power_black_6x.png</file>
<file>newIcons/back_icon.svg</file>
- <file>newIcons/bluetooth_icon.svg</file>
<file>newIcons/close_icon.svg</file>
- <file>newIcons/date-time_icon.svg</file>
<file>newIcons/detail_icon.svg</file>
- <file>newIcons/display_icon.svg</file>
<file>newIcons/grid_icon.svg</file>
<file>newIcons/header_toggle_icon.svg</file>
<file>newIcons/info_icon.svg</file>
- <file>newIcons/language_icon.svg</file>
<file>newIcons/mouse_icon.svg</file>
<file>newIcons/mute_icon.svg</file>
<file>newIcons/network_icon.svg</file>
<file>newIcons/pause_icon.svg</file>
<file>newIcons/play_icon.svg</file>
- <file>newIcons/power_icon.svg</file>
<file>newIcons/settings_icon.svg</file>
<file>newIcons/settingsmenu_launcher_icon.svg</file>
<file>newIcons/stop_icon.svg</file>
diff --git a/src/settingsui/settingsuiplugin/settingsview.xml b/src/settingsui/settingsuiplugin/settingsview.xml
index 2749cb8..d7285ea 100644
--- a/src/settingsui/settingsuiplugin/settingsview.xml
+++ b/src/settingsui/settingsuiplugin/settingsview.xml
@@ -7,35 +7,5 @@
<path>network</path>
<icon>newIcons/network_icon.svg</icon>
</item>
- <item>
- <title>Display</title>
- <view>Display</view>
- <path>display</path>
- <icon>newIcons/display_icon.svg</icon>
- </item>
- <item>
- <title>Date &amp; Time</title>
- <view>TimeDate</view>
- <path>timedate</path>
- <icon>newIcons/date-time_icon.svg</icon>
- </item>
- <item>
- <title>Language &amp; Region</title>
- <view>Language</view>
- <path>locale</path>
- <icon>newIcons/language_icon.svg</icon>
- </item>
- <item>
- <title>Bluetooth</title>
- <view>Bluetooth</view>
- <path>bluetooth</path>
- <icon>newIcons/bluetooth_icon.svg</icon>
- </item>
- <item>
- <title>Power</title>
- <view>Power</view>
- <path>power</path>
- <icon>newIcons/power_icon.svg</icon>
- </item>
</settings>
</xml>
diff --git a/src/settingsui/timedate/AnalogClock.qml b/src/settingsui/timedate/AnalogClock.qml
deleted file mode 100644
index e9c655e..0000000
--- a/src/settingsui/timedate/AnalogClock.qml
+++ /dev/null
@@ -1,172 +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.Controls 2.0
-import QtDeviceUtilities.TimeDateSettings 1.0
-
-Item {
- property var currentTime: TimeManager.time
- property var newTime: new Date
- property bool editMode: false
- property alias handPressed: mouseArea.pressed
-
- onEditModeChanged: if (editMode) newTime = new Date
-
- Rectangle {
- border.color: "#bdbebf"
- border.width: 1
- color: "white"
- anchors.fill: parent
-
- Connections {
- target: TimeManager
- function onTimeChanged() { if (!mouseArea.pressed) newTime.setSeconds(currentTime.getSeconds()) }
- function onTimeZoneChanged() { Date.timeZoneUpdated() }
- }
- Label {
- id: timeLabel
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.topMargin: 10
- anchors.top: parent.top
- text: currentTime.toTimeString()
- }
- Rectangle {
- id: root
- anchors.fill: parent
- anchors.margins: 40
- 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
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- enabled: editMode
- property var handleItem: undefined
-
- function findHandle(item, point) {
- if (item.objectName === "handle") {
- var mapped = mouseArea.mapToItem(item, point.x, point.y)
- if (item.contains(mapped)) {
- return item.parent;
- }
- }
-
- for (var i=0; i < item.children.length; i++) {
- var ret = findHandle(item.children[i], point)
- if (ret)
- return ret;
- }
- return undefined;
- }
-
- onPressed: {
- handleItem = findHandle(root, Qt.point(mouse.x, mouse.y))
- currentTime.setSeconds(0);
- currentTime.setMilliseconds(0);
- newTime.setSeconds(0);
- newTime.setMilliseconds(0);
- }
-
- onReleased: {
- handleItem = undefined
- }
-
- onPositionChanged: {
- if (!handleItem)
- return;
-
- var angle = (90 + Math.atan2((mouse.y-mouseArea.height/2), (mouse.x-mouseArea.width/2))*180/Math.PI)
-
- if (handleItem.angle < 60 && handleItem.angle > 0 && angle <= 0) {
-
- if (handleItem === hours) {
- hours.pm = !hours.pm
- } else {
- var a = hours.angle - 30
- if (a > 360) a -= 360
- hours.angle = a
- }
-
- } else if (handleItem.angle > 300 && handleItem.angle < 360 && angle >= 0) {
-
- if (handleItem === hours) {
- hours.pm = !hours.pm
- } else {
- var a = hours.angle + 30
- if (a < 0) a += 360
- hours.angle = a
- }
- }
-
- if (angle < 0) {
- angle += 360
- } else if (angle > 360) {
- angle -= 360
- }
-
- handleItem.angle = angle
-
- var newhours = Math.floor(hours.angle / 30);
- if (hours.pm)
- newhours += 12
-
- newTime.setHours(newhours);
- newTime.setMinutes(Math.round(minutes.angle / 6));
-
- newTime.setSeconds(0);
- newTime.setMilliseconds(0);
-
- TimeManager.time = newTime;
- }
- }
- ClockHand {
- id: minutes
- value: currentTime.getMinutes() * 6
- }
- ClockHand {
- id: hours
- height: root.height / 2 * 0.4 + root.handOffset
- value: (currentTime.getHours() * 30) + (currentTime.getMinutes() * 0.5)
- property bool pm: false
- }
- ClockHand {
- id: seconds
- visible: !editMode
- color: "#46a2da"
- width: root.width * 0.0128
- height: root.height / 2 * 0.74
- value: currentTime.getSeconds() * 6
- }
- }
- }
-}
diff --git a/src/settingsui/timedate/ClockHand.qml b/src/settingsui/timedate/ClockHand.qml
deleted file mode 100644
index 56fa314..0000000
--- a/src/settingsui/timedate/ClockHand.qml
+++ /dev/null
@@ -1,70 +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
-
-Rectangle {
- id: hand
- objectName: "hand"
- x: root.height / 2 - width / 2
- y: root.height / 2 - height + root.handOffset
- color: editMode ? "#d6d6d6" : "#5caa15"
- width: root.width * 0.080
- height: root.height / 2 * 0.65 + root.handOffset
- antialiasing: true
- property alias angle: handRotation.angle
- property alias value: angleBinding.value
- transform: Rotation {
- id: handRotation
- origin.x: Math.round(hand.width / 2)
- origin.y: Math.round(hand.height - root.handOffset)
- Behavior on angle {
- enabled: !mouseArea.pressed
- SpringAnimation { spring: 2; damping: 0.2; modulus: 360 }
- }
-
- Binding on angle {
- id: angleBinding
- when: !mouseArea.pressed
- }
- }
- Item {
- objectName: "handle"
- anchors.verticalCenter: parent.top
- anchors.horizontalCenter: parent.horizontalCenter
- height: parent.width * 3
- width: parent.width * 3
- visible: editMode
- Rectangle {
- anchors.fill: parent
- anchors.margins: parent.width * .1
- radius: width / 2
- color: "#5caa15"
- }
- }
-}
diff --git a/src/settingsui/timedate/CustomCalendar.qml b/src/settingsui/timedate/CustomCalendar.qml
deleted file mode 100644
index a1deff0..0000000
--- a/src/settingsui/timedate/CustomCalendar.qml
+++ /dev/null
@@ -1,216 +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 Qt.labs.calendar 1.0
-import QtQml 2.2
-import QtDeviceUtilities.TimeDateSettings 1.0
-
-Rectangle {
- id: root
- border.color: "#bdbebf"
- border.width: 1
- color: "white"
- height: cal.height
-
- function updateDate() {
- var date = new Date()
- grid.month = date.getMonth()
- grid.date = date.getDate()
- grid.year = date.getFullYear()
- }
-
- ColumnLayout {
- id: cal
- width: root.width
- spacing: 10
- enabled: !automatic.checked
-
- RowLayout {
- spacing: 0
- Layout.alignment: Qt.AlignTop
-
- Button {
- id: previousMonth
- Layout.preferredWidth: height
- visible: enabled
- contentItem: Rectangle {
- anchors.fill: parent
- color: "#d6d6d6"
-
- Image {
- anchors.fill: parent
- anchors.margins: parent.height * .2
- source: "../icons/Chevron-left_black.png"
- fillMode: Image.PreserveAspectFit
- }
- }
- onClicked: {
- if (grid.month === Calendar.January) {
- grid.year--
- grid.month = Calendar.December
- return;
- }
- grid.month--
- }
- }
- Rectangle {
- Layout.fillWidth: true
- color: enabled ? "#d6d6d6" : "#80c342"
- height: previousMonth.height
-
- Label {
- id: title
- text: Qt.locale().monthName(grid.month, Locale.LongFormat) + " " + grid.year
- anchors.fill: parent
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- }
- }
- Button {
- id: nextMonth
- Layout.preferredWidth: height
- visible: enabled
- contentItem: Rectangle {
- anchors.fill: parent
- color: "#d6d6d6"
-
- Image {
- anchors.fill: parent
- anchors.margins: parent.height * .2
- source: "../icons/Chevron-left_black.png"
- mirror: true
- fillMode: Image.PreserveAspectFit
- }
- }
- onClicked: {
- if (grid.month === Calendar.December) {
- grid.year++
- grid.month = Calendar.January
- }
- grid.month++
- }
- }
- }
- DayOfWeekRow {
- locale: grid.locale
- Layout.column: 1
- Layout.fillWidth: true
- Layout.alignment: Qt.AlignTop
- delegate: Text {
- text: model.narrowName.charAt(0)
- font.bold: true
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- }
- }
- MonthGrid {
- id: grid
- Layout.alignment: Qt.AlignTop
- Layout.fillWidth: true
- property int date: -1
- property Item currentItem: null
- delegate: Label {
- id: gridDelegate
- objectName: "gridDelegate"
- text: delegateDay
- opacity: model.month === grid.month ? 1 : .2
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- font.bold: delegateDay === grid.date && delegateMonth === grid.month
- color: delegateDay === grid.date && delegateMonth === grid.month && enabled ? "white" : "black"
- property int delegateDay: model.day
- property int delegateMonth: model.month
- }
- Component.onCompleted: updateDate()
-
- Rectangle {
- z: -1
- id: highlight
- x: grid.currentItem ? grid.currentItem.x + grid.currentItem.width / 2 - width / 2: 0
- y: grid.currentItem ? grid.currentItem.y + grid.currentItem.height / 2- height / 2: 0
- width: grid.currentItem ? grid.currentItem.width : 0
- visible: grid.currentItem
- height: width
- color: enabled? "#80c342" : "#d6d6d6"
- radius: width / 2
- }
-
- onMonthChanged: updateHighlightPosition()
- onYearChanged: updateHighlightPosition()
- onDateChanged: updateHighlightPosition()
-
- function updateHighlightPosition() {
- var date = new Date()
-
- date.setFullYear(grid.year)
- date.setMonth(grid.month)
- date.setDate(grid.date)
-
- var index = grid.source.indexOf(date)
- var delegate = grid.contentItem.children[index]
-
- if (delegate)
- grid.currentItem = delegate
- }
-
- MouseArea {
- anchors.fill: parent
-
- onClicked: {
- var item = grid.contentItem.childAt(mouse.x, mouse.y)
-
- if (item) {
- if (item.objectName !== "gridDelegate")
- item = grid.contentItem.children[0]
-
- if (!item)
- return;
-
- grid.currentItem = item
- grid.date = item.delegateDay
- grid.month = item.delegateMonth
-
- var currentTime = TimeManager.time;
- var newDate = new Date();
-
- newDate.setFullYear(grid.year)
- newDate.setMonth(grid.month)
- newDate.setDate(grid.date)
- newDate.setHours(currentTime.getHours());
- newDate.setMinutes(currentTime.getMinutes());
- newDate.setSeconds(currentTime.getSeconds());
- TimeManager.time = newDate;
- }
- }
- }
- }
- }
-}
diff --git a/src/settingsui/timedate/CustomComboBox.qml b/src/settingsui/timedate/CustomComboBox.qml
deleted file mode 100644
index 66c3559..0000000
--- a/src/settingsui/timedate/CustomComboBox.qml
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 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.0
-import QtQuick.Controls 2.0
-import QtGraphicalEffects 1.0
-
-ComboBox {
- id: comboBox
- property int itemsVisible: 5
- indicator: Image {
- id: indicatorImage
- height: comboBox.height * 0.4
- anchors.right: comboBox.right
- anchors.rightMargin: pluginMain.margin
- anchors.verticalCenter: comboBox.verticalCenter
- fillMode: Image.PreserveAspectFit
- rotation: -90
- source: "../newIcons/back_icon.svg"
- }
- ColorOverlay {
- id: indicatorOverlay
- source: indicatorImage
- anchors.fill: indicatorImage
- color: viewSettings.buttonGreenColor
- visible: false
- rotation: -90
- }
- contentItem: Text {
- anchors.left: comboBox.left
- anchors.leftMargin: pluginMain.margin
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: pluginMain.valueFontSize
- font.family: appFont
- font.styleName: "SemiBold"
- color: "white"
- elide: Text.ElideRight
- text: comboBox.displayText
- }
- background: Rectangle {
- color: "transparent"
- border.color: viewSettings.borderColor
- border.width: comboBox.visualFocus ? 2 : 1
- }
- popup: Popup {
- y: comboBox.height -1
- width: comboBox.width
- height: comboBox.height * comboBox.itemsVisible
- padding: 1
-
- contentItem: ListView {
- id: listView
- clip: true
- model: comboBox.popup.visible ? comboBox.delegateModel : null
- currentIndex: comboBox.currentIndex
- onCurrentIndexChanged: positionViewAtIndex(listView.currentIndex, ListView.beginning)
- }
- onOpened: {
- listView.currentIndex = comboBox.currentIndex
- indicatorImage.visible = false
- indicatorOverlay.visible = true
- }
- onClosed: {
- indicatorImage.visible = true
- indicatorOverlay.visible = false
- }
- background: Rectangle {
- border.color: viewSettings.borderColor
- color: viewSettings.backgroundColor
- opacity: 0.95
- }
- }
-}
diff --git a/src/settingsui/timedate/ManualTime.qml b/src/settingsui/timedate/ManualTime.qml
deleted file mode 100644
index 87e0f7e..0000000
--- a/src/settingsui/timedate/ManualTime.qml
+++ /dev/null
@@ -1,248 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 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.Controls 2.0
-import QtDeviceUtilities.QtButtonImageProvider 1.0
-import QtDeviceUtilities.TimeDateSettings 1.0
-
-Item {
- id: root
- property int margin: root.width * 0.05
- property var selectedDate: new Date()
- property int firstYear: 2017
-
- function zeroPadTime(timeToPad) {
- return timeToPad < 10 ? "0" + timeToPad : timeToPad
- }
-
- Column {
- spacing: pluginMain.spacing
-
- Text {
- color: "white"
- text: qsTr("Set Date")
- font.pixelSize: pluginMain.subTitleFontSize
- font.family: appFont
- }
-
- // Row of date comboboxes
- Row {
- spacing: pluginMain.spacing
- leftPadding: pluginMain.margin
-
- CustomComboBox {
- id: dayBox
- width: root.width * 0.15
- height: pluginMain.buttonHeight
- displayText: currentIndex + 1
-
- model: 31
- itemsVisible: 10
- currentIndex: selectedDate.getDate() - 1
-
- delegate: ItemDelegate {
- id: dayDelegate
- height: dayBox.height
- width: dayBox.width
- contentItem: Text {
- anchors.left: dayDelegate.left
- anchors.leftMargin: pluginMain.margin
- text: modelData + 1
- color: dayBox.currentIndex == index ? viewSettings.buttonGreenColor : "white"
- elide: Text.ElideRight
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: pluginMain.valueFontSize
- font.family: appFont
- font.styleName: "Regular"
- }
- }
-
- onCurrentIndexChanged: selectedDate.setDate(currentIndex + 1)
- }
-
- CustomComboBox {
- id: monthBox
- width: root.width * 0.35
- height: pluginMain.buttonHeight
- model: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
- currentIndex: selectedDate.getMonth()
-
- itemsVisible: 12
- delegate: ItemDelegate {
- id: monthDelegate
- height: monthBox.height
- width: monthBox.width
- contentItem: Text {
- anchors.left: monthDelegate.left
- anchors.leftMargin: pluginMain.margin
- color: monthBox.currentIndex == index ? viewSettings.buttonGreenColor : "white"
- elide: Text.ElideRight
- text: modelData
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: pluginMain.valueFontSize
- font.family: appFont
- font.styleName: "Regular"
-
- }
- }
- onCurrentIndexChanged: selectedDate.setMonth(currentIndex)
- }
-
- CustomComboBox {
- id: yearBox
- width: root.width * 0.2
- height: pluginMain.buttonHeight
- displayText: currentIndex + firstYear
-
- model: 50
- itemsVisible: 8
- currentIndex: (selectedDate.getFullYear() >= firstYear) ?
- selectedDate.getFullYear() - firstYear : 0
-
- delegate: ItemDelegate {
- id: yearDelegate
- height: yearBox.height
- width: yearBox.width
- contentItem: Text {
- anchors.left: yearDelegate.left
- anchors.leftMargin: pluginMain.margin
- text: index + firstYear
- color: yearBox.currentIndex == index ? viewSettings.buttonGreenColor : "white"
- elide: Text.ElideRight
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: pluginMain.valueFontSize
- font.family: appFont
- font.styleName: "Regular"
- }
- }
- onCurrentIndexChanged: selectedDate.setFullYear(currentIndex + firstYear)
- }
- } // Row of date comboboxes
-
- Text {
- color: "white"
- text: qsTr("Set Time")
- font.pixelSize: pluginMain.subTitleFontSize
- font.family: appFont
- }
-
- // Row of time comboboxes
- Row {
- spacing: pluginMain.spacing
- leftPadding: pluginMain.margin
-
- CustomComboBox {
- id: hourBox
- width: root.width * 0.15
- height: pluginMain.buttonHeight
- displayText: zeroPadTime(currentIndex)
-
- model: 24
- itemsVisible: 8
- currentIndex: selectedDate.getHours()
-
- delegate: ItemDelegate {
- id: hourDelegate
- height: hourBox.height
- width: hourBox.width
- contentItem: Text {
- anchors.left: hourDelegate.left
- anchors.leftMargin: pluginMain.margin
- text: zeroPadTime(parseInt(modelData))
- color: hourBox.currentIndex == index ? viewSettings.buttonGreenColor : "white"
- elide: Text.ElideRight
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: pluginMain.valueFontSize
- font.family: appFont
- font.styleName: "Regular"
- }
- }
- onCurrentIndexChanged: selectedDate.setHours(currentIndex)
- }
- CustomComboBox {
- id: minuteBox
- width: root.width * 0.15
- height: pluginMain.buttonHeight
- displayText: zeroPadTime(currentIndex)
-
- model: 60
- itemsVisible: 8
- currentIndex: selectedDate.getMinutes()
-
- delegate: ItemDelegate {
- id: minuteDelegate
- height: minuteBox.height
- width: minuteBox.width
- contentItem: Text {
- anchors.left: minuteDelegate.left
- anchors.leftMargin: pluginMain.margin
- text: zeroPadTime(parseInt(modelData))
- color: minuteBox.currentIndex == index ? viewSettings.buttonGreenColor : "white"
- elide: Text.ElideRight
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: pluginMain.valueFontSize
- font.family: appFont
- font.styleName: "Regular"
- }
- }
- onCurrentIndexChanged: selectedDate.setMinutes(currentIndex)
- }
- } // Row of time comboboxes
-
- // Row of set/cancel buttons
- Row {
- spacing: pluginMain.spacing
-
- QtButton {
- id: dateSetButton
- height: pluginMain.buttonHeight
- text: qsTr("SET")
-
- onClicked: {
- selectedDate.setSeconds(0);
- TimeManager.ntp = false
- TimeManager.time = selectedDate;
- console.log("Set date to: " + selectedDate)
- console.log("TimeManager.time: " + TimeManager.time)
- settingsLoader.source = "qrc:/timedate/TimeDate.qml"
- }
- }
- QtButton {
- id: dateCancelButton
- height: pluginMain.buttonHeight
- fillColor: viewSettings.buttonGrayColor
- borderColor: "transparent"
- text: qsTr("CANCEL")
- onClicked: {
- settingsLoader.source = "qrc:/timedate/TimeDate.qml"
- }
- }
- } // Row of set/cancel buttons
- } // Main column
-}
diff --git a/src/settingsui/timedate/TimeDate.qml b/src/settingsui/timedate/TimeDate.qml
deleted file mode 100644
index f6f75f1..0000000
--- a/src/settingsui/timedate/TimeDate.qml
+++ /dev/null
@@ -1,162 +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.TimeDateSettings 1.0
-import QtDeviceUtilities.LocaleSettings 1.0
-import QtDeviceUtilities.QtButtonImageProvider 1.0
-
-Item {
- id: root
- property int margin: root.width * 0.05
-
- Column {
- spacing: pluginMain.spacing
- anchors.top: parent.top
-
- // Display current date
- Text {
- color: "white"
- text: qsTr("Current date")
- font.pixelSize: pluginMain.subTitleFontSize
- font.family: appFont
- }
-
- Text {
- id: dateText
- leftPadding: pluginMain.margin
- color: "white"
- font.pixelSize: pluginMain.valueFontSize
- font.family: appFont
- Timer {
- id: dateTimer
- interval: 1000
- running: true
- repeat: true
- triggeredOnStart: true
- onTriggered: {
- var date = new Date();
- dateText.text = date.toLocaleString(Qt.locale(LocaleManager.locale), Locale.LongFormat)
- }
- }
- }
-
- // Set date automatically / manually
- Text {
- color: "white"
- text: qsTr("Set Date & Time")
- font.pixelSize: pluginMain.subTitleFontSize
- font.family: appFont
- }
-
- Row {
- spacing: pluginMain.spacing
- leftPadding: pluginMain.margin
- QtButton {
- id: automaticButton
- height: pluginMain.buttonHeight
- text: qsTr("AUTOMATICALLY")
- onClicked: TimeManager.ntp = true
- }
- QtButton {
- id: manualButton
- height: pluginMain.buttonHeight
- fillColor: viewSettings.buttonGrayColor
- borderColor: "transparent"
- text: qsTr("MANUALLY")
- onClicked: {
- settingsLoader.source = "qrc:/timedate/ManualTime.qml"
- }
- }
- }
-
- // Select timezone
- Text {
- color: "white"
- text: qsTr("Time Zone")
- font.pixelSize: pluginMain.subTitleFontSize
- font.family: appFont
- }
-
- Row {
- leftPadding: pluginMain.margin
- CustomComboBox {
- id: timeZoneBox
- width: automaticButton.width + manualButton.width + pluginMain.spacing
- height: pluginMain.buttonHeight
- textRole: "id"
- itemsVisible: 7
- currentIndex: -1
- model: TimezonesFilter
- delegate: ItemDelegate {
- id: timeZoneDelegate
- height: timeZoneBox.height
- width: timeZoneBox.width
- contentItem: Text {
- anchors.left: timeZoneDelegate.left
- anchors.leftMargin: pluginMain.margin
- text: modelData["id"]
- color: timeZoneBox.currentIndex == index ? viewSettings.buttonGreenColor : "white"
- elide: Text.ElideRight
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: pluginMain.valueFontSize
- font.family: appFont
- font.styleName: "Regular"
- }
- }
-
- Component.onCompleted: {
- var n = TimezonesFilter.indexForTimezone(TimeManager.timeZone)
- timeZoneBox.currentIndex = n
- }
-
- Connections {
- target: TimezonesFilter.sourceModel
- function onReady() {
- var n = TimezonesFilter.indexForTimezone(TimeManager.timeZone)
- timeZoneBox.currentIndex = n
- }
- }
-
- onCurrentIndexChanged: {
- var val = TimezonesFilter.itemFromRow(currentIndex);
- if (val && val !== "") {
- TimeManager.timeZone = val
- }
- }
- }
- }
-
- Component {
- id: zoneselect
- TimezonesView {}
- }
- }
-}
diff --git a/src/settingsui/timedate/TimezonesView.qml b/src/settingsui/timedate/TimezonesView.qml
deleted file mode 100644
index bbcffe4..0000000
--- a/src/settingsui/timedate/TimezonesView.qml
+++ /dev/null
@@ -1,72 +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.TimeDateSettings 1.0
-import "../common"
-Item {
- id: root
- property string title: qsTr("Timezone settings")
- Component.onCompleted: timezone.text = TimezonesFilter.filter
-
- ColumnLayout {
- id: content
- anchors.fill: parent
- anchors.margins: 20
- spacing: 10
-
- RowLayout {
- spacing: 10
-
- Label {
- text: qsTr("Search area: ")
- Layout.alignment: Qt.AlignVCenter
- }
- TextField {
- id: timezone
- text: ""
- onTextChanged: TimezonesFilter.filter = timezone.text
- Layout.alignment: Qt.AlignVCenter
- }
- }
- CustomTableView {
- headerTexts: [qsTr("Timezone"), qsTr("Country")]
- roleNames: ["id", "country"]
- model: TimezonesFilter
- onClicked: {
- var val = model.itemFromRow(index);
- if (val !== "") {
- TimeManager.timeZone = val;
- stackView.pop();
- }
- }
- }
- }
-}