aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpyside/qobjectconnect.h
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/libpyside/qobjectconnect.h')
-rw-r--r--sources/pyside6/libpyside/qobjectconnect.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/sources/pyside6/libpyside/qobjectconnect.h b/sources/pyside6/libpyside/qobjectconnect.h
new file mode 100644
index 000000000..c99b8006e
--- /dev/null
+++ b/sources/pyside6/libpyside/qobjectconnect.h
@@ -0,0 +1,47 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#ifndef QOBJECTCONNECT_H
+#define QOBJECTCONNECT_H
+
+#include "pysidemacros.h"
+
+#include <sbkpython.h>
+
+#include <QtCore/QMetaObject>
+
+QT_FORWARD_DECLARE_CLASS(QObject)
+QT_FORWARD_DECLARE_CLASS(QMetaMethod)
+
+namespace PySide
+{
+
+/// Helpers for QObject::connect(): Make a string-based connection
+PYSIDE_API QMetaObject::Connection
+ qobjectConnect(QObject *source, const char *signal,
+ QObject *receiver, const char *slot,
+ Qt::ConnectionType type);
+
+/// Helpers for QObject::connect(): Make a connection based on QMetaMethod
+PYSIDE_API QMetaObject::Connection
+ qobjectConnect(QObject *source, QMetaMethod signal,
+ QObject *receiver, QMetaMethod slot,
+ Qt::ConnectionType type);
+
+/// Helpers for QObject::connect(): Make a connection to a Python callback
+PYSIDE_API QMetaObject::Connection
+ qobjectConnectCallback(QObject *source, const char *signal,
+ PyObject *callback, Qt::ConnectionType type);
+
+/// Helpers for QObject::connect(): Make a connection to a Python callback and a context object
+PYSIDE_API QMetaObject::Connection
+ qobjectConnectCallback(QObject *source, const char *signal, QObject *context,
+ PyObject *callback, Qt::ConnectionType type);
+
+/// Helpers for QObject::disconnect(): Disconnect a Python callback
+PYSIDE_API bool qobjectDisconnectCallback(QObject *source, const char *signal,
+ PyObject *callback);
+
+} // namespace PySide
+
+#endif // QOBJECTCONNECT_H