diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-01-17 11:08:08 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-01-30 09:25:10 +0000 |
commit | 0dc0b5b64a0ed9ff682737f91423c9beeb5a8646 (patch) | |
tree | e9fc307213e9e5a15e0e86894750cc0ddcdebe4a /sources/pyside2 | |
parent | 470d7b4900af169abf1aa9306ebb30b4489f1dc3 (diff) |
Add QtRemoteObjects classes
For starters, add the classes so that ready-made classes like
QAbstractItemModelReplica can be used. Actually implementing repc
requires another step.
Task-number: PYSIDE-862
Change-Id: I28adb1d45c262f298f0ad1926198ec6a3013542f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/pyside2')
4 files changed, 121 insertions, 1 deletions
diff --git a/sources/pyside2/CMakeLists.txt b/sources/pyside2/CMakeLists.txt index 1d563fb44..2fb5cedf5 100644 --- a/sources/pyside2/CMakeLists.txt +++ b/sources/pyside2/CMakeLists.txt @@ -353,7 +353,8 @@ if(APPLE) endif() # Collect all optional modules. -set(ALL_OPTIONAL_MODULES Xml XmlPatterns Help Multimedia MultimediaWidgets OpenGL Positioning Location Qml Quick QuickWidgets Scxml Script ScriptTools Sensors TextToSpeech Charts Svg DataVisualization) +set(ALL_OPTIONAL_MODULES Xml XmlPatterns Help Multimedia +MultimediaWidgets OpenGL Positioning Location Qml Quick QuickWidgets RemoteObjects Scxml Script ScriptTools Sensors TextToSpeech Charts Svg DataVisualization) find_package(Qt5UiTools) if(Qt5UiTools_FOUND) list(APPEND ALL_OPTIONAL_MODULES UiTools) diff --git a/sources/pyside2/PySide2/QtRemoteObjects/CMakeLists.txt b/sources/pyside2/PySide2/QtRemoteObjects/CMakeLists.txt new file mode 100644 index 000000000..29b49d895 --- /dev/null +++ b/sources/pyside2/PySide2/QtRemoteObjects/CMakeLists.txt @@ -0,0 +1,44 @@ +project(QtRemoteObjects) + +set(QtRemoteObjects_SRC +${QtRemoteObjects_GEN_DIR}/qabstractitemmodelreplica_wrapper.cpp +${QtRemoteObjects_GEN_DIR}/qremoteobjectabstractpersistedstore_wrapper.cpp +${QtRemoteObjects_GEN_DIR}/qremoteobjectdynamicreplica_wrapper.cpp +${QtRemoteObjects_GEN_DIR}/qremoteobjecthost_wrapper.cpp +${QtRemoteObjects_GEN_DIR}/qremoteobjecthostbase_wrapper.cpp +${QtRemoteObjects_GEN_DIR}/qremoteobjectnode_wrapper.cpp +${QtRemoteObjects_GEN_DIR}/qremoteobjectpendingcall_wrapper.cpp +${QtRemoteObjects_GEN_DIR}/qremoteobjectpendingcallwatcher_wrapper.cpp +${QtRemoteObjects_GEN_DIR}/qremoteobjectregistry_wrapper.cpp +${QtRemoteObjects_GEN_DIR}/qremoteobjectregistryhost_wrapper.cpp +${QtRemoteObjects_GEN_DIR}/qremoteobjectreplica_wrapper.cpp +# ${QtRemoteObjects_GEN_DIR}/qtremoteobjects_wrapper.cpp +${QtRemoteObjects_GEN_DIR}/qremoteobjectsettingsstore_wrapper.cpp + +# module is always needed +${QtRemoteObjects_GEN_DIR}/qtremoteobjects_module_wrapper.cpp +) + +set(QtRemoteObjects_include_dirs ${QtRemoteObjects_SOURCE_DIR} + ${QtRemoteObjects_BINARY_DIR} + ${Qt5RemoteObjects_INCLUDE_DIRS} + ${SHIBOKEN_INCLUDE_DIR} + ${libpyside_SOURCE_DIR} + ${SHIBOKEN_PYTHON_INCLUDE_DIR} + ${QtCore_GEN_DIR}) + +set(QtRemoteObjects_libraries pyside2 + ${SHIBOKEN_PYTHON_LIBRARIES} + ${SHIBOKEN_LIBRARY} + ${Qt5RemoteObjects_LIBRARIES}) + +set(QtRemoteObjects_deps QtCore QtNetwork) + +create_pyside_module(NAME QtRemoteObjects + INCLUDE_DIRS QtRemoteObjects_include_dirs + LIBRARIES QtRemoteObjects_libraries + DEPS QtRemoteObjects_deps + TYPESYSTEM_PATH QtRemoteObjects_SOURCE_DIR + SOURCES QtRemoteObjects_SRC + TYPESYSTEM_NAME ${QtRemoteObjects_BINARY_DIR}/typesystem_remoteobjects.xml + ) diff --git a/sources/pyside2/PySide2/QtRemoteObjects/typesystem_remoteobjects.xml b/sources/pyside2/PySide2/QtRemoteObjects/typesystem_remoteobjects.xml new file mode 100644 index 000000000..8058cb56c --- /dev/null +++ b/sources/pyside2/PySide2/QtRemoteObjects/typesystem_remoteobjects.xml @@ -0,0 +1,74 @@ +<?xml version="1.0"?> +<!-- +/**************************************************************************** +** +** Copyright (C) 2019 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt for Python. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or 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.GPL2 and 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-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +--> +<typesystem package="PySide2.QtRemoteObjects"> + <load-typesystem name="templates/core_common.xml" generate="no"/> + <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/> + <rejection class="*" function-name="getTypeNameAndMetaobjectFromClassInfo"/> +<!-- Exclude namespace due to Q_NAMESPACE link errors on Windows (QTBUG-68014) + <rejection class="QtRemoteObjects" field-name="staticMetaObject"/> + <namespace-type name="QtRemoteObjects"> + <enum-type name="InitialAction"/> + <enum-type name="QRemoteObjectPacketTypeEnum"/> + </namespace-type> +--> + <object-type name="QAbstractItemModelReplica"/> + <object-type name="QRemoteObjectAbstractPersistedStore"/> + <object-type name="QRemoteObjectDynamicReplica"/> + <object-type name="QRemoteObjectHost"/> + <object-type name="QRemoteObjectHostBase"> + <enum-type name="AllowedSchemas"/> + </object-type> + <object-type name="QRemoteObjectNode"> + <enum-type name="ErrorCode"/> + </object-type> + <object-type name="QRemoteObjectPendingCall"> + <enum-type name="Error"/> + </object-type> + <object-type name="QRemoteObjectPendingCallWatcher"/> + <object-type name="QRemoteObjectRegistry"/> + <object-type name="QRemoteObjectRegistryHost"/> + <object-type name="QRemoteObjectReplica"> + <enum-type name="State"/> + <!-- protected: <enum-type name="ConstructorType"/> --> + </object-type> + <object-type name="QRemoteObjectSettingsStore"/> +</typesystem> diff --git a/sources/pyside2/tests/QtRemoteObjects/CMakeLists.txt b/sources/pyside2/tests/QtRemoteObjects/CMakeLists.txt new file mode 100644 index 000000000..2f7cb08b9 --- /dev/null +++ b/sources/pyside2/tests/QtRemoteObjects/CMakeLists.txt @@ -0,0 +1 @@ +# Please add some tests, here |