summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt12
-rw-r--r--src/doc/CMakeLists.txt10
-rw-r--r--src/doc/QtDeviceUtilitiesDoc1
-rw-r--r--src/doc/config/style/qt5-sidebar.html16
-rw-r--r--src/doc/online/qtdeviceutilities.qdocconf9
-rw-r--r--src/doc/online/style/qt5-sidebar.html11
-rw-r--r--src/doc/qtdeviceutilities-project.qdocconf43
-rw-r--r--src/doc/qtdeviceutilities.qdocconf1
-rw-r--r--src/doc/src/external-resources.qdoc7
-rw-r--r--src/doc/src/qtdeviceutilities-index.qdoc11
-rw-r--r--src/doc/src/qtdeviceutilities-module-qml.qdoc4
-rw-r--r--src/imports/CMakeLists.txt3
-rw-r--r--src/imports/imports.pro3
-rw-r--r--src/imports/networksettings/CMakeLists.txt24
-rw-r--r--src/imports/networksettings/networksettings.pro15
-rw-r--r--src/imports/networksettings/plugin.h48
-rw-r--r--src/imports/networksettings/plugins.qmltypes205
-rw-r--r--src/imports/networksettings/qmldir4
-rw-r--r--src/networksettings/CMakeLists.txt8
-rw-r--r--src/networksettings/connman.pri22
-rw-r--r--src/networksettings/connman/connman_manager.xml2
-rw-r--r--src/networksettings/connman/connmancommon.cpp2
-rw-r--r--src/networksettings/connman/connmancommon.h6
-rw-r--r--src/networksettings/connman/qnetworksettingsinterface_p.cpp6
-rw-r--r--src/networksettings/connman/qnetworksettingsinterface_p.h17
-rw-r--r--src/networksettings/connman/qnetworksettingsmanager_p.cpp150
-rw-r--r--src/networksettings/connman/qnetworksettingsmanager_p.h26
-rw-r--r--src/networksettings/connman/qnetworksettingsservice_p.cpp12
-rw-r--r--src/networksettings/connman/qnetworksettingsservice_p.h7
-rw-r--r--src/networksettings/connman/qnetworksettingsuseragent_p.cpp3
-rw-r--r--src/networksettings/connman/qnetworksettingsuseragent_p.h16
-rw-r--r--src/networksettings/networksettings.pro31
-rw-r--r--src/networksettings/qnetworksettings.cpp81
-rw-r--r--src/networksettings/qnetworksettings.h151
-rw-r--r--src/networksettings/qnetworksettingsaddressmodel.h9
-rw-r--r--src/networksettings/qnetworksettingsglobal.h (renamed from src/settingsui/network/NetworkDetails.qml)13
-rw-r--r--src/networksettings/qnetworksettingsinterface.cpp9
-rw-r--r--src/networksettings/qnetworksettingsinterface.h18
-rw-r--r--src/networksettings/qnetworksettingsinterfacemodel.cpp19
-rw-r--r--src/networksettings/qnetworksettingsinterfacemodel.h9
-rw-r--r--src/networksettings/qnetworksettingsmanager.cpp10
-rw-r--r--src/networksettings/qnetworksettingsmanager.h26
-rw-r--r--src/networksettings/qnetworksettingsservice.cpp14
-rw-r--r--src/networksettings/qnetworksettingsservice.h18
-rw-r--r--src/networksettings/qnetworksettingsservicemodel.cpp29
-rw-r--r--src/networksettings/qnetworksettingsservicemodel.h20
-rw-r--r--src/networksettings/qnetworksettingsuseragent.h10
-rw-r--r--src/networksettingsqml/CMakeLists.txt14
-rw-r--r--src/networksettingsqml/qnetworksettingsforeign.cpp (renamed from src/imports/networksettings/plugin.cpp)48
-rw-r--r--src/networksettingsqml/qnetworksettingsforeign.h121
-rw-r--r--src/settingsui/AutoScroller.qml106
-rw-r--r--src/settingsui/CMakeLists.txt88
-rw-r--r--src/settingsui/ViewSettings.qml43
-rw-r--r--src/settingsui/common/CustomSwitch.qml120
-rw-r--r--src/settingsui/common/CustomTableView.qml105
-rw-r--r--src/settingsui/common/HandwritingModeButton.qml164
-rw-r--r--src/settingsui/deployment.pri27
-rw-r--r--src/settingsui/main.cpp42
-rw-r--r--src/settingsui/main.qml142
-rw-r--r--src/settingsui/network/AddressListEntry.qml99
-rw-r--r--src/settingsui/network/ComboBoxEntry.qml61
-rw-r--r--src/settingsui/network/EditWiredSettings.qml366
-rw-r--r--src/settingsui/network/IpAddressTextField.qml36
-rw-r--r--src/settingsui/network/NetworkListView.qml171
-rw-r--r--src/settingsui/network/NetworkSettings.qml134
-rw-r--r--src/settingsui/network/PassphraseEnter.qml137
-rw-r--r--src/settingsui/network/WifiSelectorDelegate.qml62
-rw-r--r--src/settingsui/network/WifiSettings.qml251
-rw-r--r--src/settingsui/network/WifiSignalMonitor.qml84
-rw-r--r--src/settingsui/network/WiredSettings.qml191
-rw-r--r--src/settingsui/qtbuttonimageproviderplugin/CMakeLists.txt37
-rw-r--r--src/settingsui/qtbuttonimageproviderplugin/QtButton.qml58
-rw-r--r--src/settingsui/qtbuttonimageproviderplugin/plugin.cpp69
-rw-r--r--src/settingsui/qtbuttonimageproviderplugin/plugins.qmltypes210
-rw-r--r--src/settingsui/qtbuttonimageproviderplugin/qmldir3
-rw-r--r--src/settingsui/qtbuttonimageproviderplugin/qtbuttonimageprovider.cpp101
-rw-r--r--src/settingsui/qtbuttonimageproviderplugin/qtbuttonimageprovider.h47
-rw-r--r--src/settingsui/qtbuttonimageproviderplugin/qtbuttonimageprovider.qrc5
-rw-r--r--src/settingsui/qtbuttonimageproviderplugin/qtbuttonimageproviderplugin.pro18
-rw-r--r--src/settingsui/settingsui.pro18
-rw-r--r--src/settingsui/settingsuiapp.qrc25
-rw-r--r--src/settingsui/settingsuiplugin/CMakeLists.txt63
-rw-r--r--src/settingsui/settingsuiplugin/SettingsDelegate.qml76
-rw-r--r--src/settingsui/settingsuiplugin/SettingsHeader.qml108
-rw-r--r--src/settingsui/settingsuiplugin/SettingsTitleItem.qml57
-rw-r--r--src/settingsui/settingsuiplugin/icons.qrc12
-rw-r--r--src/settingsui/settingsuiplugin/icons/Alert_yellow_1x.pngbin631 -> 0 bytes
-rwxr-xr-xsrc/settingsui/settingsuiplugin/icons/FloatingButton_Active.pngbin3584 -> 0 bytes
-rwxr-xr-xsrc/settingsui/settingsuiplugin/icons/FloatingButton_Available.pngbin3554 -> 0 bytes
-rwxr-xr-xsrc/settingsui/settingsuiplugin/icons/FloatingButton_Unavailable.pngbin3134 -> 0 bytes
-rw-r--r--src/settingsui/settingsuiplugin/icons/WifiAnim_black_2x.pngbin1870 -> 0 bytes
-rw-r--r--src/settingsui/settingsuiplugin/icons/Wifi_lightgray_2x.pngbin939 -> 0 bytes
-rwxr-xr-xsrc/settingsui/settingsuiplugin/icons/generate_icons.sh37
-rw-r--r--src/settingsui/settingsuiplugin/icons/ref/extra/Alert.pngbin1502 -> 0 bytes
-rwxr-xr-xsrc/settingsui/settingsuiplugin/icons/scripts/cimage.sh55
-rwxr-xr-xsrc/settingsui/settingsuiplugin/icons/scripts/cimages.sh38
-rwxr-xr-xsrc/settingsui/settingsuiplugin/icons/scripts/rimage.sh47
-rwxr-xr-xsrc/settingsui/settingsuiplugin/icons/scripts/rimages.sh35
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/back_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/network_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/plugin.cpp104
-rw-r--r--src/settingsui/settingsuiplugin/pluginMain.qml106
-rw-r--r--src/settingsui/settingsuiplugin/plugins.qmltypes32
-rw-r--r--src/settingsui/settingsuiplugin/qmldir4
-rw-r--r--src/settingsui/settingsuiplugin/settingsui.qrc31
-rw-r--r--src/settingsui/settingsuiplugin/settingsuiplugin.pro17
-rw-r--r--src/src.pro15
107 files changed, 575 insertions, 4638 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3b2c64c..0e91047 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,10 +1,6 @@
-# Generated from src.pro.
-
-add_subdirectory(settingsui/settingsuiplugin)
-add_subdirectory(settingsui/qtbuttonimageproviderplugin)
-add_subdirectory(settingsui)
-add_subdirectory(imports)
+add_subdirectory(networksettings)
add_subdirectory(doc)
-if(TARGET Qt::DBus)
- add_subdirectory(networksettings)
+
+if(TARGET Qt::Qml)
+ add_subdirectory(networksettingsqml)
endif()
diff --git a/src/doc/CMakeLists.txt b/src/doc/CMakeLists.txt
index 14fa8db..e4a4b7f 100644
--- a/src/doc/CMakeLists.txt
+++ b/src/doc/CMakeLists.txt
@@ -1,4 +1,12 @@
add_library(DeviceUtilities INTERFACE)
+target_link_libraries(DeviceUtilities INTERFACE Qt::Core)
+
+if(QT_BUILD_ONLINE_DOCS)
+ set(DOC_CONF "online/qtdeviceutilities.qdocconf")
+else()
+ set(DOC_CONF "qtdeviceutilities.qdocconf")
+endif()
+
qt_internal_add_docs(DeviceUtilities
- qtdeviceutilities.qdocconf
+ ${DOC_CONF}
)
diff --git a/src/doc/QtDeviceUtilitiesDoc b/src/doc/QtDeviceUtilitiesDoc
new file mode 100644
index 0000000..2a4573c
--- /dev/null
+++ b/src/doc/QtDeviceUtilitiesDoc
@@ -0,0 +1 @@
+#include <QtNetworkSettings/QtNetworkSettings>
diff --git a/src/doc/config/style/qt5-sidebar.html b/src/doc/config/style/qt5-sidebar.html
deleted file mode 100644
index 3879827..0000000
--- a/src/doc/config/style/qt5-sidebar.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<div class="sectionlist normallist">
- <div class="heading">
- <h2>Qt Device Utilities</h2>
- </div>
- <ul>
- <li><a href="qtee-module-reference.html">Home</a></li>
- </ul>
-</div>
-<div class="sectionlist normallist">
- <div class="heading">
- <h2>See Also</h2>
- </div>
- <ul>
- <li><a href="https://doc.qt.io/QtForDeviceCreation">Qt for Device Creation</a></li>
- </ul>
-</div>
diff --git a/src/doc/online/qtdeviceutilities.qdocconf b/src/doc/online/qtdeviceutilities.qdocconf
new file mode 100644
index 0000000..c8e4c21
--- /dev/null
+++ b/src/doc/online/qtdeviceutilities.qdocconf
@@ -0,0 +1,9 @@
+include($QT_INSTALL_DOCS/global/qt-module-defaults-online.qdocconf)
+include(../qtdeviceutilities-project.qdocconf)
+
+# Sidebar used for online template
+HTML.stylesheets += style/qt5-sidebar.html
+
+# Turn off single-directory output mode
+HTML.nosubdirs = "false"
+HTML.outputsubdir = qtdeviceutilities
diff --git a/src/doc/online/style/qt5-sidebar.html b/src/doc/online/style/qt5-sidebar.html
new file mode 100644
index 0000000..d402ad0
--- /dev/null
+++ b/src/doc/online/style/qt5-sidebar.html
@@ -0,0 +1,11 @@
+<div class="sectionlist normallist">
+ <div class="heading">
+ <h2>Qt Device Utilities</h2>
+ </div>
+ <ul>
+ <li><a href="index.html">Home</a></li>
+ <li><a href="qtdeviceutilities-cpp-classes.html">C++ Classes</a></li>
+ <li><a href="qtdeviceutilities-qml-types.html">QML Types</a></li>
+ <li><a href="qtdeviceutilities-examples.html">Examples</a></li>
+ </ul>
+</div>
diff --git a/src/doc/qtdeviceutilities-project.qdocconf b/src/doc/qtdeviceutilities-project.qdocconf
index 5898e49..3a3bfdb 100644
--- a/src/doc/qtdeviceutilities-project.qdocconf
+++ b/src/doc/qtdeviceutilities-project.qdocconf
@@ -1,43 +1,20 @@
-include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
-
project = QtDeviceUtilities
description = Qt Device Utilities $QT_VERSION
version = $QT_VERSION
-macro.maintitle = "\\title Qt Device Utilities $QT_VERSION"
+projectname = "Qt Device Utilities"
+macro.maintitle = "\\title $projectname $QT_VERSION\n\\keyword $projectname"
-includepaths += -I .
-# -I ../bluetoothsettings \
-# -I ../displaysettings \
-# -I ../localdevice \
-# -I ../localesettings \
-# -I ../networksettings \
-# -I ../timedatesettings
+includepaths += -I . \
+ -I ../networksettings
# pass a custom module header to Clang
moduleheader = QtDeviceUtilitiesDoc
sourcedirs += src \
- ../imports/localesettings \
- ../imports/bluetoothsettings \
- ../imports/displaysettings \
- ../imports/localdevice \
- ../imports/localesettings \
- ../imports/timedatesettings \
- ../imports/networksettings \
- ../bluetoothsettings \
- ../displaysettings \
- ../localdevice \
- ../localesettings \
- ../networksettings \
- ../timedatesettings \
- ../settingsui/settingsuiplugin
-
-headerdirs += ../bluetoothsettings \
- ../displaysettings \
- ../localdevice \
- ../localesettings \
- ../networksettings \
- ../timedatesettings
+ ../networksettingsqml \
+ ../networksettings
+
+headerdirs += ../networksettings
exampledirs += ../../examples
@@ -77,8 +54,8 @@ macro.B2QA = "\\e {Boot to Qt for embedded Android}"
macro.B2QL = "\\e {Boot to Qt for embedded Linux}"
macro.QtDU = "Qt Device Utilities"
-# Keep Device Creation as the landing page
-navigation.landingpage = "Qt for Device Creation"
+# Qt Device Utilities as the landing page
+navigation.landingpage = "Qt Device Utilities"
navigation.qmltypespage = "Qt Device Utilities QML Types"
navigation.cppclassespage = "Qt Device Utilities C++ Classes"
diff --git a/src/doc/qtdeviceutilities.qdocconf b/src/doc/qtdeviceutilities.qdocconf
index 5b56cf1..bd38e0f 100644
--- a/src/doc/qtdeviceutilities.qdocconf
+++ b/src/doc/qtdeviceutilities.qdocconf
@@ -1,3 +1,4 @@
+include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
include(qtdeviceutilities-project.qdocconf)
# Turn off single-directory output mode
diff --git a/src/doc/src/external-resources.qdoc b/src/doc/src/external-resources.qdoc
index 38e9654..12da259 100644
--- a/src/doc/src/external-resources.qdoc
+++ b/src/doc/src/external-resources.qdoc
@@ -24,10 +24,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-/*!
- \externalpage https://doc.qt.io/QtForDeviceCreation
- \title Qt for Device Creation
-*/
/*!
\externalpage http://code.qt.io/cgit/qt/qtdeviceutilities.git/
@@ -35,6 +31,7 @@
*/
/*!
- \externalpage http://code.qt.io/cgit/qt/qtdeviceutilities.git/tree/src/settingsui
+ \externalpage https://code.qt.io/cgit/qt/qtdeviceutilities.git/tree/examples/deviceutilities/settingsuiapp/
+
\title Settings UI
*/
diff --git a/src/doc/src/qtdeviceutilities-index.qdoc b/src/doc/src/qtdeviceutilities-index.qdoc
index 3e4467e..c7e0d96 100644
--- a/src/doc/src/qtdeviceutilities-index.qdoc
+++ b/src/doc/src/qtdeviceutilities-index.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -57,20 +57,11 @@
target_link_libraries(mytarget Qt6::NetworkSettings)
\endcode
- \section2 Building with qmake
-
- If you're using qmake to build your application, add this line to your qmake .pro file:
-
- \badcode
- QT += networksettings
- \endcode
-
To import the QML types into your application, use the following import
statements in your .qml file:
\code
import QtDeviceUtilities.NetworkSettings
- import QtDeviceUtilities.SettingsUI
\endcode
\section1 Examples
diff --git a/src/doc/src/qtdeviceutilities-module-qml.qdoc b/src/doc/src/qtdeviceutilities-module-qml.qdoc
index 2c8fef5..510fc01 100644
--- a/src/doc/src/qtdeviceutilities-module-qml.qdoc
+++ b/src/doc/src/qtdeviceutilities-module-qml.qdoc
@@ -35,15 +35,11 @@
\badcode
import QtDeviceUtilities.NetworkSettings
- import QtDeviceUtilities.SettingsUI
\endcode
\section1 QML Types
\section2 Qt Network Settings Module
\generatelist qmltypesbymodule QtDeviceUtilities.NetworkSettings
-
- \section2 Qt Settings UI Module
- \generatelist qmltypesbymodule QtDeviceUtilities.SettingsUI
*/
diff --git a/src/imports/CMakeLists.txt b/src/imports/CMakeLists.txt
deleted file mode 100644
index 163fe57..0000000
--- a/src/imports/CMakeLists.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Generated from imports.pro.
-
-add_subdirectory(networksettings)
diff --git a/src/imports/imports.pro b/src/imports/imports.pro
deleted file mode 100644
index 67ab980..0000000
--- a/src/imports/imports.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-TEMPLATE = subdirs
-
-SUBDIRS += networksettings
diff --git a/src/imports/networksettings/CMakeLists.txt b/src/imports/networksettings/CMakeLists.txt
deleted file mode 100644
index b2b07b8..0000000
--- a/src/imports/networksettings/CMakeLists.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-# Generated from networksettings.pro.
-
-#####################################################################
-## networksettingsplugin Plugin:
-#####################################################################
-
-qt_add_qml_module(networksettingsplugin
- URI "QtDeviceUtilities.NetworkSettings"
- VERSION "${CMAKE_PROJECT_VERSION}"
- CLASSNAME NetworkSettingsQmlPlugin
- SKIP_TYPE_REGISTRATION
- SOURCES
- plugin.cpp plugin.h
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
- Qt::NetworkSettings
-)
-
-#### Keys ignored in scope 1:.:.:networksettings.pro:<TRUE>:
-# QML_IMPORT_VERSION = "$$QT_VERSION"
-# TARGETPATH = "QtDeviceUtilities/NetworkSettings"
diff --git a/src/imports/networksettings/networksettings.pro b/src/imports/networksettings/networksettings.pro
deleted file mode 100644
index c630fb2..0000000
--- a/src/imports/networksettings/networksettings.pro
+++ /dev/null
@@ -1,15 +0,0 @@
-QT += qml quick networksettings
-CONFIG += no_cxx_module
-QML_IMPORT_VERSION = $$QT_VERSION
-
-TARGET = networksettingsplugin
-TARGETPATH = QtDeviceUtilities/NetworkSettings
-
-SOURCES += \
- plugin.cpp \
-
-HEADERS += \
- plugin.h \
-
-load(qml_plugin)
-
diff --git a/src/imports/networksettings/plugin.h b/src/imports/networksettings/plugin.h
deleted file mode 100644
index 6125127..0000000
--- a/src/imports/networksettings/plugin.h
+++ /dev/null
@@ -1,48 +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$
-**
-****************************************************************************/
-#ifndef NETWORKSETTINGSPLUGIN_PLUGIN_H
-#define NETWORKSETTINGSPLUGIN_PLUGIN_H
-
-#include <QQmlExtensionPlugin>
-
-QT_BEGIN_NAMESPACE
-
-class NetworkSettingsQmlPlugin : public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
-
-public:
- void registerTypes(const char *uri) override;
-};
-
-QT_END_NAMESPACE
-
-#endif // NETWORKSETTINGSPLUGIN_PLUGIN_H
-
diff --git a/src/imports/networksettings/plugins.qmltypes b/src/imports/networksettings/plugins.qmltypes
deleted file mode 100644
index f2603eb..0000000
--- a/src/imports/networksettings/plugins.qmltypes
+++ /dev/null
@@ -1,205 +0,0 @@
-import QtQuick.tooling 1.2
-
-// This file describes the plugin-supplied types contained in the library.
-// It is used for QML tooling purposes only.
-//
-// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable QtDeviceUtilities.NetworkSettings 1.0'
-
-Module {
- dependencies: ["QtQuick 2.8"]
- Component {
- name: "QNetworkSettingsIPv4"
- prototype: "QObject"
- exports: ["QtDeviceUtilities.NetworkSettings/NetworkSettingsIPv4 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Enum {
- name: "MethodType"
- values: {
- "Dhcp": 0,
- "Manual": 1,
- "Off": 2
- }
- }
- Property { name: "address"; type: "string" }
- Property { name: "gateway"; type: "string" }
- Property { name: "method"; type: "MethodType" }
- Property { name: "mask"; type: "string" }
- }
- Component {
- name: "QNetworkSettingsIPv6"
- prototype: "QObject"
- exports: ["QtDeviceUtilities.NetworkSettings/NetworkSettingsIPv6 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Enum {
- name: "MethodType"
- values: {
- "Auto": 0,
- "Manual": 1,
- "Off": 2
- }
- }
- Enum {
- name: "PrivacyType"
- values: {
- "Disabled": 0,
- "Enabled": 1,
- "Preferred": 2
- }
- }
- Property { name: "address"; type: "string" }
- Property { name: "gateway"; type: "string" }
- Property { name: "method"; type: "MethodType" }
- Property { name: "privacy"; type: "PrivacyType" }
- Property { name: "prefixLength"; type: "int" }
- }
- Component {
- name: "QNetworkSettingsInterface"
- prototype: "QObject"
- exports: ["QtDeviceUtilities.NetworkSettings/NetworkInterface 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Property { name: "name"; type: "string"; isReadonly: true }
- Property { name: "state"; type: "QNetworkSettingsState::States"; isReadonly: true }
- Property { name: "type"; type: "QNetworkSettingsType::Types"; isReadonly: true }
- Property { name: "powered"; type: "bool" }
- Method { name: "scanServices" }
- }
- Component {
- name: "QNetworkSettingsManager"
- prototype: "QObject"
- exports: [
- "QtDeviceUtilities.NetworkSettings/NetworkSettingsManager 1.0"
- ]
- isCreatable: false
- isSingleton: true
- exportMetaObjectRevisions: [0]
- Property {
- name: "services"
- type: "QNetworkSettingsServiceFilter"
- isReadonly: true
- isPointer: true
- }
- Property {
- name: "interfaces"
- type: "QNetworkSettingsInterfaceModel"
- isReadonly: true
- isPointer: true
- }
- Property {
- name: "userAgent"
- type: "QNetworkSettingsUserAgent"
- isReadonly: true
- isPointer: true
- }
- Method {
- name: "service"
- type: "QNetworkSettingsService*"
- Parameter { name: "name"; type: "string" }
- Parameter { name: "type"; type: "int" }
- }
- Method {
- name: "interface"
- type: "QNetworkSettingsInterface*"
- Parameter { name: "type"; type: "int" }
- Parameter { name: "instance"; type: "int" }
- }
- }
- Component {
- name: "QNetworkSettingsProxy"
- prototype: "QObject"
- exports: [
- "QtDeviceUtilities.NetworkSettings/NetworkSettingsProxy 1.0"
- ]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Enum {
- name: "MethodType"
- values: {
- "Direct": 0,
- "Auto": 1,
- "Manual": 2
- }
- }
- Property { name: "url"; type: "QUrl" }
- Property { name: "servers"; type: "QAbstractItemModel"; isReadonly: true; isPointer: true }
- Property { name: "excludes"; type: "QAbstractItemModel"; isReadonly: true; isPointer: true }
- Property { name: "method"; type: "MethodType" }
- }
- Component {
- name: "QNetworkSettingsService"
- prototype: "QObject"
- exports: ["QtDeviceUtilities.NetworkSettings/NetworkService 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Property { name: "id"; type: "string"; isReadonly: true }
- Property { name: "name"; type: "string"; isReadonly: true }
- Property { name: "state"; type: "QNetworkSettingsState::States"; isReadonly: true }
- Property { name: "type"; type: "QNetworkSettingsType::Types"; isReadonly: true }
- Property { name: "ipv4"; type: "QNetworkSettingsIPv4"; isReadonly: true; isPointer: true }
- Property { name: "ipv6"; type: "QNetworkSettingsIPv6"; isReadonly: true; isPointer: true }
- Property { name: "proxy"; type: "QNetworkSettingsProxy"; isReadonly: true; isPointer: true }
- Property {
- name: "wirelessConfig"
- type: "QNetworkSettingsWireless"
- isReadonly: true
- isPointer: true
- }
- Property { name: "domains"; type: "QAbstractItemModel"; isReadonly: true; isPointer: true }
- Property { name: "nameservers"; type: "QAbstractItemModel"; isReadonly: true; isPointer: true }
- Signal { name: "wirelessChanged" }
- Method {
- name: "setAutoConnect"
- Parameter { name: "autoconnect"; type: "bool" }
- }
- Method { name: "setupIpv4Config" }
- Method { name: "setupIpv6Config" }
- Method { name: "setupNameserversConfig" }
- Method { name: "setupDomainsConfig" }
- Method { name: "setupNetworkSettingsProxy" }
- Method { name: "connectService" }
- Method { name: "disconnectService" }
- }
- Component {
- name: "QNetworkSettingsState"
- prototype: "QObject"
- exports: [
- "QtDeviceUtilities.NetworkSettings/NetworkSettingsState 1.0"
- ]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Enum {
- name: "States"
- values: {
- "Idle": 0,
- "Failure": 1,
- "Association": 2,
- "Configuration": 3,
- "Ready": 4,
- "Disconnect": 5,
- "Online": 6,
- "Undefined": 7
- }
- }
- Property { name: "state"; type: "States" }
- }
- Component {
- name: "QNetworkSettingsType"
- prototype: "QObject"
- exports: ["QtDeviceUtilities.NetworkSettings/NetworkSettingsType 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Enum {
- name: "Types"
- values: {
- "Wired": 0,
- "Wifi": 1,
- "Bluetooth": 2,
- "Unknown": 3
- }
- }
- Property { name: "type"; type: "Types" }
- }
-}
diff --git a/src/imports/networksettings/qmldir b/src/imports/networksettings/qmldir
deleted file mode 100644
index 64b8d6e..0000000
--- a/src/imports/networksettings/qmldir
+++ /dev/null
@@ -1,4 +0,0 @@
-module QtDeviceUtilities.NetworkSettings
-plugin networksettingsplugin
-classname NetworkSettingsQmlPlugin
-typeinfo plugins.qmltypes
diff --git a/src/networksettings/CMakeLists.txt b/src/networksettings/CMakeLists.txt
index 41057e5..03e43f4 100644
--- a/src/networksettings/CMakeLists.txt
+++ b/src/networksettings/CMakeLists.txt
@@ -4,7 +4,7 @@
## NetworkSettings Module:
#####################################################################
-qt_add_module(NetworkSettings
+qt_internal_add_module(NetworkSettings
SOURCES
connman/connmancommon.cpp connman/connmancommon.h
connman/qnetworksettingsinterface_p.cpp connman/qnetworksettingsinterface_p.h
@@ -19,6 +19,7 @@ qt_add_module(NetworkSettings
qnetworksettingsservice.cpp qnetworksettingsservice.h
qnetworksettingsservicemodel.cpp qnetworksettingsservicemodel.h
qnetworksettingsuseragent.cpp qnetworksettingsuseragent.h
+ qnetworksettingsglobal.h
DBUS_INTERFACE_SOURCES
connman/connman_manager.xml
connman/connman_service.xml
@@ -31,8 +32,7 @@ qt_add_module(NetworkSettings
Qt::Core
Qt::DBus
Qt::Network
+ GENERATE_CPP_EXPORTS
)
-#### Keys ignored in scope 1:.:.:networksettings.pro:<TRUE>:
-# MODULE = "networksettings"
-# VERSION = "1.0"
+file(MAKE_DIRECTORY header_connman)
diff --git a/src/networksettings/connman.pri b/src/networksettings/connman.pri
deleted file mode 100644
index 957f2f0..0000000
--- a/src/networksettings/connman.pri
+++ /dev/null
@@ -1,22 +0,0 @@
-QT += core network dbus
-
-INCLUDEPATH += $${PWD}/connman
-
-DBUS_INTERFACES = \
- connman/connman_manager.xml \
- connman/connman_service.xml \
- connman/connman_technology.xml
-
-SOURCES += \
- $$PWD/connman/qnetworksettingsinterface_p.cpp \
- $$PWD/connman/qnetworksettingsservice_p.cpp \
- $$PWD/connman/qnetworksettingsuseragent_p.cpp \
- $$PWD/connman/qnetworksettingsmanager_p.cpp \
- $$PWD/connman/connmancommon.cpp
-
-HEADERS += \
- $$PWD/connman/qnetworksettingsinterface_p.h \
- $$PWD/connman/qnetworksettingsservice_p.h \
- $$PWD/connman/qnetworksettingsuseragent_p.h \
- $$PWD/connman/qnetworksettingsmanager_p.h \
- $$PWD/connman/connmancommon.h
diff --git a/src/networksettings/connman/connman_manager.xml b/src/networksettings/connman/connman_manager.xml
index 95bc0cb..ba95e8b 100644
--- a/src/networksettings/connman/connman_manager.xml
+++ b/src/networksettings/connman/connman_manager.xml
@@ -80,7 +80,7 @@
<signal name="TechnologyAdded" tp:name-for-bindings="Technology_Added">
<arg name="technology" type="o"/>
<arg name="properties" type="a{sv}"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
</signal>
<signal name="TechnologyRemoved" tp:name-for-bindings="Technology_Removed">
diff --git a/src/networksettings/connman/connmancommon.cpp b/src/networksettings/connman/connmancommon.cpp
index 887af48..a77bb1d 100644
--- a/src/networksettings/connman/connmancommon.cpp
+++ b/src/networksettings/connman/connmancommon.cpp
@@ -28,6 +28,8 @@
****************************************************************************/
#include "connmancommon.h"
+#include <QtNetworkSettings/qnetworksettings.h>
+
QT_BEGIN_NAMESPACE
//Conversion operations for datatypes
diff --git a/src/networksettings/connman/connmancommon.h b/src/networksettings/connman/connmancommon.h
index 4b792ce..3b3cb79 100644
--- a/src/networksettings/connman/connmancommon.h
+++ b/src/networksettings/connman/connmancommon.h
@@ -30,8 +30,7 @@
#define CONNMANCOMMON_H
#include <QtCore/QMetaType>
-#include <QtDBus>
-#include <QtNetworkSettings/qnetworksettings.h>
+#include <QtDBus/QtDBus>
#define PropertyAgentPath QStringLiteral("/ConnmanAgent")
#define PropertyState QStringLiteral("State")
@@ -54,6 +53,9 @@
QT_BEGIN_NAMESPACE
+class QNetworkSettingsType;
+class QNetworkSettingsState;
+
struct ConnmanMapStruct {
QDBusObjectPath objectPath;
QVariantMap propertyMap;
diff --git a/src/networksettings/connman/qnetworksettingsinterface_p.cpp b/src/networksettings/connman/qnetworksettingsinterface_p.cpp
index 5f008ff..eeb2abc 100644
--- a/src/networksettings/connman/qnetworksettingsinterface_p.cpp
+++ b/src/networksettings/connman/qnetworksettingsinterface_p.cpp
@@ -27,7 +27,6 @@
**
****************************************************************************/
#include "qnetworksettingsinterface_p.h"
-#include "qnetworksettingsinterface.h"
#include "connman_technology_interface.h"
#include "connmancommon.h"
@@ -35,10 +34,9 @@ QT_BEGIN_NAMESPACE
QNetworkSettingsInterfacePrivate::QNetworkSettingsInterfacePrivate(QNetworkSettingsInterface* parent)
: QObject(parent)
- , m_technology(Q_NULLPTR)
+ , m_technology(nullptr)
,q_ptr(parent)
{
-
}
void QNetworkSettingsInterfacePrivate::initialize(const QString& path, const QVariantMap& properties)
@@ -83,7 +81,7 @@ void QNetworkSettingsInterfacePrivate::updateProperty(const QString &name, const
}
}
-void QNetworkSettingsInterfacePrivate::setState(QNetworkSettingsState::States aState)
+void QNetworkSettingsInterfacePrivate::setState(QNetworkSettingsState::State aState)
{
Q_Q(QNetworkSettingsInterface);
m_state.setState(aState);
diff --git a/src/networksettings/connman/qnetworksettingsinterface_p.h b/src/networksettings/connman/qnetworksettingsinterface_p.h
index d85712a..25fbd2d 100644
--- a/src/networksettings/connman/qnetworksettingsinterface_p.h
+++ b/src/networksettings/connman/qnetworksettingsinterface_p.h
@@ -41,10 +41,11 @@
//
#include <QObject>
-#include <QtDBus>
+#include <QtDBus/QDBusVariant>
#include "qnetworksettings.h"
#include "qnetworksettingsinterface.h"
+// Automatically generated class in global namespace
class NetConnmanTechnologyInterface;
QT_BEGIN_NAMESPACE
@@ -57,11 +58,11 @@ public:
explicit QNetworkSettingsInterfacePrivate(QNetworkSettingsInterface* parent);
void initialize(const QString& path, const QVariantMap& properties);
void setPowered(const bool power);
- void setState(QNetworkSettingsState::States aState);
+ void setState(QNetworkSettingsState::State aState);
void scan();
QString name() const {return m_name;}
- QNetworkSettingsType::Types type() const {return m_type.type();}
- QNetworkSettingsState::States state() const {return m_state.state();}
+ QNetworkSettingsType::Type type() const {return m_type.type();}
+ QNetworkSettingsState::State state() const {return m_state.state();}
bool powered() const {return m_powered;}
QString path() const;
@@ -84,21 +85,19 @@ class ConnmanSettingsInterface : public QNetworkSettingsInterface
{
Q_OBJECT
public:
- ConnmanSettingsInterface(const QString& path, const QVariantMap& properties, QObject *parent = Q_NULLPTR)
+ ConnmanSettingsInterface(const QString& path, const QVariantMap& properties, QObject *parent = nullptr)
:QNetworkSettingsInterface(parent)
{
if (d_ptr)
d_ptr->initialize(path, properties);
}
- void setState(QNetworkSettingsState::States aState) {
+ void setState(QNetworkSettingsState::State aState) {
Q_D(QNetworkSettingsInterface);
d->setState(aState);
}
- virtual ~ConnmanSettingsInterface() {
-
- }
+ virtual ~ConnmanSettingsInterface() {}
QString path() const {
if (d_ptr)
diff --git a/src/networksettings/connman/qnetworksettingsmanager_p.cpp b/src/networksettings/connman/qnetworksettingsmanager_p.cpp
index 3f594bd..94eec14 100644
--- a/src/networksettings/connman/qnetworksettingsmanager_p.cpp
+++ b/src/networksettings/connman/qnetworksettingsmanager_p.cpp
@@ -26,10 +26,8 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include <QFile>
-#include <QNetworkInterface>
+#include "qnetworksettingsservice.h"
#include "qnetworksettingsmanager_p.h"
-#include "qnetworksettingsinterface.h"
#include "qnetworksettingsinterface_p.h"
#include "qnetworksettingsservicemodel.h"
#include "qnetworksettingsuseragent.h"
@@ -42,14 +40,14 @@ const QString ConnManServiceName(QStringLiteral("net.connman"));
QNetworkSettingsManagerPrivate::QNetworkSettingsManagerPrivate(QNetworkSettingsManager *parent)
:QObject(parent)
,q_ptr(parent)
- , m_interfaceModel(Q_NULLPTR)
- , m_serviceModel(Q_NULLPTR)
- , m_serviceFilter(Q_NULLPTR)
- , m_manager(Q_NULLPTR)
- , m_agent(Q_NULLPTR)
- , m_serviceWatcher(Q_NULLPTR)
- , m_currentWifiConnection(Q_NULLPTR)
- , m_currentWiredConnection(Q_NULLPTR)
+ , m_interfaceModel(nullptr)
+ , m_serviceModel(nullptr)
+ , m_serviceFilter(nullptr)
+ , m_manager(nullptr)
+ , m_agent(nullptr)
+ , m_serviceWatcher(nullptr)
+ , m_currentWifiConnection(nullptr)
+ , m_currentWiredConnection(nullptr)
, m_initialized(false)
{
qRegisterMetaType<ConnmanMapStruct>("ConnmanMapStruct");
@@ -140,8 +138,7 @@ void QNetworkSettingsManagerPrivate::tryNextConnection()
}
if (!service) {
if (!m_unnamedServicesForSsidConnection.isEmpty()) {
- service = *m_unnamedServicesForSsidConnection.begin();
- m_unnamedServicesForSsidConnection.erase(m_unnamedServicesForSsidConnection.begin());
+ service = m_unnamedServicesForSsidConnection.take(m_unnamedServicesForSsidConnection.firstKey());
} else {
q->clearConnectionState();
}
@@ -151,6 +148,26 @@ void QNetworkSettingsManagerPrivate::tryNextConnection()
}
}
+void QNetworkSettingsManagerPrivate::setCurrentWifiConnection(QNetworkSettingsService *connection)
+{
+ m_currentWifiConnection = connection;
+}
+
+QNetworkSettingsService *QNetworkSettingsManagerPrivate::currentWifiConnection() const
+{
+ return m_currentWifiConnection.data();
+}
+
+void QNetworkSettingsManagerPrivate::setCurrentWiredConnection(QNetworkSettingsService *connection)
+{
+ m_currentWiredConnection = connection;
+}
+
+QNetworkSettingsService *QNetworkSettingsManagerPrivate::currentWiredConnection() const
+{
+ return m_currentWiredConnection.data();
+}
+
void QNetworkSettingsManagerPrivate::onConnmanServiceRegistered(const QString &serviceName)
{
if (serviceName == ConnManServiceName) {
@@ -163,31 +180,34 @@ void QNetworkSettingsManagerPrivate::onTechnologyAdded(const QDBusObjectPath &te
{
Q_Q(QNetworkSettingsManager);
- foreach (QNetworkSettingsInterface* item, m_interfaceModel.getModel()) {
- ConnmanSettingsInterface* tech = qobject_cast<ConnmanSettingsInterface*>(item);
- if (tech->path() != technology.path()) {
- ConnmanSettingsInterface *interface = new ConnmanSettingsInterface(technology.path(), properties, this);
- interface->scanServices();
-
- if (interface->type() == QNetworkSettingsType::Wired) {
- m_interfaceModel.insert(0, interface);
- }
- else if (interface->type() == QNetworkSettingsType::Wifi) {
- m_interfaceModel.append(interface);
- }
- emit q->interfacesChanged();
+ for (QNetworkSettingsInterface* item : m_interfaceModel.getModel()) {
+ ConnmanSettingsInterface* interface = qobject_cast<ConnmanSettingsInterface*>(item);
+ if (interface->path() == technology.path()) {
+ return; // we already know the interface/technology
}
}
+
+ ConnmanSettingsInterface *interface = new ConnmanSettingsInterface(technology.path(), properties, this);
+ interface->scanServices();
+
+ if (interface->type() == QNetworkSettingsType::Wired) {
+ m_interfaceModel.insert(0, interface);
+ }
+ else if (interface->type() == QNetworkSettingsType::Wifi) {
+ m_interfaceModel.append(interface);
+ }
+
+ emit q->interfacesChanged();
}
void QNetworkSettingsManagerPrivate::onTechnologyRemoved(const QDBusObjectPath &technology)
{
Q_Q(QNetworkSettingsManager);
- foreach (QNetworkSettingsInterface* item, m_interfaceModel.getModel()) {
+ for (QNetworkSettingsInterface* item : m_interfaceModel.getModel()) {
ConnmanSettingsInterface* tech = qobject_cast<ConnmanSettingsInterface*>(item);
if (tech->path() == technology.path()) {
- m_interfaceModel.removeInterface(technology.path());
+ m_interfaceModel.removeInterface(tech->name());
emit q->interfacesChanged();
}
}
@@ -201,7 +221,7 @@ void QNetworkSettingsManagerPrivate::getServicesFinished(QDBusPendingCallWatcher
if (reply.isError())
return;
- foreach (const ConnmanMapStruct &object, reply.value()) {
+ for (const ConnmanMapStruct &object : reply.value()) {
const QString servicePath = object.objectPath.path();
handleNewService(servicePath);
}
@@ -216,7 +236,7 @@ void QNetworkSettingsManagerPrivate::getTechnologiesFinished(QDBusPendingCallWat
if (reply.isError())
return;
- foreach (const ConnmanMapStruct &object, reply.value()) {
+ for (const ConnmanMapStruct &object : reply.value()) {
ConnmanSettingsInterface *item = new ConnmanSettingsInterface(object.objectPath.path(), object.propertyMap, this);
item->scanServices();
@@ -232,21 +252,43 @@ void QNetworkSettingsManagerPrivate::getTechnologiesFinished(QDBusPendingCallWat
void QNetworkSettingsManagerPrivate::onServicesChanged(ConnmanMapStructList changed, const QList<QDBusObjectPath> &removed)
{
- foreach (QDBusObjectPath path, removed) {
- m_serviceModel->removeService(path.path());
- auto serviceIter = m_unnamedServices.find(path.path());
- if (serviceIter != m_unnamedServices.end()) {
- serviceIter.value()->deleteLater();
- m_unnamedServices.erase(serviceIter);
- }
+ Q_Q(QNetworkSettingsManager);
+ for (const QDBusObjectPath &dpath : removed) {
+ QString path = dpath.path();
+
+ if (m_serviceModel->removeService(path))
+ emit q->servicesChanged();
+
+ if (auto service = m_unnamedServices.take(path))
+ if (!service->placeholderState()) {
+ disconnect(service, &QNetworkSettingsService::nameChanged,
+ this, &QNetworkSettingsManagerPrivate::serviceReady);
+ disconnect(service, &QNetworkSettingsService::typeChanged,
+ this, &QNetworkSettingsManagerPrivate::serviceReady);
+ service->deleteLater();
+ }
+ if (auto service = m_unknownServices.take(path))
+ if (!service->placeholderState()) {
+ disconnect(service, &QNetworkSettingsService::nameChanged,
+ this, &QNetworkSettingsManagerPrivate::serviceReady);
+ disconnect(service, &QNetworkSettingsService::typeChanged,
+ this, &QNetworkSettingsManagerPrivate::serviceReady);
+ service->deleteLater();
+ }
+ m_unnamedServicesForSsidConnection.remove(path); // do not delete here
}
QStringList newServices;
- foreach (ConnmanMapStruct map, changed) {
+ for (const ConnmanMapStruct &map : changed) {
+ QString path = map.objectPath.path();
+
+ if (m_unknownServices.contains(path) || m_unnamedServices.contains(path))
+ continue;
+
bool found = false;
- foreach (QNetworkSettingsService* service, m_serviceModel->getModel()) {
- if (service->id() == map.objectPath.path() && service->placeholderState() == false) {
- found =true;
+ for (QNetworkSettingsService* service : m_serviceModel->getModel()) {
+ if (service->id() == path && service->placeholderState() == false) {
+ found = true;
break;
}
}
@@ -254,7 +296,7 @@ void QNetworkSettingsManagerPrivate::onServicesChanged(ConnmanMapStructList chan
newServices.append(map.objectPath.path());
}
- foreach (QString newService, newServices) {
+ for (QString newService : newServices) {
handleNewService(newService);
}
@@ -282,9 +324,20 @@ void QNetworkSettingsManagerPrivate::handleNewService(const QString &servicePath
}
}
else {
+ bool isUnnamedWifi = false;
+
//Service name or type not set, wait for update
- connect(service, &QNetworkSettingsService::nameChanged, this, &QNetworkSettingsManagerPrivate::serviceReady);
- connect(service, &QNetworkSettingsService::typeChanged, this, &QNetworkSettingsManagerPrivate::serviceReady);
+ if (service->name().isEmpty()) {
+ connect(service, &QNetworkSettingsService::nameChanged, this, &QNetworkSettingsManagerPrivate::serviceReady);
+ isUnnamedWifi = (service->type() == QNetworkSettingsType::Wifi);
+ }
+ if (service->type() == QNetworkSettingsType::Unknown)
+ connect(service, &QNetworkSettingsService::typeChanged, this, &QNetworkSettingsManagerPrivate::serviceReady);
+
+ if (isUnnamedWifi)
+ m_unnamedServices.insert(service->id(), service);
+ else
+ m_unknownServices.insert(service->id(), service);
}
}
@@ -299,11 +352,14 @@ void QNetworkSettingsManagerPrivate::serviceReady()
QNetworkSettingsService* service = qobject_cast<QNetworkSettingsService*>(sender());
- if (service->type() != QNetworkSettingsType::Unknown
- && service->type() == QNetworkSettingsType::Wifi) {
+ // the type changed from Unknown to Wifi
+ if ((service->type() == QNetworkSettingsType::Wifi)
+ && m_unknownServices.contains(service->id())) {
+ m_unknownServices.remove(service->id());
m_unnamedServices.insert(service->id(), service);
}
+ // we have a name and a length now
if (service->name().length() > 0 && service->type() != QNetworkSettingsType::Unknown) {
service->disconnect(this);
m_unnamedServices.remove(service->id());
@@ -314,7 +370,7 @@ void QNetworkSettingsManagerPrivate::serviceReady()
}
//Update the interface state accordingly
- foreach (QNetworkSettingsInterface* item, m_interfaceModel.getModel()) {
+ for (QNetworkSettingsInterface* item : m_interfaceModel.getModel()) {
ConnmanSettingsInterface* technology = qobject_cast<ConnmanSettingsInterface*>(item);
if (technology->name() == service->name() && technology->type() == service->type()) {
technology->setState(technology->state());
diff --git a/src/networksettings/connman/qnetworksettingsmanager_p.h b/src/networksettings/connman/qnetworksettingsmanager_p.h
index c696cdd..0b0c39b 100644
--- a/src/networksettings/connman/qnetworksettingsmanager_p.h
+++ b/src/networksettings/connman/qnetworksettingsmanager_p.h
@@ -41,19 +41,22 @@
//
#include <QObject>
-#include <QtDBus>
#include <QMap>
+#include <QPointer>
+#include <QtDBus/QDBusServiceWatcher>
#include "connmancommon.h"
#include "qnetworksettingsmanager.h"
#include "qnetworksettingsinterfacemodel.h"
#include "connman_manager_interface.h"
-QT_FORWARD_DECLARE_CLASS(QNetworkSettingsServiceModel)
-QT_FORWARD_DECLARE_CLASS(QNetworkSettingsServiceFilter)
-QT_FORWARD_DECLARE_CLASS(QNetworkSettingsService)
-
QT_BEGIN_NAMESPACE
+class QDBusObjectPath;
+class QDBusPendingCallWatcher;
+class QNetworkSettingsService;
+class QNetworkSettingsServiceModel;
+class QNetworkSettingsServiceFilter;
+
class QNetworkSettingsManagerPrivate : public QObject
{
Q_OBJECT
@@ -69,10 +72,10 @@ public:
void connectBySsid(const QString &name);
void clearConnectionState();
void tryNextConnection();
- void setCurrentWifiConnection(QNetworkSettingsService *connection) {m_currentWifiConnection = connection;}
- QNetworkSettingsService* currentWifiConnection() const {return m_currentWifiConnection;}
- void setCurrentWiredConnection(QNetworkSettingsService *connection) {m_currentWiredConnection = connection;}
- QNetworkSettingsService* currentWiredConnection() const {return m_currentWiredConnection;}
+ void setCurrentWifiConnection(QNetworkSettingsService *connection);
+ QNetworkSettingsService* currentWifiConnection() const;
+ void setCurrentWiredConnection(QNetworkSettingsService *connection);
+ QNetworkSettingsService* currentWiredConnection() const;
public slots:
void getServicesFinished(QDBusPendingCallWatcher *watcher);
@@ -91,6 +94,7 @@ private:
protected:
QNetworkSettingsInterfaceModel m_interfaceModel;
QNetworkSettingsServiceModel *m_serviceModel;
+ QMap<QString, QNetworkSettingsService*> m_unknownServices;
QMap<QString, QNetworkSettingsService*> m_unnamedServices;
QMap<QString, QNetworkSettingsService*> m_unnamedServicesForSsidConnection;
QNetworkSettingsServiceFilter *m_serviceFilter;
@@ -99,8 +103,8 @@ private:
QNetworkSettingsUserAgent *m_agent;
QDBusServiceWatcher *m_serviceWatcher;
QString m_currentSsid;
- QNetworkSettingsService *m_currentWifiConnection;
- QNetworkSettingsService *m_currentWiredConnection;
+ QPointer<QNetworkSettingsService> m_currentWifiConnection;
+ QPointer<QNetworkSettingsService> m_currentWiredConnection;
bool m_initialized;
};
diff --git a/src/networksettings/connman/qnetworksettingsservice_p.cpp b/src/networksettings/connman/qnetworksettingsservice_p.cpp
index 2523e81..082b458 100644
--- a/src/networksettings/connman/qnetworksettingsservice_p.cpp
+++ b/src/networksettings/connman/qnetworksettingsservice_p.cpp
@@ -438,20 +438,22 @@ void QNetworkSettingsServicePrivate::updateProperty(const QString& key, const QV
}
else if (key == PropertySecurity) {
QStringList value = qdbus_cast<QStringList>(val);
- foreach (const QString str, value) {
+ QNetworkSettingsWireless::Securities securities;
+ for (const QString &str : value) {
if (str == AttributeNone || str == AttributeWps) {
- m_wifiConfig.setSecurity(QNetworkSettingsWireless::None);
+ securities |= QNetworkSettingsWireless::Security::None;
}
else if (str == AttributeWep) {
- m_wifiConfig.setSecurity(QNetworkSettingsWireless::WEP);
+ securities |= QNetworkSettingsWireless::Security::WEP;
}
else if (str == AttributePsk) {
- m_wifiConfig.setSecurity(QNetworkSettingsWireless::WPA);
+ securities |=QNetworkSettingsWireless::Security::WPA;
}
else if (str == AttributeIeee) {
- m_wifiConfig.setSecurity(QNetworkSettingsWireless::WPA2);
+ securities |=QNetworkSettingsWireless::Security::WPA2;
}
}
+ m_wifiConfig.setSecurity(securities);
}
else if (key == PropertyAutoConnect) {
m_autoConnect = qdbus_cast<bool>(val);
diff --git a/src/networksettings/connman/qnetworksettingsservice_p.h b/src/networksettings/connman/qnetworksettingsservice_p.h
index 9190e2d..8c798c3 100644
--- a/src/networksettings/connman/qnetworksettingsservice_p.h
+++ b/src/networksettings/connman/qnetworksettingsservice_p.h
@@ -43,20 +43,19 @@
#include "qnetworksettingsservice.h"
#include "qnetworksettings.h"
-QT_FORWARD_DECLARE_CLASS(QDBusPendingCallWatcher)
-QT_FORWARD_DECLARE_CLASS(QDBusVariant)
-
// Automatically generated class in global namespace
class NetConnmanServiceInterface;
QT_BEGIN_NAMESPACE
+class QDBusVariant;
+class QDBusPendingCallWatcher;
class QNetworkSettingsServicePrivate : public QObject
{
Q_OBJECT
Q_DECLARE_PUBLIC(QNetworkSettingsService)
public:
- QNetworkSettingsServicePrivate(const QString& aPath, QNetworkSettingsService *parent = Q_NULLPTR);
+ QNetworkSettingsServicePrivate(const QString& aPath, QNetworkSettingsService *parent = nullptr);
QNetworkSettingsService *q_ptr;
private slots:
diff --git a/src/networksettings/connman/qnetworksettingsuseragent_p.cpp b/src/networksettings/connman/qnetworksettingsuseragent_p.cpp
index 2c1e399..6ba8be7 100644
--- a/src/networksettings/connman/qnetworksettingsuseragent_p.cpp
+++ b/src/networksettings/connman/qnetworksettingsuseragent_p.cpp
@@ -26,6 +26,9 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+#include <QtDBus/QDBusConnection>
+
+#include "qnetworksettingsuseragent.h"
#include "qnetworksettingsuseragent_p.h"
#include "connmancommon.h"
diff --git a/src/networksettings/connman/qnetworksettingsuseragent_p.h b/src/networksettings/connman/qnetworksettingsuseragent_p.h
index b85ddd2..8f356d9 100644
--- a/src/networksettings/connman/qnetworksettingsuseragent_p.h
+++ b/src/networksettings/connman/qnetworksettingsuseragent_p.h
@@ -41,25 +41,20 @@
//
#include <QtCore/QObject>
-#include <QtDBus/QtDBus>
-#include "qnetworksettingsuseragent.h"
+#include <QtDBus/QDBusMessage>
+#include <QtDBus/QDBusObjectPath>
+#include <QtDBus/QDBusAbstractAdaptor>
QT_BEGIN_NAMESPACE
-class QByteArray;
-template<class T> class QList;
-template<class Key, class Value> class QMap;
-class QString;
-class QVariant;
-
-const QString AgentPath(QStringLiteral("/ConnmanAgent"));
+class QNetworkSettingsUserAgent;
class QNetworkSettingsUserAgentPrivate : public QDBusAbstractAdaptor
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "net.connman.Agent")
Q_DECLARE_PUBLIC(QNetworkSettingsUserAgent)
public:
- QNetworkSettingsUserAgentPrivate(QNetworkSettingsUserAgent *parent = Q_NULLPTR);
+ QNetworkSettingsUserAgentPrivate(QNetworkSettingsUserAgent *parent = nullptr);
void setPassphrase(const QString &passphrase);
QString passphrase() const {return m_passphrase;}
void cancel();
@@ -82,3 +77,4 @@ private:
QT_END_NAMESPACE
#endif // QNETWORKSETTINGSUSERAGENTPRIVATE_H
+
diff --git a/src/networksettings/networksettings.pro b/src/networksettings/networksettings.pro
deleted file mode 100644
index 78e7573..0000000
--- a/src/networksettings/networksettings.pro
+++ /dev/null
@@ -1,31 +0,0 @@
-load(qt_build_config)
-
-TARGET = QtNetworkSettings
-VERSION = 1.0
-
-QT = core network
-
-MODULE = networksettings
-load(qt_module)
-include(connman.pri)
-
-# Input
-SOURCES += \
- qnetworksettingsinterfacemodel.cpp \
- qnetworksettings.cpp \
- qnetworksettingsmanager.cpp \
- qnetworksettingsaddressmodel.cpp \
- qnetworksettingsservicemodel.cpp \
- qnetworksettingsservice.cpp \
- qnetworksettingsuseragent.cpp \
- qnetworksettingsinterface.cpp \
-
-HEADERS += \
- qnetworksettingsinterfacemodel.h \
- qnetworksettings.h \
- qnetworksettingsmanager.h \
- qnetworksettingsaddressmodel.h \
- qnetworksettingsservicemodel.h \
- qnetworksettingsservice.h \
- qnetworksettingsuseragent.h \
- qnetworksettingsinterface.h \
diff --git a/src/networksettings/qnetworksettings.cpp b/src/networksettings/qnetworksettings.cpp
index 79ec2d4..b984835 100644
--- a/src/networksettings/qnetworksettings.cpp
+++ b/src/networksettings/qnetworksettings.cpp
@@ -70,7 +70,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \enum QNetworkSettingsState::States
+ \enum QNetworkSettingsState::State
This enum type holds the state of the network interface.
@@ -95,21 +95,21 @@ QT_BEGIN_NAMESPACE
\property QNetworkSettingsState::state
\brief The state of the network interface.
- \sa QNetworkSettingsState::States
+ \sa QNetworkSettingsState::State
*/
/*!
\fn QNetworkSettingsState::stateChanged()
This signal is emitted when the state of the network interface changes.
- \sa QNetworkSettingsState::States
+ \sa QNetworkSettingsState::State
*/
/*!
Creates a new network interface state object with the state \a state and the
parent \a parent.
*/
-QNetworkSettingsState::QNetworkSettingsState(States state, QObject *parent)
+QNetworkSettingsState::QNetworkSettingsState(State state, QObject *parent)
: QObject(parent)
, m_state(state)
{
@@ -127,14 +127,14 @@ QNetworkSettingsState::QNetworkSettingsState(QObject *parent)
/*!
Returns the network interface state.
*/
-QNetworkSettingsState::States QNetworkSettingsState::state() const {
+QNetworkSettingsState::State QNetworkSettingsState::state() const {
return m_state;
}
/*!
Sets the network interface state to \a state.
*/
-void QNetworkSettingsState::setState(const States state) {
+void QNetworkSettingsState::setState(const State state) {
m_state = state;
emit stateChanged();
}
@@ -150,7 +150,7 @@ void QNetworkSettingsState::setState(const States state) {
*/
/*!
- \enum QNetworkSettingsType::Types
+ \enum QNetworkSettingsType::Type
This enum type holds the type of the network interface.
@@ -168,21 +168,21 @@ void QNetworkSettingsState::setState(const States state) {
\property QNetworkSettingsType::type
\brief The type of the network interface.
- \sa QNetworkSettingsType::Types
+ \sa QNetworkSettingsType::Type
*/
/*!
\fn QNetworkSettingsType::typeChanged()
This signal is emitted when the type of the network interface changes.
- \sa QNetworkSettingsType::Types
+ \sa QNetworkSettingsType::Type
*/
/*!
Creates a new network interface type object with the type \a type and
parent \a parent.
*/
-QNetworkSettingsType::QNetworkSettingsType(Types type, QObject *parent)
+QNetworkSettingsType::QNetworkSettingsType(Type type, QObject *parent)
: QObject(parent)
, m_type(type)
{
@@ -201,14 +201,14 @@ QNetworkSettingsType::QNetworkSettingsType(QObject *parent)
/*!
Returns the network interface type.
*/
-QNetworkSettingsType::Types QNetworkSettingsType::type() const {
+QNetworkSettingsType::Type QNetworkSettingsType::type() const {
return m_type;
}
/*!
Sets the network interface type to \a type.
*/
-void QNetworkSettingsType::setType(const Types type) {
+void QNetworkSettingsType::setType(const Type type) {
m_type = type;
emit typeChanged();
}
@@ -222,7 +222,7 @@ void QNetworkSettingsType::setType(const Types type) {
*/
/*!
- \enum QNetworkSettingsIPv4::MethodType
+ \enum QNetworkSettingsIPv4::Method
This enum type holds the method used for IPv4 configuration.
@@ -248,7 +248,7 @@ void QNetworkSettingsType::setType(const Types type) {
\property QNetworkSettingsIPv4::method
\brief Holds the method of IPv4 configuration.
- \sa QNetworkSettingsIPv4::MethodType
+ \sa QNetworkSettingsIPv4::Method
*/
/*!
@@ -282,11 +282,11 @@ void QNetworkSettingsIPv4::setGateway(const QString& gateway) {
emit gatewayChanged();
}
-QNetworkSettingsIPv4::MethodType QNetworkSettingsIPv4::method() const {
+QNetworkSettingsIPv4::Method QNetworkSettingsIPv4::method() const {
return m_method;
}
-void QNetworkSettingsIPv4::setMethod(const MethodType method) {
+void QNetworkSettingsIPv4::setMethod(const Method method) {
m_method = method;
emit methodChanged();
}
@@ -309,7 +309,7 @@ void QNetworkSettingsIPv4::setMask(const QString& mask) {
*/
/*!
- \enum QNetworkSettingsIPv6::MethodType
+ \enum QNetworkSettingsIPv6::Method
This enum type holds the method used for IPv6 configuration.
@@ -322,7 +322,7 @@ void QNetworkSettingsIPv4::setMask(const QString& mask) {
*/
/*!
- \enum QNetworkSettingsIPv6::PrivacyType
+ \enum QNetworkSettingsIPv6::Privacy
\brief Holds the method of applying the privacy extensions in IPv6.
\value Disabled
@@ -349,14 +349,14 @@ void QNetworkSettingsIPv4::setMask(const QString& mask) {
\property QNetworkSettingsIPv6::method
\brief Holds the method of IPv6 configuration.
- \sa QNetworkSettingsIPv6::MethodType
+ \sa QNetworkSettingsIPv6::Method
*/
/*!
\property QNetworkSettingsIPv6::privacy
\brief Holds the method of applying privacy extensions for IPv6.
- \sa QNetworkSettingsIPv6::PrivacyType
+ \sa QNetworkSettingsIPv6::Privacy
*/
/*!
@@ -391,20 +391,20 @@ void QNetworkSettingsIPv6::setGateway(const QString& gateway) {
emit gatewayChanged();
}
-QNetworkSettingsIPv6::MethodType QNetworkSettingsIPv6::method() const {
+QNetworkSettingsIPv6::Method QNetworkSettingsIPv6::method() const {
return m_method;
}
-void QNetworkSettingsIPv6::setMethod(const MethodType method) {
+void QNetworkSettingsIPv6::setMethod(const Method method) {
m_method = method;
emit methodChanged();
}
-QNetworkSettingsIPv6::PrivacyType QNetworkSettingsIPv6::privacy() const {
+QNetworkSettingsIPv6::Privacy QNetworkSettingsIPv6::privacy() const {
return m_privacy;
}
-void QNetworkSettingsIPv6::setPrivacy(const PrivacyType privacy) {
+void QNetworkSettingsIPv6::setPrivacy(const Privacy privacy) {
m_privacy = privacy;
emit privacyChanged();
}
@@ -427,7 +427,7 @@ void QNetworkSettingsIPv6::setPrefixLength(const int& prefixLength) {
*/
/*!
- \enum QNetworkSettingsProxy::MethodType
+ \enum QNetworkSettingsProxy::Method
\brief Holds the network proxy configuration method.
\value Direct
@@ -444,7 +444,7 @@ void QNetworkSettingsIPv6::setPrefixLength(const int& prefixLength) {
\property QNetworkSettingsProxy::method
\brief Holds the network proxy configuration method.
- \sa MethodType
+ \sa QNetworkSettingsProxy::Method
*/
/*!
@@ -454,7 +454,7 @@ void QNetworkSettingsIPv6::setPrefixLength(const int& prefixLength) {
For manual proxy configuration, this property holds the proxy server
address. For automatic configuration, it holds the proxy auto-config URL.
- \sa MethodType
+ \sa QNetworkSettingsProxy::Method
*/
/*!
@@ -537,11 +537,11 @@ void QNetworkSettingsProxy::setExcludes(const QStringList& excludes) {
emit excludesChanged();
}
-QNetworkSettingsProxy::MethodType QNetworkSettingsProxy::method(void) const {
+QNetworkSettingsProxy::Method QNetworkSettingsProxy::method(void) const {
return m_method;
}
-void QNetworkSettingsProxy::setMethod(const MethodType& method) {
+void QNetworkSettingsProxy::setMethod(const Method& method) {
m_method = method;
emit methodChanged();
}
@@ -554,7 +554,7 @@ void QNetworkSettingsProxy::setMethod(const MethodType& method) {
*/
/*!
- \enum QNetworkSettingsWireless::SecurityFlags
+ \enum QNetworkSettingsWireless::Security
\brief This enum type holds the wireless security protocol used to
protect the connection.
@@ -599,15 +599,12 @@ QNetworkSettingsWireless::QNetworkSettingsWireless(QObject* parent)
/*!
Returns whether the Wifi network supports the wireless security
- protocols specified in \a security.
+ protocol specified in \a security.
- \sa QNetworkSettingsWireless::SecurityFlags
+ \sa QNetworkSettingsWireless::Security
*/
-bool QNetworkSettingsWireless::supportsSecurity(SecurityFlags security) {
- if (m_securityFlags & security) {
- return true;
- }
- return false;
+bool QNetworkSettingsWireless::supportsSecurity(Security security) {
+ return m_supportedSecurites.testFlag(security);
}
bool QNetworkSettingsWireless::hidden() const {
@@ -635,14 +632,10 @@ void QNetworkSettingsWireless::setSignalStrength(const int signalStrength) {
}
/*!
- Sets \a security flags.
+ Sets \a securities flags.
*/
-void QNetworkSettingsWireless::setSecurity(const SecurityFlags security) {
- if (security == None) {
- m_securityFlags = None;
- } else {
- m_securityFlags |= security;
- }
+void QNetworkSettingsWireless::setSecurity(const Securities securities) {
+ m_supportedSecurites = securities;
}
void QNetworkSettingsWireless::setOutOfRange(const bool aOutOfRange) {
diff --git a/src/networksettings/qnetworksettings.h b/src/networksettings/qnetworksettings.h
index 84f5899..6006149 100644
--- a/src/networksettings/qnetworksettings.h
+++ b/src/networksettings/qnetworksettings.h
@@ -29,82 +29,96 @@
#ifndef QNETWORKSETTINGS_H
#define QNETWORKSETTINGS_H
-#include <QObject>
-#include <QUrl>
-#include <QVariantMap>
+#include <QtNetworkSettings/qnetworksettingsglobal.h>
+
+#include <QtCore/qobject.h>
+#include <QtCore/qurl.h>
#include <QtNetworkSettings/qnetworksettingsaddressmodel.h>
QT_BEGIN_NAMESPACE
-class Q_DECL_EXPORT QNetworkSettingsState : public QObject
+class Q_NETWORKSETTINGS_EXPORT QNetworkSettingsState : public QObject
{
Q_OBJECT
- Q_ENUMS(States)
- Q_PROPERTY(States state READ state WRITE setState NOTIFY stateChanged)
+ Q_PROPERTY(State state READ state WRITE setState NOTIFY stateChanged)
public:
- enum States {Idle, Failure, Association, Configuration, Ready, Disconnect, Online, Undefined};
+ enum State {
+ Idle = 0,
+ Failure,
+ Association,
+ Configuration,
+ Ready,
+ Disconnect,
+ Online,
+ Undefined
+ };
+ Q_ENUM(State)
- explicit QNetworkSettingsState(States state, QObject *parent = Q_NULLPTR);
- explicit QNetworkSettingsState(QObject *parent = Q_NULLPTR);
+ explicit QNetworkSettingsState(State state, QObject *parent = nullptr);
+ explicit QNetworkSettingsState(QObject *parent = nullptr);
- States state() const;
- void setState(const States state);
+ State state() const;
+ void setState(const State state);
Q_SIGNALS:
void stateChanged();
private:
- States m_state;
+ State m_state;
};
-class Q_DECL_EXPORT QNetworkSettingsType : public QObject
+class Q_NETWORKSETTINGS_EXPORT QNetworkSettingsType : public QObject
{
Q_OBJECT
- Q_ENUMS(Types)
- Q_PROPERTY(Types type READ type WRITE setType NOTIFY typeChanged)
+ Q_PROPERTY(Type type READ type WRITE setType NOTIFY typeChanged)
public:
- enum Types {
- Wired,
+ enum Type {
+ Wired = 0,
Wifi,
Bluetooth,
Unknown
};
+ Q_ENUM(Type)
- explicit QNetworkSettingsType(Types type, QObject *parent = Q_NULLPTR);
- explicit QNetworkSettingsType(QObject *parent = Q_NULLPTR);
+ explicit QNetworkSettingsType(Type type, QObject *parent = nullptr);
+ explicit QNetworkSettingsType(QObject *parent = nullptr);
- Types type() const;
- void setType(const Types type);
+ Type type() const;
+ void setType(const Type type);
Q_SIGNALS:
void typeChanged();
private:
- Types m_type;
+ Type m_type;
};
-class Q_DECL_EXPORT QNetworkSettingsIPv4 : public QObject
+class Q_NETWORKSETTINGS_EXPORT QNetworkSettingsIPv4 : 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(Method method READ method WRITE setMethod NOTIFY methodChanged)
Q_PROPERTY(QString mask READ mask WRITE setMask NOTIFY maskChanged)
public:
- explicit QNetworkSettingsIPv4(QObject *parent = Q_NULLPTR);
+ explicit QNetworkSettingsIPv4(QObject *parent = nullptr);
- enum MethodType {Dhcp, Manual, Off};
+ enum Method {
+ Dhcp = 0,
+ Manual,
+ Off
+ };
+ Q_ENUM(Method)
QString address() const;
void setAddress(const QString& address);
QString gateway() const;
void setGateway(const QString& gateway);
- MethodType method() const;
- void setMethod(const MethodType method);
+ Method method() const;
+ void setMethod(const Method method);
QString mask() const;
void setMask(const QString& mask);
@@ -117,35 +131,44 @@ Q_SIGNALS:
private:
QString m_address;
QString m_gateway;
- MethodType m_method;
+ Method m_method;
QString m_mask;
};
-
-class Q_DECL_EXPORT QNetworkSettingsIPv6 : public QObject
+class Q_NETWORKSETTINGS_EXPORT QNetworkSettingsIPv6 : 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(Method method READ method WRITE setMethod NOTIFY methodChanged)
+ Q_PROPERTY(Privacy privacy READ privacy WRITE setPrivacy NOTIFY privacyChanged)
Q_PROPERTY(int prefixLength READ prefixLength WRITE setPrefixLength NOTIFY prefixLengthChanged)
public:
- explicit QNetworkSettingsIPv6(QObject *parent = Q_NULLPTR);
+ explicit QNetworkSettingsIPv6(QObject *parent = nullptr);
- enum MethodType {Auto, Manual, Off};
- enum PrivacyType {Disabled, Enabled, Preferred};
+ enum Method {
+ Auto = 0,
+ Manual,
+ Off
+ };
+ Q_ENUM(Method)
+
+ enum Privacy {
+ Disabled = 0,
+ Enabled,
+ Preferred
+ };
+ Q_ENUM(Privacy)
QString address() const;
void setAddress(const QString& address);
QString gateway() const;
void setGateway(const QString& gateway);
- MethodType method() const;
- void setMethod(const MethodType method);
- PrivacyType privacy() const;
- void setPrivacy(const PrivacyType privacy);
+ Method method() const;
+ void setMethod(const Method method);
+ Privacy privacy() const;
+ void setPrivacy(const Privacy privacy);
int prefixLength() const;
void setPrefixLength(const int& prefixLength);
@@ -159,23 +182,27 @@ Q_SIGNALS:
private:
QString m_address;
QString m_gateway;
- MethodType m_method;
- PrivacyType m_privacy;
+ Method m_method;
+ Privacy m_privacy;
int m_prefixLength;
};
-class Q_DECL_EXPORT QNetworkSettingsProxy : public QObject
+class Q_NETWORKSETTINGS_EXPORT QNetworkSettingsProxy : public QObject
{
Q_OBJECT
- Q_ENUMS(MethodType)
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)
+ Q_PROPERTY(Method method READ method WRITE setMethod NOTIFY methodChanged)
public:
- explicit QNetworkSettingsProxy(QObject *parent = Q_NULLPTR);
+ explicit QNetworkSettingsProxy(QObject *parent = nullptr);
- enum MethodType {Direct, Auto, Manual};
+ enum Method {
+ Direct = 0,
+ Auto,
+ Manual
+ };
+ Q_ENUM(Method)
QUrl url() const;
void setUrl(const QUrl& url);
@@ -185,8 +212,8 @@ public:
QAbstractItemModel* excludes();
QStringList excludes() const;
void setExcludes(const QStringList& excludes);
- MethodType method() const;
- void setMethod(const MethodType& method);
+ Method method() const;
+ void setMethod(const Method& method);
Q_SIGNALS:
void urlChanged();
@@ -197,27 +224,32 @@ private:
QUrl m_url;
QNetworkSettingsAddressModel m_servers;
QNetworkSettingsAddressModel m_excludes;
- MethodType m_method;
+ Method m_method;
};
-class Q_DECL_EXPORT QNetworkSettingsWireless : public QObject
+class Q_NETWORKSETTINGS_EXPORT QNetworkSettingsWireless : public QObject
{
Q_OBJECT
- Q_ENUMS(SecurityFlags)
Q_PROPERTY(int signalStrength READ signalStrength WRITE setSignalStrength NOTIFY signalStrengthChanged)
Q_PROPERTY(bool hidden READ hidden NOTIFY hiddenChanged)
Q_PROPERTY(bool isOutOfRange READ outOfRange WRITE setOutOfRange NOTIFY outOfRangeChanged)
public:
- explicit QNetworkSettingsWireless(QObject* parent = Q_NULLPTR);
+ explicit QNetworkSettingsWireless(QObject* parent = nullptr);
- enum SecurityFlags {None=1, WEP=2, WPA=4, WPA2=8};
+ enum class Security {
+ None = 0x0000,
+ WEP = 0x0002,
+ WPA = 0x0004,
+ WPA2 = 0x0008
+ };
+ Q_DECLARE_FLAGS(Securities, Security)
- Q_INVOKABLE bool supportsSecurity(SecurityFlags security);
+ Q_INVOKABLE bool supportsSecurity(Security security);
bool hidden() const;
void setHidden(const bool hidden);
int signalStrength() const;
void setSignalStrength(const int signalStrength);
- void setSecurity(const SecurityFlags security);
+ void setSecurity(const Securities securities);
void setOutOfRange(const bool aOutOfRange);
bool outOfRange() const;
@@ -227,11 +259,12 @@ Q_SIGNALS:
void passwordChanged();
void outOfRangeChanged();
private:
- quint16 m_securityFlags;
+ Securities m_supportedSecurites;
bool m_hidden;
int m_signalStrength;
bool m_isOutOfRange;
};
+Q_DECLARE_OPERATORS_FOR_FLAGS(QNetworkSettingsWireless::Securities)
QT_END_NAMESPACE
diff --git a/src/networksettings/qnetworksettingsaddressmodel.h b/src/networksettings/qnetworksettingsaddressmodel.h
index 3b0ed8d..b08f381 100644
--- a/src/networksettings/qnetworksettingsaddressmodel.h
+++ b/src/networksettings/qnetworksettingsaddressmodel.h
@@ -29,17 +29,18 @@
#ifndef QNETWORKSETTINGSADDRESSMODEL_H
#define QNETWORKSETTINGSADDRESSMODEL_H
-#include <QStringListModel>
+#include <QtCore/qstringlistmodel.h>
+#include <QtNetworkSettings/qnetworksettingsglobal.h>
QT_BEGIN_NAMESPACE
-class Q_DECL_EXPORT QNetworkSettingsAddressModel : public QStringListModel
+class Q_NETWORKSETTINGS_EXPORT QNetworkSettingsAddressModel : public QStringListModel
{
Q_OBJECT
Q_PROPERTY(int count READ count NOTIFY countChanged)
public:
- explicit QNetworkSettingsAddressModel(QObject *parent = Q_NULLPTR);
- explicit QNetworkSettingsAddressModel(const QStringList &strings, QObject *parent = Q_NULLPTR);
+ explicit QNetworkSettingsAddressModel(QObject *parent = nullptr);
+ explicit QNetworkSettingsAddressModel(const QStringList &strings, QObject *parent = nullptr);
Q_INVOKABLE void append(const QString& address);
Q_INVOKABLE void remove(int index);
Q_INVOKABLE void resetChanges();
diff --git a/src/settingsui/network/NetworkDetails.qml b/src/networksettings/qnetworksettingsglobal.h
index 88b0946..c9af207 100644
--- a/src/settingsui/network/NetworkDetails.qml
+++ b/src/networksettings/qnetworksettingsglobal.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Device Utilities module of the Qt Toolkit.
@@ -26,10 +26,9 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-import QtQuick
+#ifndef QNETWORKSETTINGSGLOBAL_H
+#define QNETWORKSETTINGSGLOBAL_H
-Loader {
- id: root
- property var selectedInterface:undefined
- anchors.fill: parent
-}
+#include <QtNetworkSettings/qtnetworksettingsexports.h>
+
+#endif // QNETWORKSETTINGSGLOBAL_H
diff --git a/src/networksettings/qnetworksettingsinterface.cpp b/src/networksettings/qnetworksettingsinterface.cpp
index d885394..9907867 100644
--- a/src/networksettings/qnetworksettingsinterface.cpp
+++ b/src/networksettings/qnetworksettingsinterface.cpp
@@ -28,7 +28,6 @@
****************************************************************************/
#include "qnetworksettingsinterface.h"
#include "qnetworksettingsinterface_p.h"
-#include "qnetworksettings.h"
QT_BEGIN_NAMESPACE
@@ -49,7 +48,7 @@ QT_BEGIN_NAMESPACE
\readonly
\brief Holds the state of the network interface.
- \sa QNetworkSettingsState::States
+ \sa QNetworkSettingsState::State
*/
/*!
@@ -68,7 +67,7 @@ QT_BEGIN_NAMESPACE
\readonly
\brief Holds the type of the network interface.
- \sa QNetworkSettingsType::Types
+ \sa QNetworkSettingsType::Type
*/
/*!
@@ -146,7 +145,7 @@ QString QNetworkSettingsInterface::name() const
/*!
Returns the state of the network interface.
*/
-QNetworkSettingsState::States QNetworkSettingsInterface::state()
+QNetworkSettingsState::State QNetworkSettingsInterface::state()
{
Q_D(QNetworkSettingsInterface);
return d->state();
@@ -168,7 +167,7 @@ QNetworkSettingsState::States QNetworkSettingsInterface::state()
/*!
Returns the type of the network interface.
*/
-QNetworkSettingsType::Types QNetworkSettingsInterface::type()
+QNetworkSettingsType::Type QNetworkSettingsInterface::type()
{
Q_D(QNetworkSettingsInterface);
return d->type();
diff --git a/src/networksettings/qnetworksettingsinterface.h b/src/networksettings/qnetworksettingsinterface.h
index 20c1187..5fb9636 100644
--- a/src/networksettings/qnetworksettingsinterface.h
+++ b/src/networksettings/qnetworksettingsinterface.h
@@ -29,25 +29,25 @@
#ifndef QNETWORKSETTINGSINTERFACE_H
#define QNETWORKSETTINGSINTERFACE_H
-#include <QObject>
+#include <QtCore/qobject.h>
#include <QtNetworkSettings/qnetworksettings.h>
-QT_FORWARD_DECLARE_CLASS(QNetworkSettingsInterfacePrivate)
-
QT_BEGIN_NAMESPACE
-class Q_DECL_EXPORT QNetworkSettingsInterface : public QObject {
+class QNetworkSettingsInterfacePrivate;
+class Q_NETWORKSETTINGS_EXPORT QNetworkSettingsInterface : public QObject
+{
Q_OBJECT
Q_PROPERTY(QString name READ name NOTIFY nameChanged)
- Q_PROPERTY(QNetworkSettingsState::States state READ state NOTIFY stateChanged)
- Q_PROPERTY(QNetworkSettingsType::Types type READ type NOTIFY typeChanged)
+ Q_PROPERTY(QNetworkSettingsState::State state READ state NOTIFY stateChanged)
+ Q_PROPERTY(QNetworkSettingsType::Type type READ type NOTIFY typeChanged)
Q_PROPERTY(bool powered READ powered WRITE setPowered NOTIFY poweredChanged)
public:
- explicit QNetworkSettingsInterface(QObject* parent = Q_NULLPTR);
+ explicit QNetworkSettingsInterface(QObject* parent = nullptr);
QString name() const;
- QNetworkSettingsState::States state();
- QNetworkSettingsType::Types type();
+ QNetworkSettingsState::State state();
+ QNetworkSettingsType::Type type();
bool powered() const;
void setPowered(const bool powered);
Q_INVOKABLE void scanServices();
diff --git a/src/networksettings/qnetworksettingsinterfacemodel.cpp b/src/networksettings/qnetworksettingsinterfacemodel.cpp
index 045d3ff..95eff25 100644
--- a/src/networksettings/qnetworksettingsinterfacemodel.cpp
+++ b/src/networksettings/qnetworksettingsinterfacemodel.cpp
@@ -46,9 +46,9 @@ QT_BEGIN_NAMESPACE
\brief This enum type holds information about a network interface.
\value Type
- Network interface \l{QNetworkSettingsType::Types}{type}.
+ Network interface \l{QNetworkSettingsType::Type}{type}.
\value Status
- Network interface \l{QNetworkSettingsState::States}{state}.
+ Network interface \l{QNetworkSettingsState::State}{state}.
\value Name
Network interface name.
\value Powered
@@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE
QNetworkSettingsInterfaceModel::QNetworkSettingsInterfaceModel(QObject *parent)
: QAbstractListModel(parent)
{
- m_roleNames.insert(Qt::UserRole, "modelData");
+ m_roleNames.insert(Qt::UserRole, "entry");
m_roleNames.insert(Type, "type");
m_roleNames.insert(Status, "status");
m_roleNames.insert(Name, "name");
@@ -122,12 +122,7 @@ QVariant QNetworkSettingsInterfaceModel::data(const QModelIndex & index, int rol
*/
void QNetworkSettingsInterfaceModel::append(QNetworkSettingsInterface* item)
{
- item->setParent(this);
- connectStateChanges(item);
-
- beginInsertRows(QModelIndex(), rowCount(), rowCount());
- m_items.append(item);
- endInsertRows();
+ insert(rowCount(), item);
}
/*!
@@ -155,7 +150,7 @@ void QNetworkSettingsInterfaceModel::connectStateChanges(QNetworkSettingsInterfa
void QNetworkSettingsInterfaceModel::remove(int row)
{
beginRemoveRows(QModelIndex(), row, row);
- m_items.removeFirst();
+ m_items.takeAt(row)->deleteLater();
endRemoveRows();
}
@@ -196,7 +191,7 @@ void QNetworkSettingsInterfaceModel::connectionStatusChanged()
QNetworkSettingsInterface *s = qobject_cast<QNetworkSettingsInterface*>(sender());
int row = 0;
- foreach (QNetworkSettingsInterface* item, m_items) {
+ for (QNetworkSettingsInterface* item : m_items) {
if (item == s) {
updated(row);
break;
@@ -210,7 +205,7 @@ void QNetworkSettingsInterfaceModel::poweredChanged()
{
QNetworkSettingsInterface *s = qobject_cast<QNetworkSettingsInterface*>(sender());
int row = 0;
- foreach (QNetworkSettingsInterface* item, m_items) {
+ for (QNetworkSettingsInterface* item : m_items) {
if (item == s) {
updated(row);
break;
diff --git a/src/networksettings/qnetworksettingsinterfacemodel.h b/src/networksettings/qnetworksettingsinterfacemodel.h
index 42d40b6..aa6aa69 100644
--- a/src/networksettings/qnetworksettingsinterfacemodel.h
+++ b/src/networksettings/qnetworksettingsinterfacemodel.h
@@ -29,19 +29,18 @@
#ifndef QNETWORKSETTINGSINTERFACEMODEL_H
#define QNETWORKSETTINGSINTERFACEMODEL_H
-#include <QAbstractListModel>
-#include <QtNetworkSettings/qnetworksettings.h>
+#include <QtCore/QAbstractListModel>
+#include <QtNetworkSettings/qnetworksettingsglobal.h>
QT_BEGIN_NAMESPACE
class QNetworkSettingsInterface;
-
-class Q_DECL_EXPORT QNetworkSettingsInterfaceModel : public QAbstractListModel
+class Q_NETWORKSETTINGS_EXPORT QNetworkSettingsInterfaceModel : public QAbstractListModel
{
Q_OBJECT
public:
- explicit QNetworkSettingsInterfaceModel(QObject *parent = Q_NULLPTR);
+ explicit QNetworkSettingsInterfaceModel(QObject *parent = nullptr);
// from QAbstractItemModel
int rowCount(const QModelIndex & parent = QModelIndex()) const override;
QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const override;
diff --git a/src/networksettings/qnetworksettingsmanager.cpp b/src/networksettings/qnetworksettingsmanager.cpp
index 667004f..7ec82fa 100644
--- a/src/networksettings/qnetworksettingsmanager.cpp
+++ b/src/networksettings/qnetworksettingsmanager.cpp
@@ -26,6 +26,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+#include "qnetworksettings.h"
#include "qnetworksettingsmanager.h"
#include "qnetworksettingsservice.h"
#include "qnetworksettingsservicemodel.h"
@@ -33,7 +34,6 @@
#include "qnetworksettingsinterfacemodel.h"
#include "qnetworksettingsmanager_p.h"
#include "qnetworksettingsuseragent.h"
-#include <QStringListModel>
QT_BEGIN_NAMESPACE
@@ -82,7 +82,7 @@ QT_BEGIN_NAMESPACE
{
QList<QNetworkSettingsInterface*> interfaces = manager->interfaces()->getModel();
for (const auto &interface : interfaces) {
- if (interface->type() == QNetworkSettingsType::Types::Wifi) {
+ if (interface->type() == QNetworkSettingsType::Type::Wifi) {
if (interface->powered()) {
interface->scanServices();
} else {
@@ -167,7 +167,7 @@ QNetworkSettingsManager::QNetworkSettingsManager(QObject *parent) :
/*!
Returns the service model.
- \l QNetworkSettingsType::Types
+ \l QNetworkSettingsType::Type
*/
QNetworkSettingsServiceFilter *QNetworkSettingsManager::services()
{
@@ -191,7 +191,7 @@ QNetworkSettingsService* QNetworkSettingsManager::service(const QString& name, i
{
Q_D(QNetworkSettingsManager);
- foreach (QNetworkSettingsService* service, d->serviceModel()->getModel()) {
+ for (QNetworkSettingsService* service : d->serviceModel()->getModel()) {
if (service->name() == name && service->type() == type) {
return service;
}
@@ -299,7 +299,7 @@ QNetworkSettingsInterface* QNetworkSettingsManager::interface(int type, int inst
Q_D(QNetworkSettingsManager);
int matchingInstance = 0;
- foreach (QNetworkSettingsInterface* interface, d->m_interfaceModel.getModel()) {
+ for (QNetworkSettingsInterface* interface : d->m_interfaceModel.getModel()) {
if (interface->type() == type) {
if (matchingInstance == instance) {
return interface;
diff --git a/src/networksettings/qnetworksettingsmanager.h b/src/networksettings/qnetworksettingsmanager.h
index 8526324..9f562d3 100644
--- a/src/networksettings/qnetworksettingsmanager.h
+++ b/src/networksettings/qnetworksettingsmanager.h
@@ -29,31 +29,30 @@
#ifndef QNETWORKSETTINGSMANAGER_H
#define QNETWORKSETTINGSMANAGER_H
-#include <QtNetworkSettings/qnetworksettings.h>
-#include <QObject>
-#include <QStringListModel>
-#include "qnetworksettingsservicemodel.h"
-#include "qnetworksettingsinterfacemodel.h"
-#include "qnetworksettingsuseragent.h"
-#include "qnetworksettingsservice.h"
-
-QT_FORWARD_DECLARE_CLASS(QNetworkSettingsManagerPrivate)
-QT_FORWARD_DECLARE_CLASS(QNetworkSettingsInterface)
+#include <QtCore/qobject.h>
+#include <QtNetworkSettings/qnetworksettingsglobal.h>
QT_BEGIN_NAMESPACE
-class Q_DECL_EXPORT QNetworkSettingsManager : public QObject
+class QNetworkSettingsService;
+class QNetworkSettingsInterface;
+class QNetworkSettingsUserAgent;
+class QNetworkSettingsServiceFilter;
+class QNetworkSettingsInterfaceModel;
+class QNetworkSettingsManagerPrivate;
+class Q_NETWORKSETTINGS_EXPORT QNetworkSettingsManager : public QObject
{
Q_OBJECT
- Q_ENUMS(StateTypes NetworkTypeTypes)
Q_PROPERTY(QNetworkSettingsServiceFilter* services READ services NOTIFY servicesChanged)
Q_PROPERTY(QNetworkSettingsInterfaceModel* interfaces READ interfaces NOTIFY interfacesChanged)
Q_PROPERTY(QNetworkSettingsUserAgent* userAgent READ userAgent CONSTANT)
Q_PROPERTY(QNetworkSettingsService* currentWifiConnection READ currentWifiConnection NOTIFY currentWifiConnectionChanged)
Q_PROPERTY(QNetworkSettingsService* currentWiredConnection READ currentWiredConnection NOTIFY currentWiredConnectionChanged)
+ Q_MOC_INCLUDE("qnetworksettingsservicemodel.h")
+ Q_MOC_INCLUDE("qnetworksettingsuseragent.h")
public:
- explicit QNetworkSettingsManager(QObject* parent = Q_NULLPTR);
+ explicit QNetworkSettingsManager(QObject* parent = nullptr);
QNetworkSettingsServiceFilter* services();
QNetworkSettingsInterfaceModel* interfaces();
void setUserAgent(QNetworkSettingsUserAgent *agent);
@@ -81,7 +80,6 @@ protected:
private:
Q_DISABLE_COPY(QNetworkSettingsManager)
Q_DECLARE_PRIVATE(QNetworkSettingsManager)
-
};
QT_END_NAMESPACE
diff --git a/src/networksettings/qnetworksettingsservice.cpp b/src/networksettings/qnetworksettingsservice.cpp
index 0983c0d..ef0773c 100644
--- a/src/networksettings/qnetworksettingsservice.cpp
+++ b/src/networksettings/qnetworksettingsservice.cpp
@@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE
\readonly
\brief Holds the state of this service.
- \sa QNetworkSettingsState::States
+ \sa QNetworkSettingsState::State
*/
/*!
@@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE
\readonly
\brief Holds the type of this service.
- \sa QNetworkSettingsType::Types
+ \sa QNetworkSettingsType::Type
*/
/*!
@@ -195,6 +195,8 @@ QString QNetworkSettingsService::name() const
}
/*!
+ \fn void QNetworkSettingsService::setAutoConnect(bool autoconnect)
+
Sets automatic connections to the network service to \a autoconnect.
*/
void QNetworkSettingsService::setAutoConnect(const bool autoconnect)
@@ -224,9 +226,9 @@ bool QNetworkSettingsService::autoConnect() const
/*!
Returns the network service state.
- \sa QNetworkSettingsState::States
+ \sa QNetworkSettingsState::State
*/
-QNetworkSettingsState::States QNetworkSettingsService::state()
+QNetworkSettingsState::State QNetworkSettingsService::state()
{
Q_D(QNetworkSettingsService);
return d->m_state.state();
@@ -244,9 +246,9 @@ QNetworkSettingsState::States QNetworkSettingsService::state()
/*!
Returns the network service type.
- \sa QNetworkSettingsType::Types
+ \sa QNetworkSettingsType::Type
*/
-QNetworkSettingsType::Types QNetworkSettingsService::type()
+QNetworkSettingsType::Type QNetworkSettingsService::type()
{
Q_D(QNetworkSettingsService);
return d->m_type.type();
diff --git a/src/networksettings/qnetworksettingsservice.h b/src/networksettings/qnetworksettingsservice.h
index dd9d52a..0b71d50 100644
--- a/src/networksettings/qnetworksettingsservice.h
+++ b/src/networksettings/qnetworksettingsservice.h
@@ -29,21 +29,19 @@
#ifndef QNETWORKSETTINGSSERVICE_H
#define QNETWORKSETTINGSSERVICE_H
-#include <QObject>
+#include <QtCore/qobject.h>
#include <QtNetworkSettings/qnetworksettings.h>
-QT_FORWARD_DECLARE_CLASS(QNetworkSettingsServicePrivate)
-
QT_BEGIN_NAMESPACE
-class Q_DECL_EXPORT QNetworkSettingsService : public QObject
+class QNetworkSettingsServicePrivate;
+class Q_NETWORKSETTINGS_EXPORT QNetworkSettingsService : public QObject
{
Q_OBJECT
- Q_ENUMS(StateTypes)
Q_PROPERTY(QString id READ id CONSTANT)
Q_PROPERTY(QString name READ name NOTIFY nameChanged)
- Q_PROPERTY(QNetworkSettingsState::States state READ state NOTIFY stateChanged)
- Q_PROPERTY(QNetworkSettingsType::Types type READ type NOTIFY typeChanged)
+ Q_PROPERTY(QNetworkSettingsState::State state READ state NOTIFY stateChanged)
+ Q_PROPERTY(QNetworkSettingsType::Type type READ type NOTIFY typeChanged)
Q_PROPERTY(QNetworkSettingsIPv4* ipv4 READ ipv4 NOTIFY ipv4Changed)
Q_PROPERTY(QNetworkSettingsIPv6* ipv6 READ ipv6 NOTIFY ipv6Changed)
Q_PROPERTY(QNetworkSettingsProxy* proxy READ proxy NOTIFY proxyChanged)
@@ -52,12 +50,12 @@ class Q_DECL_EXPORT QNetworkSettingsService : public QObject
Q_PROPERTY(QAbstractItemModel* nameservers READ nameservers NOTIFY nameserversChanged)
Q_PROPERTY(bool autoConnect READ autoConnect WRITE setAutoConnect NOTIFY autoConnectChanged)
public:
- explicit QNetworkSettingsService(const QString& aServiceId, QObject* parent = Q_NULLPTR);
+ explicit QNetworkSettingsService(const QString& aServiceId, QObject* parent = nullptr);
QString id() const;
QString name() const;
- QNetworkSettingsState::States state();
- QNetworkSettingsType::Types type();
+ QNetworkSettingsState::State state();
+ QNetworkSettingsType::Type type();
QNetworkSettingsIPv4* ipv4();
QNetworkSettingsIPv6* ipv6();
QNetworkSettingsProxy* proxy();
diff --git a/src/networksettings/qnetworksettingsservicemodel.cpp b/src/networksettings/qnetworksettingsservicemodel.cpp
index 115fe35..0927bcc 100644
--- a/src/networksettings/qnetworksettingsservicemodel.cpp
+++ b/src/networksettings/qnetworksettingsservicemodel.cpp
@@ -27,6 +27,7 @@
**
****************************************************************************/
#include "qnetworksettingsservicemodel.h"
+#include "qnetworksettingsservice.h"
#include "qnetworksettings.h"
QT_BEGIN_NAMESPACE
@@ -49,7 +50,7 @@ QT_BEGIN_NAMESPACE
This enum type holds information about the network connection.
\value Type
- Network \l{QNetworkSettingsType::Types}{type}.
+ Network \l{QNetworkSettingsType::Type}{type}.
\value Name
The service set identifier (SSID) of the network.
\value SignalStrength
@@ -64,7 +65,8 @@ QT_BEGIN_NAMESPACE
QNetworkSettingsServiceModel::QNetworkSettingsServiceModel(QObject *parent)
: QAbstractListModel(parent)
{
- m_roleNames.insert(Qt::UserRole, "modelData");
+ m_roleNames.insert(Qt::UserRole, "entry");
+ m_roleNames.insert(Type, "type");
m_roleNames.insert(Name, "name");
m_roleNames.insert(SignalStrength, "signalStrength");
m_roleNames.insert(Connected, "connected");
@@ -107,6 +109,9 @@ QVariant QNetworkSettingsServiceModel::data(const QModelIndex & index, int role)
if (role == Qt::UserRole) {
return QVariant::fromValue(static_cast<QObject*>(item));
}
+ else if (role == Type) {
+ return item->type();
+ }
else if (role == Name) {
return item->name();
}
@@ -229,7 +234,7 @@ void QNetworkSettingsServiceModel::updated(int row)
QNetworkSettingsService* QNetworkSettingsServiceModel::getByName(const QString& name)
{
QNetworkSettingsService* ret = nullptr;
- foreach (QNetworkSettingsService* item, m_items) {
+ for (QNetworkSettingsService* item : m_items) {
if (item->name() == name) {
ret = item;
break;
@@ -254,7 +259,7 @@ void QNetworkSettingsServiceModel::connectionStatusChanged()
QNetworkSettingsService *s = qobject_cast<QNetworkSettingsService*>(sender());
int row = 0;
- foreach (QNetworkSettingsService* item, m_items) {
+ for (QNetworkSettingsService* item : m_items) {
if (item == s) {
updated(row);
break;
@@ -271,7 +276,7 @@ void QNetworkSettingsServiceModel::signalStrengthChanged()
{
QNetworkSettingsWireless *s = qobject_cast<QNetworkSettingsWireless*>(sender());
int row = 0;
- foreach (QNetworkSettingsService* item, m_items) {
+ for (QNetworkSettingsService* item : m_items) {
if (item->wirelessConfig() == s) {
updated(row);
break;
@@ -296,7 +301,7 @@ void QNetworkSettingsServiceModel::signalStrengthChanged()
\property QNetworkSettingsServiceFilter::type
\brief The type of the network.
- \l QNetworkSettingsType::Types
+ \l QNetworkSettingsType::Type
*/
/*!
@@ -318,7 +323,7 @@ void QNetworkSettingsServiceModel::signalStrengthChanged()
/*!
\qmltype NetworkSettingsServiceFilter
- \inqmlmodule QtDeviceutilities.NetworkSettings
+ \inqmlmodule QtDeviceUtilities.NetworkSettings
\abstract
*/
@@ -351,19 +356,19 @@ QNetworkSettingsServiceFilter::~QNetworkSettingsServiceFilter()
/*!
Returns the service model.
- \l QNetworkSettingsType::Types
+ \l QNetworkSettingsType::Type
*/
-QNetworkSettingsType::Types QNetworkSettingsServiceFilter::type() const
+QNetworkSettingsType::Type QNetworkSettingsServiceFilter::type() const
{
return m_type;
}
/*!
- \fn void QNetworkSettingsServiceFilter::setType(QNetworkSettingsType::Types type)
+ \fn void QNetworkSettingsServiceFilter::setType(QNetworkSettingsType::Type type)
Sets the service model to \a type.
*/
-void QNetworkSettingsServiceFilter::setType(const QNetworkSettingsType::Types type)
+void QNetworkSettingsServiceFilter::setType(const QNetworkSettingsType::Type type)
{
m_type = type;
emit typeChanged();
@@ -429,7 +434,7 @@ int QNetworkSettingsServiceFilter::activeRow() const
QNetworkSettingsServiceModel* model = qobject_cast<QNetworkSettingsServiceModel*>(sourceModel());
QList<QNetworkSettingsService*> data = model->getModel();
int row = 0;
- foreach (QNetworkSettingsService* item, data) {
+ for (QNetworkSettingsService* item : data) {
if (item->type() == m_type &&
(item->state() == QNetworkSettingsState::Ready ||
item->state() == QNetworkSettingsState::Online)) {
diff --git a/src/networksettings/qnetworksettingsservicemodel.h b/src/networksettings/qnetworksettingsservicemodel.h
index 01447f6..b4392d2 100644
--- a/src/networksettings/qnetworksettingsservicemodel.h
+++ b/src/networksettings/qnetworksettingsservicemodel.h
@@ -29,17 +29,17 @@
#ifndef QNETWORKSETTINGSSERVICEMODEL_H
#define QNETWORKSETTINGSSERVICEMODEL_H
-#include <QSortFilterProxyModel>
+#include <QtCore/qsortfilterproxymodel.h>
#include <QtNetworkSettings/qnetworksettings.h>
-#include <QtNetworkSettings/qnetworksettingsservice.h>
QT_BEGIN_NAMESPACE
-class Q_DECL_EXPORT QNetworkSettingsServiceModel : public QAbstractListModel
+class QNetworkSettingsService;
+class Q_NETWORKSETTINGS_EXPORT QNetworkSettingsServiceModel : public QAbstractListModel
{
Q_OBJECT
public:
- explicit QNetworkSettingsServiceModel(QObject *parent = Q_NULLPTR);
+ explicit QNetworkSettingsServiceModel(QObject *parent = nullptr);
virtual ~QNetworkSettingsServiceModel();
// from QAbstractItemModel
int rowCount(const QModelIndex & parent = QModelIndex()) const override;
@@ -74,17 +74,17 @@ private:
QHash<int, QByteArray> m_roleNames;
};
-class Q_DECL_EXPORT QNetworkSettingsServiceFilter : public QSortFilterProxyModel
+class Q_NETWORKSETTINGS_EXPORT QNetworkSettingsServiceFilter : public QSortFilterProxyModel
{
Q_OBJECT
- Q_PROPERTY(QNetworkSettingsType::Types type READ type WRITE setType NOTIFY typeChanged)
+ Q_PROPERTY(QNetworkSettingsType::Type type READ type WRITE setType NOTIFY typeChanged)
Q_PROPERTY(bool wiredNetworksAvailable MEMBER m_wiredNetworksAvailable WRITE setWiredNetworksAvailable NOTIFY wiredNetworksAvailableChanged)
public:
- explicit QNetworkSettingsServiceFilter(QObject* parent = Q_NULLPTR);
+ explicit QNetworkSettingsServiceFilter(QObject* parent = nullptr);
virtual ~QNetworkSettingsServiceFilter();
bool filterAcceptsRow( int source_row, const QModelIndex& source_parent ) const override;
- QNetworkSettingsType::Types type() const;
- void setType(QNetworkSettingsType::Types type);
+ QNetworkSettingsType::Type type() const;
+ void setType(QNetworkSettingsType::Type type);
Q_INVOKABLE QVariant itemFromRow(const int row) const;
Q_INVOKABLE int activeRow() const;
void setWiredNetworksAvailable(bool);
@@ -92,7 +92,7 @@ Q_SIGNALS:
void typeChanged();
void wiredNetworksAvailableChanged();
private:
- QNetworkSettingsType::Types m_type;
+ QNetworkSettingsType::Type m_type;
bool m_wiredNetworksAvailable;
};
diff --git a/src/networksettings/qnetworksettingsuseragent.h b/src/networksettings/qnetworksettingsuseragent.h
index 7b76c15..63964b6 100644
--- a/src/networksettings/qnetworksettingsuseragent.h
+++ b/src/networksettings/qnetworksettingsuseragent.h
@@ -29,17 +29,17 @@
#ifndef QNETWORKSETTINGSUSERAGENT_H
#define QNETWORKSETTINGSUSERAGENT_H
-#include <QObject>
-
-QT_FORWARD_DECLARE_CLASS(QNetworkSettingsUserAgentPrivate)
+#include <QtCore/qobject.h>
+#include <QtNetworkSettings/qnetworksettingsglobal.h>
QT_BEGIN_NAMESPACE
-class Q_DECL_EXPORT QNetworkSettingsUserAgent : public QObject
+class QNetworkSettingsUserAgentPrivate;
+class Q_NETWORKSETTINGS_EXPORT QNetworkSettingsUserAgent : public QObject
{
Q_OBJECT
public:
- explicit QNetworkSettingsUserAgent(QObject *parent = Q_NULLPTR);
+ explicit QNetworkSettingsUserAgent(QObject *parent = nullptr);
Q_INVOKABLE void setPassphrase(const QString &passphrase);
Q_INVOKABLE void cancelInput();
QString passphrase() const;
diff --git a/src/networksettingsqml/CMakeLists.txt b/src/networksettingsqml/CMakeLists.txt
new file mode 100644
index 0000000..db3f58c
--- /dev/null
+++ b/src/networksettingsqml/CMakeLists.txt
@@ -0,0 +1,14 @@
+qt_internal_add_qml_module(networksettingsqml
+ URI "QtDeviceUtilities.NetworkSettings"
+ VERSION "${CMAKE_PROJECT_VERSION}"
+ PAST_MAJOR_VERSIONS 1
+ PLUGIN_TARGET networksettingsqml
+ DEPENDENCIES
+ QtQml
+ SOURCES
+ qnetworksettingsforeign.h qnetworksettingsforeign.cpp
+ LIBRARIES
+ Qt::Core
+ Qt::Qml
+ Qt::NetworkSettings
+)
diff --git a/src/imports/networksettings/plugin.cpp b/src/networksettingsqml/qnetworksettingsforeign.cpp
index e4d6cee..e0d73c0 100644
--- a/src/imports/networksettings/plugin.cpp
+++ b/src/networksettingsqml/qnetworksettingsforeign.cpp
@@ -26,18 +26,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "plugin.h"
-#include <qnetworksettings.h>
-#include <qnetworksettingsmanager.h>
-#include <qnetworksettingsservice.h>
-#include <qnetworksettingsuseragent.h>
-#include <qnetworksettingsservicemodel.h>
-#include <qnetworksettingsinterface.h>
-#include <qnetworksettingsinterfacemodel.h>
-
-#include <qqml.h>
-#include <QQmlEngine>
-#include <QQmlContext>
+#include "qnetworksettingsforeign.h"
/*!
\qmlmodule QtDeviceUtilities.NetworkSettings
@@ -80,7 +69,9 @@
\qmlproperty model NetworkSettingsManager::services
\readonly
- Holds the service model.
+ Holds the service model. A delegate in a view that uses
+ the \e services model can access the NetworkService
+ item with the \e entry role.
The services list in the model can be controlled with the
\c type property, and NetworkService items can be retrieved
@@ -110,7 +101,7 @@
Holds the interface model. A delegate in a view that uses
the \e interfaces model can access the NetworkInterface
- item with the \e dataModel role.
+ item with the \e entry role.
\sa NetworkInterface
*/
@@ -160,32 +151,3 @@
This signal is emitted when the connection failed due to invalid user credentials.
*/
-
-QT_BEGIN_NAMESPACE
-
-template <typename T>
-QObject *instance(QQmlEngine *engine, QJSEngine *) {
- T *t = new T(engine);
- t->setObjectName(T::staticMetaObject.className());
- return t;
-}
-
-void NetworkSettingsQmlPlugin::registerTypes(const char *uri)
-{
- Q_ASSERT(QLatin1String(uri) == QLatin1String("QtDeviceUtilities.NetworkSettings"));
- qmlRegisterUncreatableType<QNetworkSettingsService>(uri, 1, 0, "NetworkService", "Cannot be instantiated directly.");
- qmlRegisterUncreatableType<QNetworkSettingsInterface>(uri, 1, 0, "NetworkInterface", "Cannot be instantiated directly.");
- qmlRegisterUncreatableType<QNetworkSettingsIPv4>(uri, 1, 0, "NetworkSettingsIPv4", "Cannot be instantiated directly.");
- qmlRegisterUncreatableType<QNetworkSettingsIPv6>(uri, 1, 0, "NetworkSettingsIPv6", "Cannot be instantiated directly.");
- qmlRegisterUncreatableType<QNetworkSettingsProxy>(uri, 1, 0, "NetworkSettingsProxy", "Cannot be instantiated directly.");
- qmlRegisterUncreatableType<QNetworkSettingsType>(uri, 1, 0, "NetworkSettingsType", "Cannot be instantiated directly.");
- qmlRegisterUncreatableType<QNetworkSettingsState>(uri, 1, 0, "NetworkSettingsState", "Cannot be instantiated directly.");
-
- qRegisterMetaType<QNetworkSettingsUserAgent*>("QNetworkSettingsUserAgent*");
- qRegisterMetaType<QNetworkSettingsServiceFilter*>("QNetworkSettingsServiceFilter*");
- qRegisterMetaType<QNetworkSettingsInterfaceModel*>("QNetworkSettingsInterfaceModel*");
-
- qmlRegisterSingletonType<QNetworkSettingsManager>(uri, 2, 0, "NetworkSettingsManager", &instance<QNetworkSettingsManager>);
-}
-
-QT_END_NAMESPACE
diff --git a/src/networksettingsqml/qnetworksettingsforeign.h b/src/networksettingsqml/qnetworksettingsforeign.h
new file mode 100644
index 0000000..ff9ec57
--- /dev/null
+++ b/src/networksettingsqml/qnetworksettingsforeign.h
@@ -0,0 +1,121 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+#ifndef NETWORKSETTINGSPLUGIN_PLUGIN_H
+#define NETWORKSETTINGSPLUGIN_PLUGIN_H
+
+#include <QtQml/qqml.h>
+#include <QtNetworkSettings/QtNetworkSettings>
+
+QT_BEGIN_NAMESPACE
+
+struct NetworkSettingsServiceForeign
+{
+ Q_GADGET
+ QML_FOREIGN(QNetworkSettingsService)
+ QML_NAMED_ELEMENT(NetworkService)
+ QML_UNCREATABLE("Cannot be instantiated directly.")
+ QML_ADDED_IN_VERSION(1, 0)
+};
+
+struct NetworkSettingsInterfaceForeign
+{
+ Q_GADGET
+ QML_FOREIGN(QNetworkSettingsInterface)
+ QML_NAMED_ELEMENT(NetworkInterface)
+ QML_UNCREATABLE("Cannot be instantiated directly.")
+ QML_ADDED_IN_VERSION(1, 0)
+};
+
+struct NetworkSettingsIPv4Foreign
+{
+ Q_GADGET
+ QML_FOREIGN(QNetworkSettingsIPv4)
+ QML_NAMED_ELEMENT(NetworkSettingsIPv4)
+ QML_UNCREATABLE("Cannot be instantiated directly.")
+ QML_ADDED_IN_VERSION(1, 0)
+};
+
+struct NetworkSettingsIPv6Foreign
+{
+ Q_GADGET
+ QML_FOREIGN(QNetworkSettingsIPv6)
+ QML_NAMED_ELEMENT(NetworkSettingsIPv6)
+ QML_UNCREATABLE("Cannot be instantiated directly.")
+ QML_ADDED_IN_VERSION(1, 0)
+};
+
+struct NetworkSettingsProxyForeign
+{
+ Q_GADGET
+ QML_FOREIGN(QNetworkSettingsProxy)
+ QML_NAMED_ELEMENT(NetworkSettingsProxy)
+ QML_UNCREATABLE("Cannot be instantiated directly.")
+ QML_ADDED_IN_VERSION(1, 0)
+};
+
+struct NetworkSettingsWirelessForeign
+{
+ Q_GADGET
+ QML_FOREIGN(QNetworkSettingsWireless)
+ QML_NAMED_ELEMENT(NetworkSettingsWireless)
+ QML_UNCREATABLE("Cannot be instantiated directly.")
+ QML_ADDED_IN_VERSION(1, 0)
+};
+
+struct NetworkSettingsTypeForeign
+{
+ Q_GADGET
+ QML_FOREIGN(QNetworkSettingsType)
+ QML_NAMED_ELEMENT(NetworkSettingsType)
+ QML_UNCREATABLE("Cannot be instantiated directly.")
+ QML_ADDED_IN_VERSION(1, 0)
+};
+
+struct NetworkSettingsStateForeign
+{
+ Q_GADGET
+ QML_FOREIGN(QNetworkSettingsState)
+ QML_NAMED_ELEMENT(NetworkSettingsState)
+ QML_UNCREATABLE("Cannot be instantiated directly.")
+ QML_ADDED_IN_VERSION(1, 0)
+};
+
+class QNetworkSettingsManagerForeign
+{
+ Q_GADGET
+ QML_FOREIGN(QNetworkSettingsManager)
+ QML_NAMED_ELEMENT(NetworkSettingsManager)
+ QML_SINGLETON
+ QML_ADDED_IN_VERSION(2, 0)
+};
+
+QT_END_NAMESPACE
+
+#endif // NETWORKSETTINGSPLUGIN_PLUGIN_H
+
diff --git a/src/settingsui/AutoScroller.qml b/src/settingsui/AutoScroller.qml
deleted file mode 100644
index e1d5c27..0000000
--- a/src/settingsui/AutoScroller.qml
+++ /dev/null
@@ -1,106 +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
-import QtQuick.VirtualKeyboard
-
-Item {
-
- property var innerFlickable
- property var outerFlickable
- property var inputItem: InputContext.inputItem
-
- onInputItemChanged: {
- innerFlickable = null
- outerFlickable = null
- if (inputItem !== null) {
- var parent_ = inputItem.parent
- while (parent_) {
- if (parent_.maximumFlickVelocity) {
- if (innerFlickable) {
- outerFlickable = parent_
- break
- } else {
- innerFlickable = parent_
- }
- }
- parent_ = parent_.parent
- }
- delayedLoading.triggered()
- }
- }
-
- function ensureVisible(flickable) {
- if (Qt.inputMethod.visible && inputItem && flickable && flickable.visible && flickable.interactive) {
-
- var verticallyFlickable = (flickable.flickableDirection === Flickable.HorizontalAndVerticalFlick || flickable.flickableDirection === Flickable.VerticalFlick
- || (flickable.flickableDirection === Flickable.AutoFlickDirection && flickable.contentHeight > flickable.height))
- var horizontallyFlickable = (flickable.flickableDirection === Flickable.HorizontalAndVerticalFlick || flickable.flickableDirection === Flickable.HorizontalFlick
- || (flickable.flickableDirection === Flickable.AutoFlickDirection && flickable.contentWidth > flickable.width))
-
- if ((!verticallyFlickable && !horizontallyFlickable) || !inputItem.hasOwnProperty("cursorRectangle"))
- return
-
- var cursorRectangle = flickable.contentItem.mapFromItem(inputItem, inputItem.cursorRectangle.x, inputItem.cursorRectangle.y)
-
- var oldContentY = flickable.contentY
- if (verticallyFlickable) {
- var scrollMarginVertical = (flickable && flickable.scrollMarginVertical) ? flickable.scrollMarginVertical : 10
- if (flickable.contentY >= cursorRectangle.y - scrollMarginVertical)
- flickable.contentY = Math.max(0, cursorRectangle.y - scrollMarginVertical)
- else if (flickable.contentY + flickable.height <= cursorRectangle.y + inputItem.cursorRectangle.height + scrollMarginVertical)
- flickable.contentY = Math.min(flickable.contentHeight - flickable.height, cursorRectangle.y + inputItem.cursorRectangle.height - flickable.height + scrollMarginVertical)
- }
- if (horizontallyFlickable) {
- var scrollMarginHorizontal = (flickable && flickable.scrollMarginHorizontal) ? flickable.scrollMarginHorizontal : 10
- if (flickable.contentX >= cursorRectangle.x - scrollMarginHorizontal)
- flickable.contentX = Math.max(0, cursorRectangle.x - scrollMarginHorizontal)
- else if (flickable.contentX + flickable.width <= cursorRectangle.x + inputItem.cursorRectangle.width + scrollMarginHorizontal)
- flickable.contentX = Math.min(flickable.contentWidth - flickable.width, cursorRectangle.x + inputItem.cursorRectangle.width - flickable.width + scrollMarginHorizontal)
- }
- }
- }
- Timer {
- id: delayedLoading
- interval: 10
- onTriggered: {
- ensureVisible(innerFlickable)
- ensureVisible(outerFlickable)
- }
- }
- Connections {
- ignoreUnknownSignals: true
- target: inputItem && !Qt.inputMethod.animating ? Qt.inputMethod : null
- function onKeyboardRectangleChanged() { delayedLoading.triggered() }
- }
- Connections {
- ignoreUnknownSignals: true
- target: inputItem && inputItem.activeFocus ? inputItem : null
- function onCursorRectangleChanged() { delayedLoading.triggered() }
- }
-}
diff --git a/src/settingsui/CMakeLists.txt b/src/settingsui/CMakeLists.txt
deleted file mode 100644
index e7801db..0000000
--- a/src/settingsui/CMakeLists.txt
+++ /dev/null
@@ -1,88 +0,0 @@
-# Generated from settingsui.pro.
-
-#####################################################################
-## settingsui Binary:
-#####################################################################
-
-qt_add_executable(settingsui
- GUI
- SOURCES
- main.cpp
- PUBLIC_LIBRARIES
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-# Resources:
-set(settingsuiapp_resource_files
- "AutoScroller.qml"
- "ViewSettings.qml"
- "common/CustomSwitch.qml"
- "common/HandwritingModeButton.qml"
- "main.qml"
- "network/AddressListEntry.qml"
- "network/ComboBoxEntry.qml"
- "network/EditWiredSettings.qml"
- "network/IpAddressTextField.qml"
- "network/NetworkDetails.qml"
- "network/NetworkListView.qml"
- "network/NetworkSettings.qml"
- "network/PassphraseEnter.qml"
- "network/WifiSelectorDelegate.qml"
- "network/WifiSettings.qml"
- "network/WifiSignalMonitor.qml"
- "network/WiredSettings.qml"
- "settingsuiplugin/SettingsDelegate.qml"
- "settingsuiplugin/SettingsHeader.qml"
- "settingsuiplugin/SettingsTitleItem.qml"
- "settingsuiplugin/pluginMain.qml"
-)
-
-qt_add_resource(settingsui "settingsuiapp"
- PREFIX
- "/"
- FILES
- ${settingsuiapp_resource_files}
-)
-
-
-#### Keys ignored in scope 1:.:.:settingsui.pro:<TRUE>:
-# QML_IMPORT_PATH = <EMPTY>
-# TEMPLATE = "app"
-
-## Scopes:
-#####################################################################
-
-qt_extend_target(settingsui CONDITION static
- PUBLIC_LIBRARIES
- Qt::Svg
-)
-
-#### Keys ignored in scope 2:.:.:settingsui.pro:static:
-# QTPLUGIN = "qtvirtualkeyboardplugin"
-
-#### Keys ignored in scope 4:.:.:deployment.pri:android-no-sdk:
-# INSTALLS = "target"
-# target.path = "/data/user/qt"
-
-#### Keys ignored in scope 6:.:.:deployment.pri:ANDROID:
-# INSTALLS = "target"
-
-#### Keys ignored in scope 7:.:.:deployment.pri:TEST_architecture_arch STREQUAL i386:
-# target.path = "/libs/x86"
-
-#### Keys ignored in scope 9:.:.:deployment.pri:TEST_architecture_arch STREQUAL arm:
-# target.path = "/libs/armeabi-v7a"
-
-#### Keys ignored in scope 10:.:.:deployment.pri:else:
-# target.path = "/libs/armeabi"
-
-#### Keys ignored in scope 12:.:.:deployment.pri:UNIX:
-# INSTALLS = "target"
-
-#### Keys ignored in scope 14:.:.:deployment.pri:QNX:
-# target.path = "/tmp/$${TARGET}/bin"
-
-#### Keys ignored in scope 15:.:.:deployment.pri:else:
-# target.path = "$$[QT_INSTALL_BINS]"
diff --git a/src/settingsui/ViewSettings.qml b/src/settingsui/ViewSettings.qml
deleted file mode 100644
index 4f326cf..0000000
--- a/src/settingsui/ViewSettings.qml
+++ /dev/null
@@ -1,43 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $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
-
-Item {
- id: viewSettings
-
- property real pageMargin: 0.03 * Math.min(window.width, window.height)
- property real spacing: pageMargin * 0.5
- property string appFont: "TitilliumWeb"
- property string backgroundColor: "#09102b"
- property string borderColor: "#9d9faa"
- property string buttonGreenColor: "#41cd52"
- property string buttonGrayColor: "#9d9faa"
- property string buttonActiveColor: "#216729"
- property string scrollBarColor: "#41cd52"
-}
diff --git a/src/settingsui/common/CustomSwitch.qml b/src/settingsui/common/CustomSwitch.qml
deleted file mode 100644
index c552127..0000000
--- a/src/settingsui/common/CustomSwitch.qml
+++ /dev/null
@@ -1,120 +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
-import QtDeviceUtilities.QtButtonImageProvider
-import QtQuick.Controls
-
-Switch {
- id: control
-
- property alias indicatorWidth: indicatorImg.width
- property alias indicatorHeight: indicatorImg.height
-
- indicator: Image {
- id: indicatorImg
- width: 200
- height: 75
- sourceSize: Qt.size(width, height)
- anchors.horizontalCenter: control.horizontalCenter
- y: parent.height / 2 - height / 2
- source: "image://QtButton/10/#848895/transparent"
- Text {
- id: offText
- anchors.left: parent.left
- anchors.leftMargin: parent.width * 0.075
- anchors.verticalCenter: parent.verticalCenter
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- fontSizeMode: Text.Fit
- minimumPixelSize: 1
- font.pixelSize: parent.height * 0.55
- color: "#3b4155"
- text: "OFF"
- font.family: appFont
- }
- Text {
- id: onText
- anchors.right: parent.right
- anchors.rightMargin: parent.width * 0.1
- anchors.verticalCenter: parent.verticalCenter
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- fontSizeMode: Text.Fit
- minimumPixelSize: 1
- font.pixelSize: parent.height * 0.55
- color: "#3b4155"
- text: "ON"
- font.family: appFont
- }
-
- Binding {
- target: qtHandle
- property: "x"
- value: control.checked ? indicatorImg.width - qtHandle.width - indicatorImg.width * 0.025 : indicatorImg.width * 0.025
- when: !mousearea.drag.active
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: control.checked = !control.checked
- }
-
- QtButton {
- id: qtHandle
- anchors.verticalCenter: parent.verticalCenter
- width: parent.width * 0.475
- height: parent.height * 0.9
- fillColor: control.checked ? viewSettings.buttonGreenColor : viewSettings.buttonGrayColor
- text: control.checked ? "ON" : "OFF"
- borderColor: "transparent"
- Behavior on x {
- NumberAnimation { duration: 50 }
- }
-
- MouseArea {
- id: mousearea
- anchors.fill: parent
- drag.target: qtHandle
- drag.axis: Drag.XAxis
- drag.minimumX: indicatorImg.width * 0.005
- drag.maximumX: indicatorImg.width - width - indicatorImg.width * 0.005
-
- onClicked: control.checked = !control.checked
-
- onReleased: {
- if (qtHandle.x > indicatorImg.width / 5 ) {
- control.checked = true
- } else {
- control.checked = false
- }
- }
- }
- }
- }
-}
diff --git a/src/settingsui/common/CustomTableView.qml b/src/settingsui/common/CustomTableView.qml
deleted file mode 100644
index a5a7fe8..0000000
--- a/src/settingsui/common/CustomTableView.qml
+++ /dev/null
@@ -1,105 +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
-import QtQuick.Layouts
-import QtQuick.Controls
-
-ColumnLayout {
- id: root
-
- Layout.fillHeight: true
- Layout.fillWidth: true
-
- property var headerTexts: []
- property var roleNames: []
- property alias model: listView.model
- property alias localeIndex: listView.currentIndex
- signal clicked(int index)
-
- Timer { //A workaround to position the listView..
- interval: 250
- running: true
- onTriggered: listView.positionViewAtIndex(listView.currentIndex, ListView.Beginning)
- }
-
- ListView {
- id: listView
- Layout.fillHeight: true
- Layout.fillWidth: true
- clip: true
-
- onCurrentIndexChanged: {
- if (listView.model) {
- positionViewAtIndex(listView.currentIndex, ListView.beginning)
- }
- }
-
- ScrollBar.vertical: ScrollBar {
- contentItem: Rectangle {
- implicitWidth: listView.width * 0.0175
- implicitHeight: listView.height * 0.5
- color: viewSettings.scrollBarColor
- }
- }
-
- delegate: Item {
- id: delegateRectangle
- width: parent.width
- height: listView.height * 0.1
- property var delegateData: modelData
-
- Row {
- anchors.fill: parent
- anchors.leftMargin: 10
- spacing: 10
-
- Repeater {
- model: root.roleNames.length
-
- Text {
- width: parent.width / root.roleNames.length
- text: delegateData[root.roleNames[index]]
- anchors.verticalCenter: parent.verticalCenter
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: delegateRectangle.height * 0.5
- antialiasing: false
- smooth: false
- renderType: listView.moving ? Text.NativeRendering : Text.QtRendering
- color: listView.currentIndex == delegateRectangle.index ? viewSettings.buttonGreenColor : "white"
- font.family: appFont
- }
- }
- }
- MouseArea {
- anchors.fill: parent
- onClicked: root.clicked(index)
- }
- }
- }
-}
diff --git a/src/settingsui/common/HandwritingModeButton.qml b/src/settingsui/common/HandwritingModeButton.qml
deleted file mode 100644
index 8b47d2e..0000000
--- a/src/settingsui/common/HandwritingModeButton.qml
+++ /dev/null
@@ -1,164 +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
-
-Item {
- id: handwritingModeButton
- state: "unavailable"
- property bool floating
- property bool flipable
- readonly property real __minWidthHeight: Math.min(width, height)
-
- signal clicked()
- signal doubleClicked()
-
- Flipable {
- id: flipableImage
- anchors.fill: parent
-
- property bool flipped
-
- front: Image {
- sourceSize.width: handwritingModeButton.__minWidthHeight
- sourceSize.height: handwritingModeButton.__minWidthHeight
- smooth: false
- source: "qrc:/icons/FloatingButton_Unavailable.png"
- }
-
- back: Image {
- id: buttonImage
- sourceSize.width: handwritingModeButton.__minWidthHeight
- sourceSize.height: handwritingModeButton.__minWidthHeight
- smooth: false
- source: "qrc:/icons/FloatingButton_Available.png"
- }
-
- states: State {
- PropertyChanges { target: rotation; angle: 180 }
- when: flipableImage.flipped
- }
-
- transform: Rotation {
- id: rotation
- origin.x: flipableImage.width / 2
- origin.y: flipableImage.height / 2
- axis { x: 0; y: 1; z: 0 }
- angle: 0
- }
-
- transitions: Transition {
- enabled: handwritingModeButton.flipable
- NumberAnimation { target: rotation; property: "angle"; duration: 400 }
- }
- }
-
- states: [
- State {
- name: "available"
- PropertyChanges { target: flipableImage; flipped: true }
- },
- State {
- name: "active"
- PropertyChanges { target: flipableImage; flipped: true }
- PropertyChanges { target: buttonImage; source: "qrc:/icons/FloatingButton_Active.png" }
- }
- ]
-
- function snapHorizontal() {
- if (!floating)
- return
- if (mouseArea.drag.maximumX > mouseArea.drag.minimumX) {
- if (x + 20 >= mouseArea.drag.maximumX) {
- anchors.left = undefined
- anchors.right = parent.right
- } else if (x - 20 <= mouseArea.drag.minimumX) {
- anchors.right = undefined
- anchors.left = parent.left
- }
- }
- }
-
- function snapVertical() {
- if (!floating)
- return
- if (mouseArea.drag.maximumY > mouseArea.drag.minimumY) {
- if (y + 20 >= mouseArea.drag.maximumY) {
- anchors.top = undefined
- anchors.bottom = parent.bottom
- } else if (y - 20 <= mouseArea.drag.minimumY) {
- anchors.bottom = undefined
- anchors.top = parent.top
- }
- }
- }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- drag {
- target: handwritingModeButton.floating ? handwritingModeButton : undefined
- axis: Drag.XAxis | Drag.YAxis
- minimumX: 0
- maximumX: handwritingModeButton.parent.width - handwritingModeButton.width
- onMaximumXChanged: !mouseArea.drag.active && handwritingModeButton.snapHorizontal()
- minimumY: 0
- maximumY: handwritingModeButton.parent.height - handwritingModeButton.height
- onMaximumYChanged: !mouseArea.drag.active && handwritingModeButton.snapVertical()
- }
- onPressed: {
- if (!handwritingModeButton.floating)
- return
- handwritingModeButton.anchors.left = undefined
- handwritingModeButton.anchors.top = undefined
- handwritingModeButton.anchors.right = undefined
- handwritingModeButton.anchors.bottom = undefined
- }
- onReleased: {
- handwritingModeButton.snapHorizontal()
- handwritingModeButton.snapVertical()
- }
- onClicked: {
- handwritingModeButton.snapHorizontal()
- handwritingModeButton.snapVertical()
- clickTimer.restart()
- }
- onDoubleClicked: {
- clickTimer.stop()
- handwritingModeButton.snapHorizontal()
- handwritingModeButton.snapVertical()
- handwritingModeButton.doubleClicked()
- }
- Timer {
- id: clickTimer
- interval: Qt.styleHints ? Qt.styleHints.mouseDoubleClickInterval / 3 : 0
- repeat: false
- onTriggered: handwritingModeButton.clicked()
- }
- }
-}
diff --git a/src/settingsui/deployment.pri b/src/settingsui/deployment.pri
deleted file mode 100644
index 696c6f5..0000000
--- a/src/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 = $$[QT_INSTALL_BINS]
- }
- export(target.path)
- }
- INSTALLS += target
-}
-
-export(INSTALLS)
diff --git a/src/settingsui/main.cpp b/src/settingsui/main.cpp
deleted file mode 100644
index 8ebe695..0000000
--- a/src/settingsui/main.cpp
+++ /dev/null
@@ -1,42 +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$
-**
-****************************************************************************/
-#include <QGuiApplication>
-#include <QQmlApplicationEngine>
-
-int main(int argc, char *argv[])
-{
- qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));
-
- QGuiApplication app(argc, argv);
-
- QQmlApplicationEngine engine;
- engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
-
- return app.exec();
-}
diff --git a/src/settingsui/main.qml b/src/settingsui/main.qml
deleted file mode 100644
index c014923..0000000
--- a/src/settingsui/main.qml
+++ /dev/null
@@ -1,142 +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
-import QtQuick.Window
-import QtDeviceUtilities.SettingsUI
-import QtQuick.VirtualKeyboard
-import "common"
-
-Window {
- id: window
- visible: true
-
- property alias appFont: viewSettings.appFont
-
- ViewSettings {
- id: viewSettings
- }
-
- Item {
- id: root
- anchors.fill: parent
-
- SettingsUI {
- id: settingsUI
- anchors.fill: parent
- anchors.bottomMargin: parent.height - inputPanel.y
- }
-
- /* Handwriting input panel for full screen handwriting input.
-
- This component is an optional add-on for the InputPanel component, that
- is, its use does not affect the operation of the InputPanel component,
- but it also can not be used as a standalone component.
-
- The handwriting input panel is positioned to cover the entire area of
- application. The panel itself is transparent, but once it is active the
- user can draw handwriting on it.
- */
-
- HandwritingInputPanel {
- z: 79
- id: handwritingInputPanel
- anchors.fill: parent
- inputPanel: inputPanel
- Rectangle {
- z: -1
- anchors.fill: parent
- color: "black"
- opacity: 0.10
- }
- }
-
- /* Container area for the handwriting mode button.
-
- Handwriting mode button can be moved freely within the container area.
- In this example, a single click changes the handwriting mode and a
- double-click changes the availability of the full screen handwriting input.
- */
- Item {
- z: 89
- visible: handwritingInputPanel.enabled && Qt.inputMethod.visible
- anchors { left: parent.left; top: parent.top; right: parent.right; bottom: inputPanel.top; }
- HandwritingModeButton {
- id: handwritingModeButton
- anchors.top: parent.top
- anchors.right: parent.right
- anchors.margins: 10
- floating: true
- flipable: true
- width: 76
- height: width
- state: handwritingInputPanel.state
- onClicked: handwritingInputPanel.active = !handwritingInputPanel.active
- onDoubleClicked: handwritingInputPanel.available = !handwritingInputPanel.available
- }
- }
-
- /* Keyboard input panel.
- The keyboard is anchored to the bottom of the application.
- */
- InputPanel {
- id: inputPanel
- z: 99
- y: root.height
- anchors.left: root.left
- anchors.right: root.right
-
- states: State {
- name: "visible"
- /* The visibility of the InputPanel can be bound to the Qt.inputMethod.visible property,
- but then the handwriting input panel and the keyboard input panel can be visible
- at the same time. Here the visibility is bound to InputPanel.active property instead,
- which allows the handwriting panel to control the visibility when necessary.
- */
- when: inputPanel.active
- PropertyChanges {
- target: inputPanel
- y: root.height - inputPanel.height
- }
- }
- transitions: Transition {
- from: ""
- to: "visible"
- reversible: true
- ParallelAnimation {
- NumberAnimation {
- properties: "y"
- duration: 250
- easing.type: Easing.InOutQuad
- }
- }
- }
- AutoScroller {}
- }
- }
-}
diff --git a/src/settingsui/network/AddressListEntry.qml b/src/settingsui/network/AddressListEntry.qml
deleted file mode 100644
index 9701587..0000000
--- a/src/settingsui/network/AddressListEntry.qml
+++ /dev/null
@@ -1,99 +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
-import QtQuick.Layouts
-import QtQuick.Controls
-
-RowLayout {
- id: root
- spacing: 10
- property alias model: repeater.model
- property bool modified: false
- property alias title: label.text
-
- Label {
- id: label
- Layout.preferredWidth: content.titleWidth
- horizontalAlignment: Text.AlignRight
- Layout.alignment: Qt.AlignTop
- Layout.topMargin: 10
- }
- ColumnLayout {
- spacing: 10
- Layout.fillWidth: true
-
- Repeater {
- id: repeater
- visible: count > 0
- RowLayout {
- spacing: 10
- TextField {
- text: edit
- Layout.fillWidth: true
- onEditingFinished: {
- root.modified = true;
- edit = text;
- }
- }
- Button {
- Layout.preferredWidth: height
- text: "-"
- visible: repeater.count > 0
- onClicked: {
- root.modified = true;
- root.model.remove(index);
- }
- }
- Button {
- Layout.preferredWidth: height
- visible: index === repeater.count - 1
- text: "+"
- onClicked: root.model.append("")
-
- Layout.alignment: Qt.AlignRight
- }
- }
- }
- RowLayout {
- visible: repeater.count === 0
- spacing: 10
- TextField {
- id: nameServerEntryItem
- Layout.fillWidth: true
- text: ""
- onAccepted: root.model.append(text)
- }
- Button {
- Layout.preferredWidth: height
- text: "+"
- onClicked: nameServerEntryItem.accepted()
- }
- }
- }
-}
diff --git a/src/settingsui/network/ComboBoxEntry.qml b/src/settingsui/network/ComboBoxEntry.qml
deleted file mode 100644
index ce88964..0000000
--- a/src/settingsui/network/ComboBoxEntry.qml
+++ /dev/null
@@ -1,61 +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
-import QtQuick.Layouts
-import QtQuick.Controls
-
-RowLayout {
- id: root
- spacing: 10
- width: parent.width
-
- property alias title: label.text
- property alias currentIndex: cb.currentIndex
- property alias delegate: cb.delegate
- property alias textRole: cb.textRole
- property alias model: cb.model
- property alias count: cb.count
- property int titleWidth: -1
- signal activated(var index)
- signal highlighted(var index)
-
- Label {
- id: label
- Layout.preferredWidth: root.titleWidth
- horizontalAlignment: Text.AlignRight
- Layout.alignment: Qt.AlignVCenter
- }
- ComboBox {
- id: cb
- textRole: "text"
- Layout.fillWidth: true
- onActivated: root.activated(currentIndex)
- onHighlightedIndexChanged: root.highlighted(currentIndex)
- }
-}
diff --git a/src/settingsui/network/EditWiredSettings.qml b/src/settingsui/network/EditWiredSettings.qml
deleted file mode 100644
index a59da20..0000000
--- a/src/settingsui/network/EditWiredSettings.qml
+++ /dev/null
@@ -1,366 +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
-import QtQuick.Layouts
-import QtQuick.Controls
-import QtDeviceUtilities.NetworkSettings
-
-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: 20
- contentHeight: content.height
- contentWidth: width
-
- Column {
- id: content
- width: parent.width
- spacing: 10
- property int titleWidth: width * 0.382
- property int groupWidth: width - saveButton.width - 10
-
- //IPv4 Config
- GroupBox {
- width: content.groupWidth
- Layout.fillWidth: true
- title: qsTr("IPv4")
-
- ColumnLayout {
- anchors.fill: parent
-
- ComboBoxEntry {
- id: ipv4Method
- title: qsTr("Connection method:")
- titleWidth: content.titleWidth
- model: ListModel {
- id: methodsModel
-
- ListElement {
- text: "DHCP"
- method: NetworkSettingsIPv4.Dhcp
- }
- ListElement {
- text: "Manual"
- method: NetworkSettingsIPv4.Manual
- }
- ListElement {
- text: "Off"
- method: NetworkSettingsIPv4.Off
- }
- }
- onCurrentIndexChanged: {
- ipv4Changed = true;
- service.ipv4.method = model.get(currentIndex).method;
- }
- }
-
- GridLayout {
- columnSpacing: 10
- rows: 3
- columns: 2
- visible: service.ipv4.method !== NetworkSettingsIPv4.Off
- width: parent.width
-
- Label {
- text: qsTr("Address:")
- Layout.preferredWidth: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
- IpAddressTextField {
- id: ipv4Address
- text: service.ipv4.address
- onTextChanged: ipv4Changed = true;
- onAccepted: if (text.length > 0) service.ipv4.address = text
- enabled: service.ipv4.method === NetworkSettingsIPv4.Manual
- }
- Label {
- text: qsTr("Mask:")
- Layout.preferredWidth: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
- IpAddressTextField {
- id: ipv4Mask
- text: service.ipv4.mask
- onTextChanged: ipv4Changed = true;
- onAccepted: if (text.length > 0) service.ipv4.mask = text
- enabled: service.ipv4.method === NetworkSettingsIPv4.Manual
- }
- Label {
- text: qsTr("Router:")
- Layout.preferredWidth: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
- IpAddressTextField {
- id: ipv4Gateway
- text: service.ipv4.gateway
- onTextChanged: ipv4Changed = true
- onAccepted: if (text.length > 0) service.ipv4.gateway = text
- enabled: service.ipv4.method === NetworkSettingsIPv4.Manual
- }
- }
- }
- }
-
- //IPv6 Config
- GroupBox {
- width: content.groupWidth
- Layout.fillWidth: true
- title: qsTr("IPv6")
-
- ColumnLayout {
- anchors.fill: parent
-
- ComboBoxEntry {
- id: ipv6Method
- title: qsTr("Connection method:")
- titleWidth: content.titleWidth
- model: ListModel {
- id: ipv6methodsmodel
-
- ListElement {
- text: qsTr("Auto")
- method: NetworkSettingsIPv6.Auto
- }
- ListElement {
- text: qsTr("Manual")
- method: NetworkSettingsIPv6.Manual
- }
- ListElement {
- text: qsTr("Off")
- method: NetworkSettingsIPv6.Off
- }
- }
-
- onCurrentIndexChanged: {
- ipv6Changed = true;
- service.ipv6.method = model.get(currentIndex).method;
- }
- }
- GridLayout {
- columnSpacing: 10
- rows: 3
- columns: 2
- visible: service.ipv6.method !== NetworkSettingsIPv6.Off
-
- Label {
- text: qsTr("Address:")
- Layout.preferredWidth: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
- TextField {
- id: ipv6Address
- text: service.ipv6.address
- Layout.fillWidth: true
- onTextChanged: ipv6Changed = true;
- onAccepted: if (text.length > 0) service.ipv6.address = text
- enabled: service.ipv6.method === NetworkSettingsIPv6.Manual
- }
- Label {
- text: qsTr("Router:")
- Layout.preferredWidth: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
- TextField {
- id: ipv6Gateway
- text: service.ipv6.gateway
- Layout.fillWidth: true
- onTextChanged: ipv6Changed = true;
- onAccepted: if (text.length > 0) service.ipv4.gateway = text
- enabled: service.ipv6.method === NetworkSettingsIPv6.Manual
- }
- Label {
- text: qsTr("Prefix length:")
- Layout.preferredWidth: content.titleWidth
- horizontalAlignment: Text.AlignRight
- }
- TextField {
- id: ipv6PrefixLength
- text: service.ipv6.prefixLength
- Layout.fillWidth: true
- validator: IntValidator { bottom: 0; top: 255 }
- onTextChanged: ipv6Changed = true
- onAccepted: if (text.length > 0) service.ipv6.prefixLength = parseInt(text)
- enabled: service.ipv6.method === NetworkSettingsIPv6.Manual
- }
- }
- }
- }
- GroupBox {
- width: content.groupWidth
- Layout.fillWidth: true
- title: qsTr("Name servers")
-
- ColumnLayout {
- anchors.fill: parent
- AddressListEntry {
- title: qsTr("Address:")
- model: service.nameservers
- modified: nameserversChanged
- }
- }
- }
- GroupBox {
- width: content.groupWidth
- Layout.fillWidth: true
- title: qsTr("Domains")
-
- ColumnLayout {
- anchors.fill: parent
- AddressListEntry {
- title: qsTr("Address:")
- model: service.domains
- modified: domainsChanged
- }
- }
- }
- GroupBox {
- width: content.groupWidth
- Layout.fillWidth: true
- title: qsTr("Proxy Settings")
-
- ColumnLayout {
- id: proxyLayout
- width: parent.width
-
- ComboBoxEntry {
- title: qsTr("Configuration:")
- titleWidth: content.titleWidth
- model: ListModel {
- id: proxyMethodModel
-
- ListElement {
- text: qsTr("Direct")
- method: NetworkSettingsProxy.Direct
- }
- ListElement {
- text: qsTr("Auto")
- method: NetworkSettingsProxy.Auto
- }
- ListElement {
- text: qsTr("Manual")
- method: NetworkSettingsProxy.Manual
- }
- }
- Component.onCompleted: currentIndex = service.proxy.method
-
- onCurrentIndexChanged: {
- proxyChanged = true;
- service.proxy.method = model.get(currentIndex).method;
- }
- }
- RowLayout {
- spacing: 10
- visible: service.proxy.method !== NetworkSettingsProxy.Direct
-
- Label {
- text: service.proxy.method === NetworkSettingsProxy.Manual ? qsTr("Proxy address:") : qsTr("Configuration URL:")
- Layout.preferredWidth: content.titleWidth
- horizontalAlignment: Text.AlignRight
- Layout.alignment: Qt.AlignVCenter
- elide: Label.ElideRight
- }
- TextField {
- id: proxyUrl
- text: service.proxy.url
- Layout.fillWidth: true
- onTextChanged: proxyChanged = true;
- onAccepted: service.proxy.url = text;
- }
- }
- AddressListEntry {
- model: service.proxy.excludes
- modified: proxyChanged
- title: qsTr("No proxy for:")
- visible: service.proxy.method === NetworkSettingsProxy.Manual
- }
- }
- }
- }
- }
- Button {
- id: saveButton
- anchors.right: parent.right
- anchors.top: parent.top
- anchors.margins: 20
- 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.setupNetworkSettingsProxy();
- }
- stackView.pop();
- }
- }
- onServiceChanged: {
- ipv4Method.currentIndex = service.ipv4.method
- ipv6Method.currentIndex = service.ipv6.method
- }
-}
diff --git a/src/settingsui/network/IpAddressTextField.qml b/src/settingsui/network/IpAddressTextField.qml
deleted file mode 100644
index 748e402..0000000
--- a/src/settingsui/network/IpAddressTextField.qml
+++ /dev/null
@@ -1,36 +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
-import QtQuick.Layouts
-import QtQuick.Controls
-
-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/settingsui/network/NetworkListView.qml b/src/settingsui/network/NetworkListView.qml
deleted file mode 100644
index 7c35433..0000000
--- a/src/settingsui/network/NetworkListView.qml
+++ /dev/null
@@ -1,171 +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
-import QtQml
-import QtDeviceUtilities.NetworkSettings
-import QtDeviceUtilities.QtButtonImageProvider
-import QtQuick.Controls
-
-ListView {
- id: list
- clip: true
- property var connectingService: null
- property bool retryConnectAfterIdle: false
- function connectBySsid() {
- passphraseEnter.showSsid = true
- passphraseEnter.visible = true
- }
-
- Component.onCompleted: {
- NetworkSettingsManager.services.type = NetworkSettingsType.Unknown;
- }
- model: NetworkSettingsManager.services
-
- delegate: Item {
- id: networkDelegate
- width: list.width
- height: list.height * 0.15
- Column {
- anchors.left: parent.left
- anchors.verticalCenter: parent.verticalCenter
- width: parent.width * 0.5
- Text {
- id: networkName
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: pluginMain.subTitleFontSize
- font.family: appFont
- color: connected ? viewSettings.buttonGreenColor : "white"
- text: name
- }
- Row {
- id: ipRow
- height: networkDelegate.height * 0.275 * opacity
- spacing: networkDelegate.width * 0.0075
- Item {
- width: pluginMain.margin
- height: 1
- }
- Text {
- id: ipAddressLabel
- height: parent.height
- anchors.verticalCenter: parent.verticalCenter
- text: qsTr("IP Address:")
- color: connected ? viewSettings.buttonGreenColor : "white"
- font.pixelSize: pluginMain.valueFontSize
- font.family: appFont
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignLeft
- }
- Text {
- id: ipAddress
- width: root.width * 0.15
- height: parent.height
- anchors.verticalCenter: parent.verticalCenter
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignLeft
- color: connected ? viewSettings.buttonGreenColor : "white"
- text: connected ? NetworkSettingsManager.services.itemFromRow(index).ipv4.address
- : (NetworkSettingsManager.services.itemFromRow(index).state === NetworkSettingsState.Idle) ?
- qsTr("Not connected") : qsTr("Connecting")
- font.pixelSize: pluginMain.valueFontSize
- font.family: appFont
- font.styleName: connected ? "SemiBold" : "Regular"
- }
- }
- }
- QtButton {
- id: connectButton
- anchors.right: parent.right
- anchors.verticalCenter: parent.verticalCenter
- fillColor: connected ? viewSettings.buttonGrayColor : viewSettings.buttonGreenColor
- borderColor: "transparent"
- text: connected ? qsTr("DISCONNECT") : qsTr("CONNECT")
- height: pluginMain.buttonHeight
- onClicked: {
- if (connected) {
- NetworkSettingsManager.services.itemFromRow(index).disconnectService();
- } else {
- list.connectingService = NetworkSettingsManager.services.itemFromRow(index)
- if (list.connectingService) {
- passphraseEnter.extraInfo = "";
- list.connectingService.connectService();
- list.connectingService.stateChanged.connect(connectingServiceStateChange);
- }
- }
- }
- }
- Rectangle {
- id: delegateBottom
- width: networkDelegate.width
- color: viewSettings.borderColor
- height: 2
- anchors.bottom: networkDelegate.bottom
- anchors.horizontalCenter: networkDelegate.horizontalCenter
- }
- Behavior on height { NumberAnimation { duration: 200} }
-
- }
-
- Connections {
- target: NetworkSettingsManager.userAgent
- function onShowUserCredentialsInput() {
- passphraseEnter.visible = true;
- }
- }
-
- // Popup for entering passphrase
- PassphraseEnter {
- id: passphraseEnter
- parent: root
- visible: false
- }
-
- function connectingServiceStateChange() {
- if (connectingService !== null) {
- if (connectingService.state === NetworkSettingsState.Failure) {
- // If authentication failed, request connection again. That will
- // initiate new passphrase request.
- retryConnectAfterIdle = true
- } else if (connectingService.state === NetworkSettingsState.Ready) {
- // If connection succeeded, we no longer have service connecting
- connectingService = null;
- retryConnectAfterIdle = false;
- } else if (connectingService.state === NetworkSettingsState.Idle) {
- if (retryConnectAfterIdle) {
- passphraseEnter.extraInfo = qsTr("Invalid passphrase");
- connectingService.connectService();
- }
- retryConnectAfterIdle = false;
- }
- }
- }
-
- focus: true
-}
diff --git a/src/settingsui/network/NetworkSettings.qml b/src/settingsui/network/NetworkSettings.qml
deleted file mode 100644
index a0555f4..0000000
--- a/src/settingsui/network/NetworkSettings.qml
+++ /dev/null
@@ -1,134 +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
-import QtQuick.Layouts
-import QtQuick.Controls
-import QtDeviceUtilities.NetworkSettings
-import QtDeviceUtilities.QtButtonImageProvider
-import "../common"
-
-Item {
- id: networkSettingsRoot
- property string title: qsTr("Network Settings")
- anchors.fill: parent
-
- Text {
- id: wlanText
- text: qsTr("WLAN")
- font.pixelSize: pluginMain.subTitleFontSize
- font.family: appFont
- font.styleName: "SemiBold"
- color: "white"
- anchors.top: networkSettingsRoot.top
- anchors.left: parent.left
- }
- CustomSwitch {
- id: wifiSwitch
- anchors.top: wlanText.bottom
- anchors.left: wlanText.left
- height: pluginMain.buttonHeight
- indicatorWidth: pluginMain.buttonWidth
- indicatorHeight: pluginMain.buttonHeight
- property bool wiFiAvailable: NetworkSettingsManager.interface(NetworkSettingsType.Wifi, 0) !== null
- enabled: wiFiAvailable && !wifiSwitchTimer.running
- onCheckedChanged: {
- // Power on/off all WiFi interfaces
- for (var i = 0; NetworkSettingsManager.interface(NetworkSettingsType.Wifi, i) !== null; i++) {
- NetworkSettingsManager.interface(NetworkSettingsType.Wifi, i).powered = checked
- wifiSwitchTimer.start()
- }
- }
- Component.onCompleted: {
- // If any of the WiFi interfaces is powered on, switch is checked
- var checkedStatus = false;
- for (var i = 0; NetworkSettingsManager.interface(NetworkSettingsType.Wifi, i) !== null; i++) {
- if (NetworkSettingsManager.interface(NetworkSettingsType.Wifi, i).powered) {
- checkedStatus = true;
- break;
- }
- }
- checked = checkedStatus;
- }
-
- // At least 1s between switching on/off
- Timer {
- id: wifiSwitchTimer
- interval: 1000
- running: false
- }
- }
- QtButton {
- id: manualConnect
- anchors.top: wlanText.bottom
- anchors.left: wifiSwitch.right
- anchors.right: manualDisconnect.left
- anchors.rightMargin: 10
- enabled: wifiSwitch.checked
- fillColor: enabled ? viewSettings.buttonGreenColor : viewSettings.buttonGrayColor
- borderColor: "transparent"
- height: pluginMain.buttonHeight
- text: qsTr("MANUAL CONNECT")
- onClicked: {
- networkList.connectBySsid()
- }
- }
- QtButton {
- id: manualDisconnect
- anchors.top: wlanText.bottom
- anchors.right: parent.right
- enabled: NetworkSettingsManager.currentWifiConnection
- fillColor: enabled ? viewSettings.buttonGreenColor : viewSettings.buttonGrayColor
- borderColor: "transparent"
- height: pluginMain.buttonHeight
- text: qsTr("DISCONNECT")
- onClicked: {
- if (NetworkSettingsManager.currentWifiConnection) {
- NetworkSettingsManager.currentWifiConnection.disconnectService();
- }
- }
- }
- Text {
- id: networkListTextItem
- text: qsTr("Network list:")
- font.pixelSize: pluginMain.subTitleFontSize
- font.family: appFont
- font.styleName: "SemiBold"
- color: "white"
- anchors.top: wifiSwitch.bottom
- anchors.topMargin: 10
- }
- NetworkListView {
- id: networkList
- anchors.top: networkListTextItem.bottom
- anchors.left: networkListTextItem.left
- width: networkSettingsRoot.width
- height: networkSettingsRoot.height
- }
-}
-
diff --git a/src/settingsui/network/PassphraseEnter.qml b/src/settingsui/network/PassphraseEnter.qml
deleted file mode 100644
index 5d3167c..0000000
--- a/src/settingsui/network/PassphraseEnter.qml
+++ /dev/null
@@ -1,137 +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
-import QtQuick.Controls
-import QtDeviceUtilities.QtButtonImageProvider
-import QtDeviceUtilities.NetworkSettings
-
-Rectangle {
- id: passphrasePopup
- width: root.width
- height: root.height
- color: viewSettings.backgroundColor
- opacity: 0.9
- property string extraInfo: ""
- property bool showSsid: false
-
- Rectangle {
- id: frame
- color: viewSettings.backgroundColor
- border.color: viewSettings.borderColor
- border.width: 3
- anchors.centerIn: parent
- width: passphraseColumn.width * 1.1
- height: passphraseColumn.height * 1.1
-
- Column {
- id: passphraseColumn
- anchors.centerIn: parent
- spacing: viewSettings.spacing
-
- Text {
- visible: showSsid
- font.pixelSize: pluginMain.subTitleFontSize
- font.family: appFont
- color: "white"
- text: qsTr("Enter SSID")
- }
-
- TextField {
- id: ssidField
- visible: showSsid
- width: root.width * 0.4
- height: root.height * 0.075
- color: "white"
- background: Rectangle{
- color: "transparent"
- border.color: ssidField.focus ? viewSettings.buttonGreenColor : viewSettings.buttonGrayColor
- border.width: ssidField.focus ? width * 0.01 : 2
- }
- }
-
- Text {
- font.pixelSize: pluginMain.subTitleFontSize
- font.family: appFont
- color: "white"
- text: qsTr("Enter Passphrase")
- }
-
- Text {
- font.pixelSize: pluginMain.valueFontSize
- font.family: appFont
- color: "red"
- text: extraInfo
- visible: (extraInfo !== "")
- }
-
- TextField {
- id: passField
- width: root.width * 0.4
- height: root.height * 0.075
- color: "white"
- echoMode: TextInput.Password
- background: Rectangle{
- color: "transparent"
- border.color: passField.focus ? viewSettings.buttonGreenColor : viewSettings.buttonGrayColor
- border.width: passField.focus ? width * 0.01 : 2
- }
- }
-
- Row {
- spacing: parent.width * 0.025
- QtButton{
- id: setButton
- text: qsTr("SET")
- onClicked: {
- if (showSsid) {
- NetworkSettingsManager.connectBySsid(ssidField.text, passField.text)
- showSsid = false
- } else {
- NetworkSettingsManager.userAgent.setPassphrase(passField.text)
- }
- passphrasePopup.visible = false;
- }
- }
- QtButton {
- id: cancelButton
- text: qsTr("CANCEL")
- borderColor: "transparent"
- fillColor: viewSettings.buttonGrayColor
- onClicked: {
- if (!showSsid) {
- NetworkSettingsManager.userAgent.cancelInput()
- }
- showSsid = false
- passphrasePopup.visible = false;
- }
- }
- }
- }
- }
-}
diff --git a/src/settingsui/network/WifiSelectorDelegate.qml b/src/settingsui/network/WifiSelectorDelegate.qml
deleted file mode 100644
index 3c462c5..0000000
--- a/src/settingsui/network/WifiSelectorDelegate.qml
+++ /dev/null
@@ -1,62 +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
-import QtQuick.Layouts
-import QtQuick.Controls
-import QtDeviceUtilities.NetworkSettings
-
-ItemDelegate {
- id: root
- autoExclusive: true
- property bool connect: connected
- contentItem: Item {
- width: root.width
-
- Label {
- id: text
- leftPadding: root.spacing
- anchors.left: parent.left
- anchors.top:parent.top
- anchors.right: signalMonitor.left
- anchors.bottom:parent.bottom
- elide: Text.ElideRight
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
- text: modelData["name"]
- }
- WifiSignalMonitor {
- id: signalMonitor
- anchors.right: parent.right
- height: parent.height
- width: height
- signalStrength: modelData.wirelessConfig["signalStrength"]
- connected: connected
- }
- }
-}
diff --git a/src/settingsui/network/WifiSettings.qml b/src/settingsui/network/WifiSettings.qml
deleted file mode 100644
index 0286483..0000000
--- a/src/settingsui/network/WifiSettings.qml
+++ /dev/null
@@ -1,251 +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
-import QtQuick.Layouts
-import QtQuick.Controls
-import QtDeviceUtilities.NetworkSettings
-
-Item {
- id: root
- anchors.fill: parent
- Component.onCompleted: NetworkSettingsManager.services.type = NetworkSettingsType.Wifi;
- property bool connecting: false
-
- Flickable {
- anchors.fill: parent
- contentHeight: content.height
- contentWidth: width
-
- GroupBox {
- title: qsTr("Wireless Settings")
- width: parent.width
-
- ColumnLayout {
- id: content
- spacing: 20
- width: parent.width
-
- RowLayout {
- spacing: 10
- id: enableSwitch
- width: parent.width
-
- Label {
- Layout.preferredWidth: root.width * 0.382
- Layout.alignment: Qt.AlignVCenter
- horizontalAlignment: Text.AlignRight
- text: selectedInterface.powered ? qsTr("Wi-Fi ON") : qsTr("Wi-Fi OFF")
- }
- Switch {
- checked: selectedInterface.powered
- onCheckedChanged: {
- selectedInterface.powered = checked
- root.connecting = false
- connectView.visible = false
- }
- }
- }
- RowLayout {
- spacing: 10
- width: parent.width
-
- visible: selectedInterface.powered && networkSelection.count > 0
- Label {
- Layout.preferredWidth: root.width * 0.382
- text: qsTr("Current network")
- horizontalAlignment: Text.AlignRight
- Layout.alignment: Qt.AlignVCenter
-
- }
- ComboBoxEntry {
- id: networkSelection
- model: NetworkSettingsManager.services
-
- textRole: "name"
- Layout.fillWidth: true
- onActivated: {
- if (index >= 0) {
- connectView.visible = false
-
- var service = model.itemFromRow(index)
- if (service) {
- root.connecting = true
- service.connectService();
- }
- }
- }
-
- onCountChanged: {
- if (count === 0) {
- root.connecting = false
- connectView.visible = false
- }
- }
-
- Component.onCompleted: {
- networkSelection.currentIndex = model.activeRow()
- }
-
- delegate: WifiSelectorDelegate {
- width: networkSelection.width
- onConnectChanged: if (connect) networkSelection.currentIndex = index
- }
- }
- }
-
- Row {
- id: infoRow
- spacing: 10
- width: parent.width
- visible: selectedInterface.powered && selectedInterface.state !== NetworkSettingsState.Online
- Label {
- id: scanningText
- text: {
- if (networkSelection.count == 0)
- return qsTr("Searching for Wi-Fi networks...")
- else if (root.connecting)
- return qsTr("Connecting to the network...")
- else
- return ""
- }
- horizontalAlignment: Text.AlignLeft
- }
- WifiSignalMonitor {
- id: scanningIcon
- scanning: true
- visible: scanningText.text !== ""
- height: scanningText.height
- width: height
- }
- }
-
- GroupBox {
- id: connectView
- title: qsTr("Enter a passphrase")
- visible: false
- Layout.fillWidth: true
- ColumnLayout {
- width: parent.width
-
- RowLayout {
- id: errorView
- visible: text.text !== ""
- spacing: 10
- property alias text: text.text
-
- Image {
- source: "../icons/Alert_yellow_1x.png"
- Layout.alignment: Qt.AlignVCenter
- }
- Text {
- id: text
- color: "#face20"
- text: ""
- Layout.alignment: Qt.AlignVCenter
- }
- }
- RowLayout {
- spacing: 10
- width: parent.width
-
- Label {
- text: qsTr("Passphrase:")
- horizontalAlignment: Text.AlignRight
- Layout.preferredWidth: root.width * 0.382
- Layout.alignment: Qt.AlignVCenter
- }
- TextField {
- id: passphrase
- text: ""
- echoMode: TextInput.Password
- inputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhNoAutoUppercase | Qt.ImhPreferLowercase | Qt.ImhSensitiveData
- Layout.alignment: Qt.AlignVCenter
- Layout.fillWidth: true
- }
- }
- RowLayout {
- spacing: 10
-
- Button {
- text: qsTr("Connect")
- onClicked: {
- connectView.visible = false
- NetworkSettingsManager.userAgent.setPassphrase(passphrase.text)
- if (networkSelection.currentIndex != -1) {
- NetworkSettingsManager.services.itemFromRow(networkSelection.currentIndex).connectService();
- }
- }
- }
- Button {
- text: qsTr("Cancel")
- onClicked: {
- networkSelection.currentIndex = -1
- connectView.visible = false
- }
- }
- }
- }
- }
- ColumnLayout {
- spacing: parent.spacing
- width: parent.width
- visible: selectedInterface.state === NetworkSettingsState.Online ||
- selectedInterface.state === NetworkSettingsState.Ready
- Label {
- text: qsTr("IP Address: ") + NetworkSettingsManager.services.itemFromRow(networkSelection.currentIndex).ipv4.address
- }
- Button {
- id: disconnect
- text: qsTr("Disconnect")
- onClicked: {
- NetworkSettingsManager.services.itemFromRow(networkSelection.currentIndex).disconnectService();
- networkSelection.currentIndex = -1;
- root.connecting = false
- }
- }
- }
- }
- Connections {
- target: NetworkSettingsManager.userAgent
- function onShowUserCredentialsInput() {
- connectView.visible = true
- root.connecting = false
- }
- function onError() {
- errorView.visible = true
- connectView.visible = true
- root.connecting = false
- if (networkSelection.currentIndex != -1) {
- NetworkSettingsManager.services.itemFromRow(networkSelection.currentIndex).removeService();
- }
- }
- }
- }
- }
-}
diff --git a/src/settingsui/network/WifiSignalMonitor.qml b/src/settingsui/network/WifiSignalMonitor.qml
deleted file mode 100644
index 25e4aa4..0000000
--- a/src/settingsui/network/WifiSignalMonitor.qml
+++ /dev/null
@@ -1,84 +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
-
-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 {
- id: sprite
- property int currentFrame: 0
- anchors.fill: parent
- source: "../icons/Wifi_lightgray_2x.png"
- clip: true
-
- Timer {
- id: scanningTimer
- running: scanning
- interval: 250
- repeat: true
- onTriggered: {
- if (sprite.currentFrame < 4)
- sprite.currentFrame++
- else
- sprite.currentFrame = 0
- }
- }
-
- Image {
- height: parent.height
- width: parent.width * 4
- source: "../icons/WifiAnim_black_2x.png"
- x: -parent.currentFrame * width / 4
- }
- }
-}
diff --git a/src/settingsui/network/WiredSettings.qml b/src/settingsui/network/WiredSettings.qml
deleted file mode 100644
index f5d3a8f..0000000
--- a/src/settingsui/network/WiredSettings.qml
+++ /dev/null
@@ -1,191 +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
-import QtQuick.Layouts
-import QtQuick.Controls
-import QtDeviceUtilities.NetworkSettings
-
-Item {
- id: root
- anchors.fill: parent
- property bool editMode: false
- property var service: null
- property string title: qsTr("Network");
-
- Component.onCompleted: {
- NetworkSettingsManager.services.type = NetworkSettingsType.Wired;
- root.service = NetworkSettingsManager.services.itemFromRow(0);
- ipv4Method.currentIndex = service.ipv4.method
- }
-
- onServiceChanged: {
- NetworkSettingsManager.services.type = NetworkSettingsType.Wired;
- if (!root.service) {
- root.service = NetworkSettingsManager.services.itemFromRow(0);
- }
- }
-
- GroupBox {
- title: qsTr("Ethernet Connection")
- anchors.fill: parent
-
- Column {
- spacing: 10
- width: parent.width
-
- ComboBoxEntry {
- id: ipv4Method
- title: qsTr("Connection method:")
- model: ListModel {
- id: methodsModel
-
- ListElement {
- text: "DHCP"
- method: NetworkSettingsIPv4.Dhcp
- }
- ListElement {
- text: "Manual"
- method: NetworkSettingsIPv4.Manual
- }
- ListElement {
- text: "Off"
- method: NetworkSettingsIPv4.Off
- }
- }
-
- Component.onCompleted: currentIndex = service.ipv4.method
- onCurrentIndexChanged: {
- if (model.get(currentIndex).method !== NetworkSettingsIPv4.Dhcp) {
- service.ipv4.method = model.get(currentIndex).method;
- editMode = true;
- }
- else if (service){
- //Enable DHCP
- if (service.ipv4.method !== model.get(currentIndex).method) {
- service.ipv4.method = model.get(currentIndex).method;
- service.setupIpv4Config();
- }
- editMode = false;
- }
- }
- }
- Item {
- width: parent.width
- height: gridLayout.implicitHeight
- GridLayout {
- id: gridLayout
- columns: 2
- rows: 4
- width: parent.width
- visible: service.ipv4.method !== NetworkSettingsIPv4.Off
-
- Label {
- text: qsTr("IP Address: ")
- width: parent.width * .3
- }
- IpAddressTextField {
- id: ipv4Address
- text: service.ipv4.address
- enabled: editMode
- onAccepted: if (text.length > 0) service.ipv4.address = text
- }
- Label {
- text: qsTr("Mask: ")
- }
- IpAddressTextField {
- id: ipv4Mask
- text: service.ipv4.mask
- enabled: editMode
- onAccepted: if (text.length > 0) service.ipv4.mask = text
- }
- Label {
- text: qsTr("Router: ")
- }
- IpAddressTextField {
- id: ipv4Gateway
- text: service.ipv4.gateway
- enabled: editMode
- onAccepted: if (text.length > 0) service.ipv4.gateway = text
- }
- Label {
- Layout.alignment: Qt.AlignTop
- text: qsTr("DNS server: ")
- }
- Column {
- spacing: 10
- Layout.fillWidth: true
- Layout.alignment: Qt.AlignTop
-
- Repeater {
- model: service.nameservers
-
- Label {
- text: display
- }
- }
- }
- }
- MouseArea {
- anchors.fill: parent
- enabled: !editMode
- && methodsModel.get(ipv4Method.currentIndex).method === NetworkSettingsIPv4.Manual
- onClicked: editMode = true
- }
- }
- Row {
- spacing: 10
- 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;
- ipv4Method.currentIndex = service.ipv4.method
- }
- }
- }
- Button {
- text: qsTr("Edit")
- visible: !editMode
- onClicked: stackView.push(Qt.resolvedUrl("EditWiredSettings.qml"), {service: root.service});
- }
- }
- }
-}
diff --git a/src/settingsui/qtbuttonimageproviderplugin/CMakeLists.txt b/src/settingsui/qtbuttonimageproviderplugin/CMakeLists.txt
deleted file mode 100644
index abe52e9..0000000
--- a/src/settingsui/qtbuttonimageproviderplugin/CMakeLists.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-# Generated from qtbuttonimageproviderplugin.pro.
-
-#####################################################################
-## qtbuttonimageproviderplugin Plugin:
-#####################################################################
-
-qt_add_qml_module(qtbuttonimageproviderplugin
- URI "QtDeviceUtilities.QtButtonImageProvider"
- VERSION "${CMAKE_PROJECT_VERSION}"
- CLASSNAME QtButtonImageProviderQmlPlugin
- SKIP_TYPE_REGISTRATION
- SOURCES
- plugin.cpp
- qtbuttonimageprovider.cpp qtbuttonimageprovider.h
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-# Resources:
-set(qtbuttonimageprovider_resource_files
- "QtButton.qml"
-)
-
-qt_add_resource(qtbuttonimageproviderplugin "qtbuttonimageprovider"
- PREFIX
- "/"
- FILES
- ${qtbuttonimageprovider_resource_files}
-)
-
-
-#### Keys ignored in scope 1:.:.:qtbuttonimageproviderplugin.pro:<TRUE>:
-# QML_IMPORT_VERSION = "$$QT_VERSION"
-# TARGETPATH = "QtDeviceUtilities/QtButtonImageProvider"
diff --git a/src/settingsui/qtbuttonimageproviderplugin/QtButton.qml b/src/settingsui/qtbuttonimageproviderplugin/QtButton.qml
deleted file mode 100644
index d65ae23..0000000
--- a/src/settingsui/qtbuttonimageproviderplugin/QtButton.qml
+++ /dev/null
@@ -1,58 +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
-
-Image {
- id: root
- source: "image://QtButton/" + cutSize + "/" + fillColor + "/" + borderColor
- sourceSize: Qt.size(width, height)
- property string state: "enabled"
- property int cutSize: 10
- property color fillColor: viewSettings.buttonGreenColor
- property color borderColor: mouseArea.pressed ? viewSettings.buttonActiveColor : viewSettings.buttonGreenColor
- property alias text: buttonText.text
- signal clicked()
-
- width: buttonText.contentWidth + cutSize * 4
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- onClicked: root.clicked()
- }
- Text {
- id: buttonText
- anchors.fill: parent
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- font.pixelSize: parent.height * 0.65
- font.family: appFont
- color: "white"
- }
-}
diff --git a/src/settingsui/qtbuttonimageproviderplugin/plugin.cpp b/src/settingsui/qtbuttonimageproviderplugin/plugin.cpp
deleted file mode 100644
index c017a05..0000000
--- a/src/settingsui/qtbuttonimageproviderplugin/plugin.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 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$
-**
-****************************************************************************/
-#include <QQmlExtensionPlugin>
-#include <QQmlEngine>
-
-#include "qtbuttonimageprovider.h"
-
-static void initResources()
-{
-#ifdef QT_STATIC
- Q_INIT_RESOURCE(qmake_QtDeviceUtilities_QtButtonImageProvider);
-#endif
- Q_INIT_RESOURCE(qtbuttonimageprovider);
-}
-
-QT_BEGIN_NAMESPACE
-
-class QtButtonImageProviderQmlPlugin : public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
-
-public:
- QtButtonImageProviderQmlPlugin(QObject *parent = nullptr) : QQmlExtensionPlugin(parent) { initResources(); }
-
- void registerTypes(const char *uri) override
- {
- Q_UNUSED(uri)
- Q_ASSERT(uri == QLatin1String("QtDeviceUtilities.QtButtonImageProvider"));
- qmlRegisterType(QUrl("qrc:/QtButton.qml"), uri, 1, 0, "QtButton");
- }
-
- void initializeEngine(QQmlEngine *engine, const char *uri) override
- {
- Q_UNUSED(uri);
- QtButtonImageProvider *provider = new QtButtonImageProvider();
- engine->addImageProvider("QtButton", provider);
- }
-};
-
-QT_END_NAMESPACE
-
-#include "plugin.moc"
diff --git a/src/settingsui/qtbuttonimageproviderplugin/plugins.qmltypes b/src/settingsui/qtbuttonimageproviderplugin/plugins.qmltypes
deleted file mode 100644
index 76ae3f9..0000000
--- a/src/settingsui/qtbuttonimageproviderplugin/plugins.qmltypes
+++ /dev/null
@@ -1,210 +0,0 @@
-import QtQuick.tooling 1.2
-
-// This file describes the plugin-supplied types contained in the library.
-// It is used for QML tooling purposes only.
-//
-// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable QtDeviceUtilities.QtButtonImageProvider 1.0'
-
-Module {
- dependencies: []
- Component {
- prototype: "QObject"
- name: "QtDeviceUtilities.QtButtonImageProvider/QtButton 1.0"
- exports: ["QtDeviceUtilities.QtButtonImageProvider/QtButton 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- Property { name: "state"; type: "string" }
- Property { name: "cutSize"; type: "int" }
- Property { name: "fillColor"; type: "QColor" }
- Property { name: "borderColor"; type: "QColor" }
- Property { name: "text"; type: "string" }
- Signal { name: "clicked" }
- Property { name: "fillMode"; type: "FillMode" }
- Property { name: "paintedWidth"; type: "double"; isReadonly: true }
- Property { name: "paintedHeight"; type: "double"; isReadonly: true }
- Property { name: "horizontalAlignment"; type: "HAlignment" }
- Property { name: "verticalAlignment"; type: "VAlignment" }
- Property { name: "mipmap"; revision: 1; type: "bool" }
- Property { name: "autoTransform"; revision: 2; type: "bool" }
- Signal { name: "paintedGeometryChanged" }
- Signal {
- name: "horizontalAlignmentChanged"
- Parameter { name: "alignment"; type: "HAlignment" }
- }
- Signal {
- name: "verticalAlignmentChanged"
- Parameter { name: "alignment"; type: "VAlignment" }
- }
- Signal {
- name: "mipmapChanged"
- revision: 1
- Parameter { type: "bool" }
- }
- Property { name: "status"; type: "Status"; isReadonly: true }
- Property { name: "source"; type: "QUrl" }
- Property { name: "progress"; type: "double"; isReadonly: true }
- Property { name: "asynchronous"; type: "bool" }
- Property { name: "cache"; type: "bool" }
- Property { name: "sourceSize"; type: "QSize" }
- Property { name: "mirror"; type: "bool" }
- Signal {
- name: "sourceChanged"
- Parameter { type: "QUrl" }
- }
- Signal {
- name: "statusChanged"
- Parameter { type: "QQuickImageBase::Status" }
- }
- Signal {
- name: "progressChanged"
- Parameter { name: "progress"; type: "double" }
- }
- Property { name: "implicitWidth"; type: "double"; isReadonly: true }
- Property { name: "implicitHeight"; type: "double"; isReadonly: true }
- Property { name: "parent"; type: "QQuickItem"; isPointer: true }
- Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
- Property { name: "resources"; type: "QObject"; isList: true; isReadonly: true }
- Property { name: "children"; type: "QQuickItem"; isList: true; isReadonly: true }
- Property { name: "x"; type: "double" }
- Property { name: "y"; type: "double" }
- Property { name: "z"; type: "double" }
- Property { name: "width"; type: "double" }
- Property { name: "height"; type: "double" }
- Property { name: "opacity"; type: "double" }
- Property { name: "enabled"; type: "bool" }
- Property { name: "visible"; type: "bool" }
- Property { name: "visibleChildren"; type: "QQuickItem"; isList: true; isReadonly: true }
- Property { name: "states"; type: "QQuickState"; isList: true; isReadonly: true }
- Property { name: "transitions"; type: "QQuickTransition"; isList: true; isReadonly: true }
- Property { name: "childrenRect"; type: "QRectF"; isReadonly: true }
- Property { name: "anchors"; type: "QQuickAnchors"; isReadonly: true; isPointer: true }
- Property { name: "left"; type: "QQuickAnchorLine"; isReadonly: true }
- Property { name: "right"; type: "QQuickAnchorLine"; isReadonly: true }
- Property { name: "horizontalCenter"; type: "QQuickAnchorLine"; isReadonly: true }
- Property { name: "top"; type: "QQuickAnchorLine"; isReadonly: true }
- Property { name: "bottom"; type: "QQuickAnchorLine"; isReadonly: true }
- Property { name: "verticalCenter"; type: "QQuickAnchorLine"; isReadonly: true }
- Property { name: "baseline"; type: "QQuickAnchorLine"; isReadonly: true }
- Property { name: "baselineOffset"; type: "double" }
- Property { name: "clip"; type: "bool" }
- Property { name: "focus"; type: "bool" }
- Property { name: "activeFocus"; type: "bool"; isReadonly: true }
- Property { name: "activeFocusOnTab"; revision: 1; type: "bool" }
- Property { name: "rotation"; type: "double" }
- Property { name: "scale"; type: "double" }
- Property { name: "transformOrigin"; type: "TransformOrigin" }
- Property { name: "transformOriginPoint"; type: "QPointF"; isReadonly: true }
- Property { name: "transform"; type: "QQuickTransform"; isList: true; isReadonly: true }
- Property { name: "smooth"; type: "bool" }
- Property { name: "antialiasing"; type: "bool" }
- Property { name: "containmentMask"; revision: 11; type: "QObject"; isPointer: true }
- Property { name: "layer"; type: "QQuickItemLayer"; isReadonly: true; isPointer: true }
- Signal {
- name: "childrenRectChanged"
- Parameter { type: "QRectF" }
- }
- Signal {
- name: "baselineOffsetChanged"
- Parameter { type: "double" }
- }
- Signal {
- name: "stateChanged"
- Parameter { type: "string" }
- }
- Signal {
- name: "focusChanged"
- Parameter { type: "bool" }
- }
- Signal {
- name: "activeFocusChanged"
- Parameter { type: "bool" }
- }
- Signal {
- name: "activeFocusOnTabChanged"
- revision: 1
- Parameter { type: "bool" }
- }
- Signal {
- name: "parentChanged"
- Parameter { type: "QQuickItem"; isPointer: true }
- }
- Signal {
- name: "transformOriginChanged"
- Parameter { type: "TransformOrigin" }
- }
- Signal {
- name: "smoothChanged"
- Parameter { type: "bool" }
- }
- Signal {
- name: "antialiasingChanged"
- Parameter { type: "bool" }
- }
- Signal {
- name: "clipChanged"
- Parameter { type: "bool" }
- }
- Signal {
- name: "windowChanged"
- revision: 1
- Parameter { name: "window"; type: "QQuickWindow"; isPointer: true }
- }
- Method { name: "update" }
- Method {
- name: "grabToImage"
- revision: 2
- type: "bool"
- Parameter { name: "callback"; type: "QJSValue" }
- Parameter { name: "targetSize"; type: "QSize" }
- }
- Method {
- name: "grabToImage"
- revision: 2
- type: "bool"
- Parameter { name: "callback"; type: "QJSValue" }
- }
- Method {
- name: "contains"
- type: "bool"
- Parameter { name: "point"; type: "QPointF" }
- }
- Method {
- name: "mapFromItem"
- Parameter { type: "QQmlV4Function"; isPointer: true }
- }
- Method {
- name: "mapToItem"
- Parameter { type: "QQmlV4Function"; isPointer: true }
- }
- Method {
- name: "mapFromGlobal"
- revision: 7
- Parameter { type: "QQmlV4Function"; isPointer: true }
- }
- Method {
- name: "mapToGlobal"
- revision: 7
- Parameter { type: "QQmlV4Function"; isPointer: true }
- }
- Method { name: "forceActiveFocus" }
- Method {
- name: "forceActiveFocus"
- Parameter { name: "reason"; type: "Qt::FocusReason" }
- }
- Method {
- name: "nextItemInFocusChain"
- revision: 1
- type: "QQuickItem*"
- Parameter { name: "forward"; type: "bool" }
- }
- Method { name: "nextItemInFocusChain"; revision: 1; type: "QQuickItem*" }
- Method {
- name: "childAt"
- type: "QQuickItem*"
- Parameter { name: "x"; type: "double" }
- Parameter { name: "y"; type: "double" }
- }
- }
-}
diff --git a/src/settingsui/qtbuttonimageproviderplugin/qmldir b/src/settingsui/qtbuttonimageproviderplugin/qmldir
deleted file mode 100644
index 4107ed2..0000000
--- a/src/settingsui/qtbuttonimageproviderplugin/qmldir
+++ /dev/null
@@ -1,3 +0,0 @@
-module QtDeviceUtilities.QtButtonImageProvider
-plugin qtbuttonimageproviderplugin
-classname QtButtonImageProviderQmlPlugin
diff --git a/src/settingsui/qtbuttonimageproviderplugin/qtbuttonimageprovider.cpp b/src/settingsui/qtbuttonimageproviderplugin/qtbuttonimageprovider.cpp
deleted file mode 100644
index 5bf162b..0000000
--- a/src/settingsui/qtbuttonimageproviderplugin/qtbuttonimageprovider.cpp
+++ /dev/null
@@ -1,101 +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$
-**
-****************************************************************************/
-#include <QQuickImageProvider>
-#include <QImage>
-#include <QPainter>
-#include <QPainterPath>
-
-#include "qtbuttonimageprovider.h"
-
-QtButtonImageProvider::QtButtonImageProvider()
- : QQuickImageProvider(QQuickImageProvider::Pixmap)
-{
-}
-
-QPixmap QtButtonImageProvider::requestPixmap(const QString &id, QSize *size, const QSize &requestedSize)
-{
- bool ok = false;
-
- QStringList params = id.split("/");
-
- int cutSize = params.at(0).toInt(&ok);
-
- if (!ok)
- cutSize = 10;
-
- QColor fillColor;
- QColor borderColor;
-
- if (params.length() > 1) {
- fillColor = QColor(params.at(1));
- }
-
- if (params.length() > 2)
- borderColor = QColor(params.at(2));
-
- if (!fillColor.isValid())
- fillColor = "#00eb00";
-
- if (!borderColor.isValid())
- borderColor ="white";
-
- int width = 100;
- int height = 50;
-
- if (size)
- *size = QSize(requestedSize.width(), requestedSize.height());
-
- QPixmap pixmap(requestedSize.width() > 0 ? requestedSize.width() : width,
- requestedSize.height() > 0 ? requestedSize.height() : height);
- pixmap.fill(Qt::transparent);
-
- QPainter painter(&pixmap);
- const qreal borderPenWidth = 2;
- QPen borderPen(QBrush(borderColor), borderPenWidth);
- borderPen.setJoinStyle(Qt::MiterJoin);
- painter.setRenderHint(QPainter::Antialiasing, true);
- painter.setPen(borderPen);
- painter.setBrush(fillColor);
-
- QPainterPath path;
- qreal top = borderPenWidth - 1;
- qreal left = borderPenWidth - 1;
- qreal bottom = pixmap.height() - borderPenWidth;
- qreal right = pixmap.width() - borderPenWidth;
- path.moveTo(left + cutSize, top);
- path.lineTo(right, top);
- path.lineTo(right, bottom - cutSize);
- path.lineTo(right - cutSize, bottom);
- path.lineTo(left, bottom);
- path.lineTo(left, top + cutSize);
- path.lineTo(left + cutSize, top);
- painter.drawPath(path);
-
- return pixmap;
-}
diff --git a/src/settingsui/qtbuttonimageproviderplugin/qtbuttonimageprovider.h b/src/settingsui/qtbuttonimageproviderplugin/qtbuttonimageprovider.h
deleted file mode 100644
index 94f410e..0000000
--- a/src/settingsui/qtbuttonimageproviderplugin/qtbuttonimageprovider.h
+++ /dev/null
@@ -1,47 +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$
-**
-****************************************************************************/
-#ifndef QTBUTTONIMAGEPROVIDER_H
-#define QTBUTTONIMAGEPROVIDER_H
-
-#include <QQuickImageProvider>
-#include <QPixmap>
-
-class QtButtonImageProvider : public QQuickImageProvider
-{
-public:
- QtButtonImageProvider();
-
- QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) override;
-
- void setCutSize(int size) { m_cutSize = size; }
-private:
- int m_cutSize;
-};
-
-#endif // QTBUTTONIMAGEPROVIDER_H
diff --git a/src/settingsui/qtbuttonimageproviderplugin/qtbuttonimageprovider.qrc b/src/settingsui/qtbuttonimageproviderplugin/qtbuttonimageprovider.qrc
deleted file mode 100644
index b3b680c..0000000
--- a/src/settingsui/qtbuttonimageproviderplugin/qtbuttonimageprovider.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>QtButton.qml</file>
- </qresource>
-</RCC>
diff --git a/src/settingsui/qtbuttonimageproviderplugin/qtbuttonimageproviderplugin.pro b/src/settingsui/qtbuttonimageproviderplugin/qtbuttonimageproviderplugin.pro
deleted file mode 100644
index ba26174..0000000
--- a/src/settingsui/qtbuttonimageproviderplugin/qtbuttonimageproviderplugin.pro
+++ /dev/null
@@ -1,18 +0,0 @@
-QT += qml quick
-CONFIG += no_cxx_module
-QML_IMPORT_VERSION = $$QT_VERSION
-
-TARGET = qtbuttonimageproviderplugin
-TARGETPATH = QtDeviceUtilities/QtButtonImageProvider
-
-SOURCES += \
- qtbuttonimageprovider.cpp \
- plugin.cpp
-
-HEADERS += \
- qtbuttonimageprovider.h
-
-RESOURCES += \
- qtbuttonimageprovider.qrc
-
-load(qml_plugin)
diff --git a/src/settingsui/settingsui.pro b/src/settingsui/settingsui.pro
deleted file mode 100644
index b20b548..0000000
--- a/src/settingsui/settingsui.pro
+++ /dev/null
@@ -1,18 +0,0 @@
-TEMPLATE = app
-
-QT += qml quick
-SOURCES += main.cpp
-
-RESOURCES += \
- settingsuiapp.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)
-
-static {
- QTPLUGIN += qtvirtualkeyboardplugin
- QT += svg
-}
diff --git a/src/settingsui/settingsuiapp.qrc b/src/settingsui/settingsuiapp.qrc
deleted file mode 100644
index 844ba29..0000000
--- a/src/settingsui/settingsuiapp.qrc
+++ /dev/null
@@ -1,25 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>main.qml</file>
- <file>common/HandwritingModeButton.qml</file>
- <file>AutoScroller.qml</file>
- <file>common/CustomSwitch.qml</file>
- <file>network/PassphraseEnter.qml</file>
- <file>network/AddressListEntry.qml</file>
- <file>network/ComboBoxEntry.qml</file>
- <file>network/EditWiredSettings.qml</file>
- <file>network/IpAddressTextField.qml</file>
- <file>network/NetworkDetails.qml</file>
- <file>network/NetworkListView.qml</file>
- <file>network/NetworkSettings.qml</file>
- <file>network/WifiSelectorDelegate.qml</file>
- <file>network/WifiSettings.qml</file>
- <file>network/WifiSignalMonitor.qml</file>
- <file>network/WiredSettings.qml</file>
- <file>settingsuiplugin/pluginMain.qml</file>
- <file>settingsuiplugin/SettingsDelegate.qml</file>
- <file>settingsuiplugin/SettingsHeader.qml</file>
- <file>settingsuiplugin/SettingsTitleItem.qml</file>
- <file>ViewSettings.qml</file>
- </qresource>
-</RCC>
diff --git a/src/settingsui/settingsuiplugin/CMakeLists.txt b/src/settingsui/settingsuiplugin/CMakeLists.txt
deleted file mode 100644
index ec62693..0000000
--- a/src/settingsui/settingsuiplugin/CMakeLists.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-# Generated from settingsuiplugin.pro.
-
-#####################################################################
-## settingsuiplugin Plugin:
-#####################################################################
-
-qt_add_qml_module(settingsuiplugin
- URI "QtDeviceUtilities.SettingsUI"
- VERSION "${CMAKE_PROJECT_VERSION}"
- CLASSNAME SettingsUIQmlPlugin
- SKIP_TYPE_REGISTRATION
- SOURCES
- plugin.cpp
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-# Resources:
-set(settingsui_resource_files
- "../common/CustomSwitch.qml"
- "../common/CustomTableView.qml"
- "../common/HandwritingModeButton.qml"
- "../network/AddressListEntry.qml"
- "../network/ComboBoxEntry.qml"
- "../network/EditWiredSettings.qml"
- "../network/IpAddressTextField.qml"
- "../network/NetworkDetails.qml"
- "../network/NetworkListView.qml"
- "../network/NetworkSettings.qml"
- "../network/PassphraseEnter.qml"
- "../network/WifiSelectorDelegate.qml"
- "../network/WifiSettings.qml"
- "../network/WifiSignalMonitor.qml"
- "../network/WiredSettings.qml"
- "SettingsDelegate.qml"
- "SettingsHeader.qml"
- "SettingsTitleItem.qml"
- "icons/Alert_yellow_1x.png"
- "icons/FloatingButton_Active.png"
- "icons/FloatingButton_Available.png"
- "icons/FloatingButton_Unavailable.png"
- "icons/WifiAnim_black_2x.png"
- "icons/Wifi_lightgray_2x.png"
- "newIcons/back_icon.svg"
- "newIcons/network_icon.svg"
- "pluginMain.qml"
-)
-
-qt_add_resource(settingsuiplugin "settingsui"
- PREFIX
- "/"
- FILES
- ${settingsui_resource_files}
-)
-
-
-#### Keys ignored in scope 1:.:.:settingsuiplugin.pro:<TRUE>:
-# DISTFILES = "qmldir"
-# QML_IMPORT_VERSION = "$$QT_VERSION"
-# TARGETPATH = "QtDeviceUtilities/SettingsUI"
diff --git a/src/settingsui/settingsuiplugin/SettingsDelegate.qml b/src/settingsui/settingsuiplugin/SettingsDelegate.qml
deleted file mode 100644
index cf7696a..0000000
--- a/src/settingsui/settingsuiplugin/SettingsDelegate.qml
+++ /dev/null
@@ -1,76 +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
-
-Item {
- width: settingsList.width
- height: settingsList.height * 0.08
-
- property bool isSelected: settingsList.currentIndex == index
-
- Image {
- id: img
- sourceSize.width: parent.width
- sourceSize.height: parent.height
- source: icon
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- anchors.leftMargin: parent.width * 0.075
- height: Math.min(parent.width * 0.5, parent.height * 0.6)
- width: height
- fillMode: Image.PreserveAspectFit
- }
-
- Text {
- text: title
- height: parent.height * 0.75
- anchors.right: parent.right
- anchors.left: img.right
- anchors.leftMargin: parent.width * 0.025
- anchors.verticalCenter: parent.verticalCenter
- fontSizeMode: Text.Fit
- minimumPixelSize: 1
- font.pixelSize: Math.min(parent.width * 0.25, parent.height)
- color: parent.isSelected ? viewSettings.buttonGreenColor : "white"
- wrapMode: Text.WordWrap
- verticalAlignment: Text.AlignVCenter
- font.family: appFont
- font.styleName: parent.isSelected ? "Bold" : "Regular"
- }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- onClicked: {
- settingsList.currentIndex = index
- settingsLoader.source = path + '/' + view + '.qml'
- titleItem.title = title
- }
- }
-}
diff --git a/src/settingsui/settingsuiplugin/SettingsHeader.qml b/src/settingsui/settingsuiplugin/SettingsHeader.qml
deleted file mode 100644
index 1d2f737..0000000
--- a/src/settingsui/settingsuiplugin/SettingsHeader.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
-import QtDeviceUtilities.NetworkSettings
-
-Item {
- id: header
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.top
- anchors.margins: pluginMain.margin
- height: pluginMain.margin * 4
-
- signal clicked()
-
- Image {
- id: backButton
- objectName: "settingsBackButton"
- anchors.left: parent.left
- anchors.top: parent.top
- source: "../newIcons/back_icon.svg"
- height: parent.height * 0.5
- width: height / sourceSize.height * sourceSize.width
- MouseArea {
- anchors.fill: parent
- anchors.margins: -parent.height * 0.2
- onClicked: header.clicked()
- }
- }
-
- Text {
- id: settingsText
- anchors.left: backButton.right
- anchors.verticalCenter: backButton.verticalCenter
- font.pixelSize: parent.height * 0.45
- text: qsTr("Settings")
- color: "white"
- font.family: appFont
- font.styleName: "SemiBold"
- MouseArea {
- anchors.fill: parent
- anchors.margins: -parent.height * 0.2
- onClicked: header.clicked()
- }
- }
-
- Text {
- id: ipItem
- width: parent.width * 0.25
- height: parent.height/2
- anchors.top: settingsText.top
- anchors.right: parent.right
- anchors.rightMargin: pluginMain.margin
- horizontalAlignment: Text.AlignRight
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: parent.height * 0.3
- color: "white"
- font.family: appFont
- font.styleName: "SemiBold"
- text: NetworkSettingsManager.currentWiredConnection ?
- qsTr("Wired IP: ") +
- NetworkSettingsManager.currentWiredConnection.ipv4.address : ""
- }
-
- Text {
- id: wifiIpItem
- width: parent.width * 0.25
- height: parent.height/2
- anchors.top: ipItem.bottom
- anchors.right: parent.right
- anchors.rightMargin: pluginMain.margin
- horizontalAlignment: Text.AlignRight
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: parent.height * 0.3
- color: "white"
- font.family: appFont
- font.styleName: "SemiBold"
- text: NetworkSettingsManager.currentWifiConnection ?
- qsTr("Wireless IP: ") +
- NetworkSettingsManager.currentWifiConnection.ipv4.address : ""
- }
-}
diff --git a/src/settingsui/settingsuiplugin/SettingsTitleItem.qml b/src/settingsui/settingsuiplugin/SettingsTitleItem.qml
deleted file mode 100644
index 6156091..0000000
--- a/src/settingsui/settingsuiplugin/SettingsTitleItem.qml
+++ /dev/null
@@ -1,57 +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
-
-Column {
- id: page
- spacing: pluginMain.spacing
-
- property alias title: displayText.text
-
- Text {
- id: displayText
- font.pixelSize: pluginMain.titleFontSize
- color: "white"
- fontSizeMode: Text.Fit
- minimumPixelSize: 1
- font.family: appFont
- font.styleName: "Bold"
- }
-
- Rectangle {
- id: btmLine
- width: page.parent.width * 0.3
- height: 3
- }
-
- Item {
- height: pluginMain.margin
- width: 1
- }
-}
diff --git a/src/settingsui/settingsuiplugin/icons.qrc b/src/settingsui/settingsuiplugin/icons.qrc
deleted file mode 100644
index c6944ca..0000000
--- a/src/settingsui/settingsuiplugin/icons.qrc
+++ /dev/null
@@ -1,12 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>icons/Alert_yellow_1x.png</file>
- <file>icons/FloatingButton_Active.png</file>
- <file>icons/FloatingButton_Available.png</file>
- <file>icons/FloatingButton_Unavailable.png</file>
- <file>icons/WifiAnim_black_2x.png</file>
- <file>icons/Wifi_lightgray_2x.png</file>
- <file>newIcons/back_icon.svg</file>
- <file>newIcons/network_icon.svg</file>
- </qresource>
-</RCC>
diff --git a/src/settingsui/settingsuiplugin/icons/Alert_yellow_1x.png b/src/settingsui/settingsuiplugin/icons/Alert_yellow_1x.png
deleted file mode 100644
index 6fd25cb..0000000
--- a/src/settingsui/settingsuiplugin/icons/Alert_yellow_1x.png
+++ /dev/null
Binary files differ
diff --git a/src/settingsui/settingsuiplugin/icons/FloatingButton_Active.png b/src/settingsui/settingsuiplugin/icons/FloatingButton_Active.png
deleted file mode 100755
index 9b55146..0000000
--- a/src/settingsui/settingsuiplugin/icons/FloatingButton_Active.png
+++ /dev/null
Binary files differ
diff --git a/src/settingsui/settingsuiplugin/icons/FloatingButton_Available.png b/src/settingsui/settingsuiplugin/icons/FloatingButton_Available.png
deleted file mode 100755
index 1479881..0000000
--- a/src/settingsui/settingsuiplugin/icons/FloatingButton_Available.png
+++ /dev/null
Binary files differ
diff --git a/src/settingsui/settingsuiplugin/icons/FloatingButton_Unavailable.png b/src/settingsui/settingsuiplugin/icons/FloatingButton_Unavailable.png
deleted file mode 100755
index 33aa87d..0000000
--- a/src/settingsui/settingsuiplugin/icons/FloatingButton_Unavailable.png
+++ /dev/null
Binary files differ
diff --git a/src/settingsui/settingsuiplugin/icons/WifiAnim_black_2x.png b/src/settingsui/settingsuiplugin/icons/WifiAnim_black_2x.png
deleted file mode 100644
index c2dc8c5..0000000
--- a/src/settingsui/settingsuiplugin/icons/WifiAnim_black_2x.png
+++ /dev/null
Binary files differ
diff --git a/src/settingsui/settingsuiplugin/icons/Wifi_lightgray_2x.png b/src/settingsui/settingsuiplugin/icons/Wifi_lightgray_2x.png
deleted file mode 100644
index b71b22e..0000000
--- a/src/settingsui/settingsuiplugin/icons/Wifi_lightgray_2x.png
+++ /dev/null
Binary files differ
diff --git a/src/settingsui/settingsuiplugin/icons/generate_icons.sh b/src/settingsui/settingsuiplugin/icons/generate_icons.sh
deleted file mode 100755
index 7218df0..0000000
--- a/src/settingsui/settingsuiplugin/icons/generate_icons.sh
+++ /dev/null
@@ -1,37 +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$
-##
-#############################################################################
-#!/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/settingsui/settingsuiplugin/icons/ref/extra/Alert.png b/src/settingsui/settingsuiplugin/icons/ref/extra/Alert.png
deleted file mode 100644
index 80914fc..0000000
--- a/src/settingsui/settingsuiplugin/icons/ref/extra/Alert.png
+++ /dev/null
Binary files differ
diff --git a/src/settingsui/settingsuiplugin/icons/scripts/cimage.sh b/src/settingsui/settingsuiplugin/icons/scripts/cimage.sh
deleted file mode 100755
index adbbb7f..0000000
--- a/src/settingsui/settingsuiplugin/icons/scripts/cimage.sh
+++ /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$
-##
-#############################################################################
-#!/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/settingsui/settingsuiplugin/icons/scripts/cimages.sh b/src/settingsui/settingsuiplugin/icons/scripts/cimages.sh
deleted file mode 100755
index db1ad04..0000000
--- a/src/settingsui/settingsuiplugin/icons/scripts/cimages.sh
+++ /dev/null
@@ -1,38 +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$
-##
-#############################################################################
-#!/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/settingsui/settingsuiplugin/icons/scripts/rimage.sh b/src/settingsui/settingsuiplugin/icons/scripts/rimage.sh
deleted file mode 100755
index 69b65a3..0000000
--- a/src/settingsui/settingsuiplugin/icons/scripts/rimage.sh
+++ /dev/null
@@ -1,47 +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$
-##
-#############################################################################
-#!/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/settingsui/settingsuiplugin/icons/scripts/rimages.sh b/src/settingsui/settingsuiplugin/icons/scripts/rimages.sh
deleted file mode 100755
index e9e01b0..0000000
--- a/src/settingsui/settingsuiplugin/icons/scripts/rimages.sh
+++ /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$
-##
-#############################################################################
-#!/bin/bash
-
-for dir in "$@"
-do
- echo "$dir"
- scripts/rimage.sh $dir
-done
diff --git a/src/settingsui/settingsuiplugin/newIcons/back_icon.svg b/src/settingsui/settingsuiplugin/newIcons/back_icon.svg
deleted file mode 100644
index 6034bd7..0000000
--- a/src/settingsui/settingsuiplugin/newIcons/back_icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg id="back" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>back_icon</title><path d="M26.57,43.5a2.61,2.61,0,0,1-2.1-1.06L10.74,24a2.62,2.62,0,0,1,0-3.12L25.06,1.56a2.62,2.62,0,1,1,4.2,3.12L16.1,22.4,28.67,39.32a2.62,2.62,0,0,1-2.1,4.18Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/network_icon.svg b/src/settingsui/settingsuiplugin/newIcons/network_icon.svg
deleted file mode 100644
index 157fb52..0000000
--- a/src/settingsui/settingsuiplugin/newIcons/network_icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg id="network" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>network_icon</title><path d="M8.22,28.71A6.71,6.71,0,1,1,14.93,22a6.72,6.72,0,0,1-6.71,6.71Zm0-10A3.25,3.25,0,1,0,11.47,22a3.25,3.25,0,0,0-3.25-3.25Z" style="fill:#41cd52"/><path d="M35.78,13.92a6.71,6.71,0,1,1,6.71-6.71,6.72,6.72,0,0,1-6.71,6.71Zm0-10A3.25,3.25,0,1,0,39,7.21,3.25,3.25,0,0,0,35.78,4Z" style="fill:#41cd52"/><path d="M35.78,43.5a6.71,6.71,0,1,1,6.71-6.71,6.72,6.72,0,0,1-6.71,6.71Zm0-10A3.25,3.25,0,1,0,39,36.79a3.25,3.25,0,0,0-3.25-3.25Z" style="fill:#41cd52"/><path d="M30.66,35.89a1.73,1.73,0,0,1-.86-.23L12.12,25.46a1.73,1.73,0,0,1,1.73-3L31.52,32.66a1.73,1.73,0,0,1-.87,3.23Z" style="fill:#41cd52"/><path d="M13,21.77a1.73,1.73,0,0,1-.87-3.23L29.79,8.34a1.73,1.73,0,1,1,1.73,3L13.85,21.54a1.71,1.71,0,0,1-.86.23Z" style="fill:#41cd52"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/plugin.cpp b/src/settingsui/settingsuiplugin/plugin.cpp
deleted file mode 100644
index 3ea37ad..0000000
--- a/src/settingsui/settingsuiplugin/plugin.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 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$
-**
-****************************************************************************/
-#include <QtQml/qqmlextensionplugin.h>
-#include <QtQml/qqml.h>
-
-static void initResources()
-{
-#ifdef QT_STATIC
- Q_INIT_RESOURCE(qmake_QtDeviceUtilities_SettingsUI);
-#endif
- Q_INIT_RESOURCE(settingsui);
-}
-
-/*!
- \qmlmodule QtDeviceUtilities.SettingsUI
- \title Qt Device Utilities: Settings UI
- \ingroup qtdevice-utilities-qml-modules
- \ingroup qmlmodules
- \brief Provides a system-wide settings UI.
-
- The \c DeviceUtilities.SettingsUI module provides a single QML type,
- SettingsUI, that allows applications to integrate a standard, system-wide
- settings view into their user interface.
-
- To import and use the module's QML types, use the following statement:
-
- \badcode
- import QtDeviceUtilities.SettingsUI
- \endcode
-
- \section1 QML Types
-*/
-
-/*!
- \qmltype SettingsUI
- \inqmlmodule QtDeviceUtilities.SettingsUI
- \brief Provides a QML type for displaying a system-wide settings UI.
-
- With the SettingsUI type, applications can easily integrate a standard,
- system-wide settings view into their user interface.
-
- For example:
-
- \qml
- import QtQuick
- import QtDeviceUtilities.SettingsUI
-
- SettingsUI {
- id: settingsUI
- anchors.fill: parent
- }
- \endqml
-
- There is no need to import the various \c {DeviceUtilities.*} modules and
- to declare a custom settings UI, unless specifically required.
-*/
-
-QT_BEGIN_NAMESPACE
-
-class SettingsUIQmlPlugin : public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
-
-public:
- SettingsUIQmlPlugin(QObject *parent = nullptr) : QQmlExtensionPlugin(parent) { initResources(); }
- void registerTypes(const char *uri) override
- {
- // @uri QtDeviceUtilities.SettingsUI
- Q_ASSERT(uri == QLatin1String("QtDeviceUtilities.SettingsUI"));
- qmlRegisterType(QUrl("qrc:/pluginMain.qml"), uri, 2, 0, "SettingsUI");
- }
-
-};
-
-QT_END_NAMESPACE
-
-#include "plugin.moc"
diff --git a/src/settingsui/settingsuiplugin/pluginMain.qml b/src/settingsui/settingsuiplugin/pluginMain.qml
deleted file mode 100644
index 76a6ced..0000000
--- a/src/settingsui/settingsuiplugin/pluginMain.qml
+++ /dev/null
@@ -1,106 +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
-import QtQuick.Layouts
-import QtQuick.Controls
-import Qt.labs.settings
-import QtDeviceUtilities.NetworkSettings
-
-Rectangle {
- id: pluginMain
- anchors.fill: parent
- visible: true
- color: "#09102b"
- opacity: 0.97
-
- property var service
- property int margin: (pluginMain.width / 3 * 2) * 0.05
- property int spacing: margin * 0.5
- property int titleFontSize: height * 0.04
- property int subTitleFontSize: height * 0.035
- property int valueFontSize: height * 0.025
- property int fieldHeight: height * 0.07
- property int fieldTextHeight: height * 0.05
- property int buttonHeight: height * 0.05
-
- signal closed()
-
- Component.onCompleted: {
- settingsList.currentIndex = 0
- settingsLoader.source = settingsListModel.get(0).path + '/' +
- settingsListModel.get(0).view + '.qml'
- titleItem.title = settingsListModel.get(0).title
- }
-
- SettingsHeader {
- id: settingsHeader
- onClicked: pluginMain.closed()
- }
-
- ListModel {
- id: settingsListModel
-
- ListElement {
- title: "Network"
- view: "NetworkSettings"
- path: "network"
- icon: "newIcons/network_icon.svg"
- }
- }
-
- ListView {
- id: settingsList
- objectName: "settingsList"
- anchors.top: settingsHeader.bottom
- anchors.left: parent.left
- anchors.bottom: parent.bottom
- width: parent.width / 3.33
- model: settingsListModel
-
- delegate: SettingsDelegate {}
- }
-
- SettingsTitleItem {
- id: titleItem
- anchors.left: settingsList.right
- anchors.right: parent.right
- anchors.top: settingsHeader.bottom
- anchors.leftMargin: pluginMain.margin * 2
- }
-
- Loader {
- id: settingsLoader
- anchors.top: titleItem.bottom
- anchors.left: settingsList.right
- anchors.right: parent.right
- anchors.bottom: parent.bottom
- anchors.leftMargin: pluginMain.margin * 2
- anchors.rightMargin: pluginMain.margin * 2
- }
-}
diff --git a/src/settingsui/settingsuiplugin/plugins.qmltypes b/src/settingsui/settingsuiplugin/plugins.qmltypes
deleted file mode 100644
index a3bdbd9..0000000
--- a/src/settingsui/settingsuiplugin/plugins.qmltypes
+++ /dev/null
@@ -1,32 +0,0 @@
-import QtQuick.tooling 1.2
-
-// This file describes the plugin-supplied types contained in the library.
-// It is used for QML tooling purposes only.
-//
-// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable QtDeviceUtilities.SettingsUI 1.0'
-
-Module {
- dependencies: ["QtQuick 2.8"]
- Component {
- prototype: "QQuickRectangle"
- name: "QtDeviceUtilities.SettingsUI/SettingsUI 1.0"
- exports: ["QtDeviceUtilities.SettingsUI/SettingsUI 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- Property { name: "__initialized"; type: "bool" }
- Property { name: "service"; type: "QVariant" }
- Property { name: "margin"; type: "int" }
- Property { name: "spacing"; type: "int" }
- Property { name: "titleFontSize"; type: "int" }
- Property { name: "subTitleFontSize"; type: "int" }
- Property { name: "valueFontSize"; type: "int" }
- Property { name: "fieldHeight"; type: "int" }
- Property { name: "fieldTextHeight"; type: "int" }
- Property { name: "buttonHeight"; type: "int" }
- Property { name: "model"; type: "QUrl" }
- Signal { name: "closed" }
- Method { name: "init"; type: "QVariant" }
- }
-}
diff --git a/src/settingsui/settingsuiplugin/qmldir b/src/settingsui/settingsuiplugin/qmldir
deleted file mode 100644
index 88d0e45..0000000
--- a/src/settingsui/settingsuiplugin/qmldir
+++ /dev/null
@@ -1,4 +0,0 @@
-module QtDeviceUtilities.SettingsUI
-plugin settingsuiplugin
-classname SettingsUIQmlPlugin
-typeinfo plugins.qmltypes
diff --git a/src/settingsui/settingsuiplugin/settingsui.qrc b/src/settingsui/settingsuiplugin/settingsui.qrc
deleted file mode 100644
index 7c8b661..0000000
--- a/src/settingsui/settingsuiplugin/settingsui.qrc
+++ /dev/null
@@ -1,31 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>pluginMain.qml</file>
- <file>../common/CustomTableView.qml</file>
- <file>../common/HandwritingModeButton.qml</file>
- <file>../network/AddressListEntry.qml</file>
- <file>../network/ComboBoxEntry.qml</file>
- <file>../network/EditWiredSettings.qml</file>
- <file>../network/IpAddressTextField.qml</file>
- <file>../network/NetworkDetails.qml</file>
- <file>../network/NetworkSettings.qml</file>
- <file>../network/WifiSelectorDelegate.qml</file>
- <file>../network/WifiSettings.qml</file>
- <file>../network/WifiSignalMonitor.qml</file>
- <file>../network/WiredSettings.qml</file>
- <file>../common/CustomSwitch.qml</file>
- <file>../network/NetworkListView.qml</file>
- <file>../network/PassphraseEnter.qml</file>
- <file>SettingsHeader.qml</file>
- <file>SettingsDelegate.qml</file>
- <file>SettingsTitleItem.qml</file>
- <file>icons/Alert_yellow_1x.png</file>
- <file>icons/FloatingButton_Active.png</file>
- <file>icons/FloatingButton_Available.png</file>
- <file>icons/FloatingButton_Unavailable.png</file>
- <file>icons/WifiAnim_black_2x.png</file>
- <file>icons/Wifi_lightgray_2x.png</file>
- <file>newIcons/back_icon.svg</file>
- <file>newIcons/network_icon.svg</file>
- </qresource>
-</RCC>
diff --git a/src/settingsui/settingsuiplugin/settingsuiplugin.pro b/src/settingsui/settingsuiplugin/settingsuiplugin.pro
deleted file mode 100644
index a2e1d59..0000000
--- a/src/settingsui/settingsuiplugin/settingsuiplugin.pro
+++ /dev/null
@@ -1,17 +0,0 @@
-QT += qml quick
-CONFIG += no_cxx_module
-QML_IMPORT_VERSION = $$QT_VERSION
-
-TARGET = settingsuiplugin
-TARGETPATH = QtDeviceUtilities/SettingsUI
-
-SOURCES += \
- plugin.cpp
-
-DISTFILES += \
- qmldir
-
-RESOURCES += \
- settingsui.qrc
-
-load(qml_plugin)
diff --git a/src/src.pro b/src/src.pro
deleted file mode 100644
index 1765381..0000000
--- a/src/src.pro
+++ /dev/null
@@ -1,15 +0,0 @@
-TEMPLATE = subdirs
-CONFIG += ordered
-
-qtHaveModule(dbus) {
- SUBDIRS += \
- networksettings \
-
-}
-
-SUBDIRS += \
- settingsui/settingsuiplugin \
- settingsui/qtbuttonimageproviderplugin \
- settingsui \
- imports \
- doc \