aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpysideqml/pysideqmlattached.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-01-27 14:38:43 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2022-02-16 21:14:05 +0100
commitabb6e8ca90fb2ff0718f7e29d00ebd90bc9f7ccd (patch)
tree29028d7346e0dd19a2598c7aeaffe13af1fc2487 /sources/pyside6/libpysideqml/pysideqmlattached.h
parenta54272ecfa6ce69e201a72678da26f7f92238ac5 (diff)
Add the QmlAttached decorator
[ChangeLog][PySide6] The QmlAttached decorator has been added. Task-number: PYSIDE-1709 Change-Id: I0301ecc7a9bc7a1b798095e8972b2fe4addf2eaf Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside6/libpysideqml/pysideqmlattached.h')
-rw-r--r--sources/pyside6/libpysideqml/pysideqmlattached.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/sources/pyside6/libpysideqml/pysideqmlattached.h b/sources/pyside6/libpysideqml/pysideqmlattached.h
new file mode 100644
index 000000000..d2d1554af
--- /dev/null
+++ b/sources/pyside6/libpysideqml/pysideqmlattached.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2022 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$
+**
+****************************************************************************/
+
+#ifndef PYSIDEQMLATTACHED_H
+#define PYSIDEQMLATTACHED_H
+
+#include <sbkpython.h>
+
+#include "pysideqmlmacros.h"
+
+#include <QtCore/QtGlobal>
+
+QT_FORWARD_DECLARE_CLASS(QObject)
+
+namespace PySide::Qml
+{
+
+/// PySide implementation of qmlAttachedPropertiesObject<T> function.
+/// \param typeObject attaching type
+/// \param obj attachee
+/// \param create Whether to create the Attachment object
+/// \return Attachment object instance
+PYSIDEQML_API QObject *qmlAttachedPropertiesObject(PyObject *typeObject, QObject *obj,
+ bool create = true);
+
+} // namespace PySide::Qml
+
+#endif // PYSIDEQMLATTACHED_H