diff options
Diffstat (limited to 'src/imports/networksettings')
-rw-r--r-- | src/imports/networksettings/CMakeLists.txt | 22 | ||||
-rw-r--r-- | src/imports/networksettings/plugin.cpp | 191 | ||||
-rw-r--r-- | src/imports/networksettings/plugin.h | 48 | ||||
-rw-r--r-- | src/imports/networksettings/plugins.qmltypes | 205 | ||||
-rw-r--r-- | src/imports/networksettings/qmldir | 4 |
5 files changed, 0 insertions, 470 deletions
diff --git a/src/imports/networksettings/CMakeLists.txt b/src/imports/networksettings/CMakeLists.txt deleted file mode 100644 index 60f8a64..0000000 --- a/src/imports/networksettings/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -##################################################################### -## networksettingsplugin Plugin: -##################################################################### - -qt_internal_add_qml_module(networksettingsplugin - URI "QtDeviceUtilities.NetworkSettings" - VERSION "${CMAKE_PROJECT_VERSION}" - CLASS_NAME NetworkSettingsQmlPlugin - PLUGIN_TARGET networksettingsplugin - NO_GENERATE_PLUGIN_SOURCE - NO_PLUGIN_OPTIONAL - NO_GENERATE_QMLTYPES - INSTALL_SOURCE_QMLTYPES "plugins.qmltypes" - SOURCES - plugin.cpp plugin.h - PUBLIC_LIBRARIES - Qt::Core - Qt::Gui - Qt::Qml - Qt::Quick - Qt::NetworkSettings -) diff --git a/src/imports/networksettings/plugin.cpp b/src/imports/networksettings/plugin.cpp deleted file mode 100644 index e4d6cee..0000000 --- a/src/imports/networksettings/plugin.cpp +++ /dev/null @@ -1,191 +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 "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> - -/*! - \qmlmodule QtDeviceUtilities.NetworkSettings - \ingroup qtdevice-utilities-qml-modules - \ingroup qmlmodules - \title Qt Network Settings QML Types - - \brief Provides singleton QML types for controlling network settings. - - Qt Network Settings QML module provides singleton QML types for controlling - network settings in an embedded device. - - To import and use the module's QML types, use the following statement: - - \badcode - import QtDeviceUtilities.NetworkSettings - \endcode - - \l{Qt Device Utilities WiFi Tutorial} demonstrates how you can use - \l{QtDeviceUtilities.NetworkSettings}{NetworkSettings} for connecting to WiFi. - - \note Some functions may not be available on all of the platforms. - - \section1 QML Types -*/ - -/*! - \qmltype NetworkSettingsManager - \inqmlmodule QtDeviceUtilities.NetworkSettings - \brief A singleton QML type for managing network settings. - - There is no need to create an instance of this object. To use it, - simply import the \c {QtDeviceUtilities.NetworkSettings} module. - - \l{Qt Device Utilities WiFi Tutorial} demonstrates how you can use - \l{NetworkSettingsManager} for connecting to WiFi. -*/ - -/*! - \qmlproperty model NetworkSettingsManager::services - \readonly - - Holds the service model. - - The services list in the model can be controlled with the - \c type property, and NetworkService items can be retrieved - with the \c {itemFromRow(int index)} method. For example, to - select the first available wired network service: - - \code - property var service: null - ... - NetworkSettingsManager.services.type = NetworkSettingsType.Wired; - service = NetworkSettingsManager.services.itemFromRow(0); - \endcode - - Available service types: - - \value NetworkSettingsType.Wired Wired network - \value NetworkSettingsType.Wifi Wifi network - \value NetworkSettingsType.Bluetooth Bluetooth network - \value NetworkSettingsType.Unknown Unknown network type - - \sa NetworkService -*/ - -/*! - \qmlproperty model NetworkSettingsManager::interfaces - \readonly - - 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. - - \sa NetworkInterface -*/ - -/*! - \qmlmethod NetworkService NetworkSettingsManager::service(string name, int type) - - Returns the service with name \a name and type \a type. - - \sa services -*/ - -/*! - \qmlmethod NetworkInterface NetworkSettingsManager::interface(int type, int instance) - - Returns the interface with type \a type and order number of \a instance - - \sa NetworkInterface -*/ - -/*! - \qmlmethod NetworkSettingsManager::userAgent.setPassphrase(string passphrase) - - Sets the \a passphrase for connecting to a Wifi network. - - This method needs to be called in response to receiving a showUserCredentialsInput() signal. - - \sa userAgent.showUserCredentialsInput() -*/ - -/*! - \qmlsignal NetworkSettingsManager::userAgent.showUserCredentialsInput() - - This signal is emitted when user credentials are required for connecting to a Wifi network. - - \sa userAgent.setPassphrase() -*/ - -/*! - \qmlmethod NetworkSettingsManager::userAgent.cancelInput() - - Cancels the user credentials input request. -*/ - -/*! - \qmlsignal NetworkSettingsManager::userAgent.error() - - 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/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 |