mit neuen venv und exe-Files
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
# Automatically generated configuration for PyQt5.QAxContainer.
|
||||
|
||||
sip-version = "6.8.6"
|
||||
sip-abi-version = "12.15"
|
||||
module-tags = ["Qt_5_15_2", "WS_WIN"]
|
||||
module-disabled-features = []
|
||||
@@ -0,0 +1,48 @@
|
||||
// This is the SIP interface definition for the QAxContainer module of PyQt v5.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%Module(name=PyQt5.QAxContainer, keyword_arguments="Optional", use_limited_api=True)
|
||||
|
||||
%Import QtWidgets/QtWidgetsmod.sip
|
||||
|
||||
%Copying
|
||||
Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
|
||||
This file is part of PyQt5.
|
||||
|
||||
This file may be used under the terms of the GNU General Public License
|
||||
version 3.0 as published by the Free Software Foundation and appearing in
|
||||
the file LICENSE included in the packaging of this file. Please review the
|
||||
following information to ensure the GNU General Public License version 3.0
|
||||
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
|
||||
If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
then you may purchase a commercial license. For more information contact
|
||||
info@riverbankcomputing.com.
|
||||
|
||||
This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
%End
|
||||
|
||||
%DefaultSupertype sip.simplewrapper
|
||||
|
||||
%Include qaxbase.sip
|
||||
%Include qaxobject.sip
|
||||
%Include qaxwidget.sip
|
||||
@@ -0,0 +1,158 @@
|
||||
// This is the SIP interface definition for QAxBase.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QAxBase /Abstract, PyQtNoQMetaObject/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qaxbase.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
//QAxBase(IUnknown *iface = 0);
|
||||
virtual ~QAxBase();
|
||||
|
||||
QString control() const;
|
||||
|
||||
//long queryInterface(const QUuid &, void **) const;
|
||||
|
||||
// Note that the order of these overloads is significant.
|
||||
QVariant dynamicCall(const char *, QList<QVariant> & /GetWrapper/);
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipRes = new QVariant(sipCpp->dynamicCall(a0, *a1));
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
// Update the input list with the (possibly) new values.
|
||||
for (Py_ssize_t i = 0; i < PyList_Size(a1Wrapper); ++i)
|
||||
{
|
||||
QVariant *v = new QVariant(a1->at(i));
|
||||
PyObject *v_obj = sipConvertFromNewType(v, sipType_QVariant, NULL);
|
||||
|
||||
if (!v_obj)
|
||||
{
|
||||
delete v;
|
||||
sipIsErr = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (PyList_SetItem(a1Wrapper, i, v_obj) < 0)
|
||||
{
|
||||
Py_DECREF(v_obj);
|
||||
sipIsErr = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
%End
|
||||
|
||||
QVariant dynamicCall(const char *,
|
||||
const QVariant &value1 = QVariant(),
|
||||
const QVariant &value2 = QVariant(),
|
||||
const QVariant &value3 = QVariant(),
|
||||
const QVariant &value4 = QVariant(),
|
||||
const QVariant &value5 = QVariant(),
|
||||
const QVariant &value6 = QVariant(),
|
||||
const QVariant &value7 = QVariant(),
|
||||
const QVariant &value8 = QVariant());
|
||||
|
||||
// Note that the order of these overloads is significant.
|
||||
QAxObject *querySubObject(const char *, QList<QVariant> & /GetWrapper/);
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipRes = sipCpp->querySubObject(a0, *a1);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
// Update the input list with the (possibly) new values.
|
||||
for (Py_ssize_t i = 0; i < PyList_Size(a1Wrapper); ++i)
|
||||
{
|
||||
QVariant *v = new QVariant(a1->at(i));
|
||||
PyObject *v_obj = sipConvertFromNewType(v, sipType_QVariant, NULL);
|
||||
|
||||
if (!v_obj)
|
||||
{
|
||||
delete v;
|
||||
sipIsErr = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (PyList_SetItem(a1Wrapper, i, v_obj) < 0)
|
||||
{
|
||||
Py_DECREF(v_obj);
|
||||
sipIsErr = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
%End
|
||||
|
||||
QAxObject *querySubObject(const char *,
|
||||
const QVariant &value1 = QVariant(),
|
||||
const QVariant &value2 = QVariant(),
|
||||
const QVariant &value3 = QVariant(),
|
||||
const QVariant &value4 = QVariant(),
|
||||
const QVariant &value5 = QVariant(),
|
||||
const QVariant &value6 = QVariant(),
|
||||
const QVariant &value7 = QVariant(),
|
||||
const QVariant &value8 = QVariant());
|
||||
|
||||
// SIP has a bug triggered by a template definition being the subject of
|
||||
// multiple typedefs. It only really matters when building everything as
|
||||
// one big module (the code that implements the type is duplicated in
|
||||
// other cases). Until it is fixed we just avoid the problematic typedef.
|
||||
//typedef QMap<QString, QVariant> PropertyBag;
|
||||
//PropertyBag propertyBag() const;
|
||||
//void setPropertyBag(const PropertyBag &);
|
||||
QVariantMap propertyBag() const;
|
||||
void setPropertyBag(const QVariantMap &);
|
||||
|
||||
QString generateDocumentation();
|
||||
|
||||
virtual bool propertyWritable(const char *) const;
|
||||
virtual void setPropertyWritable(const char *, bool);
|
||||
|
||||
bool isNull() const;
|
||||
|
||||
QStringList verbs() const;
|
||||
|
||||
QVariant asVariant() const;
|
||||
|
||||
signals:
|
||||
void signal(const QString &, int, void *);
|
||||
void propertyChanged(const QString &);
|
||||
void exception(int, const QString &, const QString &, const QString &);
|
||||
|
||||
public:
|
||||
virtual void clear();
|
||||
bool setControl(const QString &);
|
||||
|
||||
void disableMetaObject();
|
||||
void disableClassInfo();
|
||||
void disableEventSink();
|
||||
|
||||
%If (Qt_5_13_0 -)
|
||||
unsigned long classContext() const;
|
||||
void setClassContext(unsigned long classContext);
|
||||
%End
|
||||
|
||||
protected:
|
||||
//virtual bool initialize(IUnknown** ptr);
|
||||
//bool initializeRemote(IUnknown** ptr);
|
||||
//bool initializeLicensed(IUnknown** ptr);
|
||||
//bool initializeActive(IUnknown** ptr);
|
||||
//bool initializeFromFile(IUnknown** ptr);
|
||||
};
|
||||
@@ -0,0 +1,66 @@
|
||||
// This is the SIP interface definition for QAxObject.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QAxObject : QObject, QAxBase /PyQtNoQMetaObject/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qaxobject.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QAxObject(QObject *parent /TransferThis/ = 0);
|
||||
QAxObject(const QString &, QObject *parent /TransferThis/ = 0);
|
||||
//QAxObject(IUnknown *, QObject *parent /TransferThis/ = 0);
|
||||
~QAxObject();
|
||||
|
||||
%ConvertToSubClassCode
|
||||
static struct class_graph {
|
||||
const char *name;
|
||||
sipTypeDef **type;
|
||||
int yes, no;
|
||||
} graph[] = {
|
||||
{sipName_QAxObject, &sipType_QAxObject, 1, -1},
|
||||
{sipName_QAxWidget, &sipType_QAxWidget, -1, -1},
|
||||
};
|
||||
|
||||
int i = 0;
|
||||
|
||||
sipType = NULL;
|
||||
|
||||
do
|
||||
{
|
||||
struct class_graph *cg = &graph[i];
|
||||
|
||||
if (cg->name != NULL && sipCpp->inherits(cg->name))
|
||||
{
|
||||
sipType = *cg->type;
|
||||
i = cg->yes;
|
||||
}
|
||||
else
|
||||
i = cg->no;
|
||||
}
|
||||
while (i >= 0);
|
||||
%End
|
||||
|
||||
bool doVerb(const QString &);
|
||||
|
||||
protected:
|
||||
void connectNotify(const QMetaMethod &);
|
||||
};
|
||||
@@ -0,0 +1,52 @@
|
||||
// This is the SIP interface definition for QAxWidget.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QAxWidget : QWidget, QAxBase /PyQtNoQMetaObject/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qaxwidget.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QAxWidget(QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = 0);
|
||||
QAxWidget(const QString &, QWidget *parent /TransferThis/ = 0,
|
||||
Qt::WindowFlags flags = 0);
|
||||
//QAxWidget(IUnknown *, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = 0);
|
||||
~QAxWidget();
|
||||
|
||||
void clear();
|
||||
bool doVerb(const QString &);
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize minimumSizeHint() const;
|
||||
|
||||
//virtual QaxAggregated *createAggregate();
|
||||
|
||||
protected:
|
||||
//bool initialize(IUnknown **);
|
||||
virtual bool createHostWindow(bool);
|
||||
|
||||
void changeEvent(QEvent *);
|
||||
void resizeEvent(QResizeEvent *);
|
||||
|
||||
virtual bool translateKeyEvent(int,int) const;
|
||||
|
||||
void connectNotify(const QMetaMethod &);
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
# Automatically generated configuration for PyQt5.QtBluetooth.
|
||||
|
||||
sip-version = "6.8.6"
|
||||
sip-abi-version = "12.15"
|
||||
module-tags = ["Qt_5_15_2", "WS_WIN"]
|
||||
module-disabled-features = []
|
||||
@@ -0,0 +1,71 @@
|
||||
// QtBluetoothmod.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%Module(name=PyQt5.QtBluetooth, keyword_arguments="Optional", use_limited_api=True)
|
||||
|
||||
%Import QtCore/QtCoremod.sip
|
||||
|
||||
%Copying
|
||||
Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
|
||||
This file is part of PyQt5.
|
||||
|
||||
This file may be used under the terms of the GNU General Public License
|
||||
version 3.0 as published by the Free Software Foundation and appearing in
|
||||
the file LICENSE included in the packaging of this file. Please review the
|
||||
following information to ensure the GNU General Public License version 3.0
|
||||
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
|
||||
If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
then you may purchase a commercial license. For more information contact
|
||||
info@riverbankcomputing.com.
|
||||
|
||||
This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
%End
|
||||
|
||||
%Include qbluetooth.sip
|
||||
%Include qbluetoothaddress.sip
|
||||
%Include qbluetoothdevicediscoveryagent.sip
|
||||
%Include qbluetoothdeviceinfo.sip
|
||||
%Include qbluetoothhostinfo.sip
|
||||
%Include qbluetoothlocaldevice.sip
|
||||
%Include qbluetoothserver.sip
|
||||
%Include qbluetoothservicediscoveryagent.sip
|
||||
%Include qbluetoothserviceinfo.sip
|
||||
%Include qbluetoothsocket.sip
|
||||
%Include qbluetoothtransfermanager.sip
|
||||
%Include qbluetoothtransferreply.sip
|
||||
%Include qbluetoothtransferrequest.sip
|
||||
%Include qbluetoothuuid.sip
|
||||
%Include qlowenergyadvertisingdata.sip
|
||||
%Include qlowenergyadvertisingparameters.sip
|
||||
%Include qlowenergycharacteristic.sip
|
||||
%Include qlowenergycharacteristicdata.sip
|
||||
%Include qlowenergyconnectionparameters.sip
|
||||
%Include qlowenergycontroller.sip
|
||||
%Include qlowenergydescriptor.sip
|
||||
%Include qlowenergydescriptordata.sip
|
||||
%Include qlowenergyservice.sip
|
||||
%Include qlowenergyservicedata.sip
|
||||
%Include qpybluetooth_qlist.sip
|
||||
%Include qpybluetooth_quint128.sip
|
||||
@@ -0,0 +1,63 @@
|
||||
// qbluetooth.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
namespace QBluetooth
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qbluetooth.h>
|
||||
%End
|
||||
|
||||
enum Security
|
||||
{
|
||||
NoSecurity,
|
||||
Authorization,
|
||||
Authentication,
|
||||
Encryption,
|
||||
Secure,
|
||||
};
|
||||
|
||||
typedef QFlags<QBluetooth::Security> SecurityFlags;
|
||||
QFlags<QBluetooth::Security> operator|(QBluetooth::Security f1, QFlags<QBluetooth::Security> f2);
|
||||
%If (Qt_5_7_0 -)
|
||||
|
||||
enum AttAccessConstraint
|
||||
{
|
||||
AttAuthorizationRequired,
|
||||
AttAuthenticationRequired,
|
||||
AttEncryptionRequired,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
typedef QFlags<QBluetooth::AttAccessConstraint> AttAccessConstraints;
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
QFlags<QBluetooth::AttAccessConstraint> operator|(QBluetooth::AttAccessConstraint f1, QFlags<QBluetooth::AttAccessConstraint> f2);
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
typedef quint16 QLowEnergyHandle;
|
||||
%End
|
||||
@@ -0,0 +1,46 @@
|
||||
// qbluetoothaddress.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
class QBluetoothAddress
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qbluetoothaddress.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QBluetoothAddress();
|
||||
explicit QBluetoothAddress(quint64 address);
|
||||
explicit QBluetoothAddress(const QString &address);
|
||||
QBluetoothAddress(const QBluetoothAddress &other);
|
||||
~QBluetoothAddress();
|
||||
bool isNull() const;
|
||||
void clear();
|
||||
bool operator<(const QBluetoothAddress &other) const;
|
||||
bool operator==(const QBluetoothAddress &other) const;
|
||||
bool operator!=(const QBluetoothAddress &other) const;
|
||||
quint64 toUInt64() const;
|
||||
QString toString() const;
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,114 @@
|
||||
// qbluetoothdevicediscoveryagent.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
class QBluetoothDeviceDiscoveryAgent : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qbluetoothdevicediscoveryagent.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Error
|
||||
{
|
||||
NoError,
|
||||
InputOutputError,
|
||||
PoweredOffError,
|
||||
%If (Qt_5_3_0 -)
|
||||
InvalidBluetoothAdapterError,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
UnsupportedPlatformError,
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
UnsupportedDiscoveryMethod,
|
||||
%End
|
||||
UnknownError,
|
||||
};
|
||||
|
||||
enum InquiryType
|
||||
{
|
||||
GeneralUnlimitedInquiry,
|
||||
LimitedInquiry,
|
||||
};
|
||||
|
||||
%If (Qt_5_6_1 -)
|
||||
explicit QBluetoothDeviceDiscoveryAgent(QObject *parent /TransferThis/ = 0);
|
||||
%End
|
||||
%If (- Qt_5_6_1)
|
||||
QBluetoothDeviceDiscoveryAgent(QObject *parent /TransferThis/ = 0);
|
||||
%End
|
||||
QBluetoothDeviceDiscoveryAgent(const QBluetoothAddress &deviceAdapter, QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QBluetoothDeviceDiscoveryAgent();
|
||||
QBluetoothDeviceDiscoveryAgent::InquiryType inquiryType() const;
|
||||
void setInquiryType(QBluetoothDeviceDiscoveryAgent::InquiryType type);
|
||||
bool isActive() const;
|
||||
QBluetoothDeviceDiscoveryAgent::Error error() const;
|
||||
QString errorString() const;
|
||||
QList<QBluetoothDeviceInfo> discoveredDevices() const;
|
||||
|
||||
public slots:
|
||||
void start();
|
||||
%If (Qt_5_8_0 -)
|
||||
void start(QBluetoothDeviceDiscoveryAgent::DiscoveryMethods method);
|
||||
%End
|
||||
void stop();
|
||||
|
||||
signals:
|
||||
void deviceDiscovered(const QBluetoothDeviceInfo &info);
|
||||
void finished();
|
||||
void error(QBluetoothDeviceDiscoveryAgent::Error error);
|
||||
void canceled();
|
||||
%If (Qt_5_12_0 -)
|
||||
void deviceUpdated(const QBluetoothDeviceInfo &info, QBluetoothDeviceInfo::Fields updatedFields);
|
||||
%End
|
||||
|
||||
public:
|
||||
%If (Qt_5_8_0 -)
|
||||
|
||||
enum DiscoveryMethod
|
||||
{
|
||||
NoMethod,
|
||||
ClassicMethod,
|
||||
LowEnergyMethod,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
typedef QFlags<QBluetoothDeviceDiscoveryAgent::DiscoveryMethod> DiscoveryMethods;
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
void setLowEnergyDiscoveryTimeout(int msTimeout);
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
int lowEnergyDiscoveryTimeout() const;
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
static QBluetoothDeviceDiscoveryAgent::DiscoveryMethods supportedDiscoveryMethods();
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
QFlags<QBluetoothDeviceDiscoveryAgent::DiscoveryMethod> operator|(QBluetoothDeviceDiscoveryAgent::DiscoveryMethod f1, QFlags<QBluetoothDeviceDiscoveryAgent::DiscoveryMethod> f2);
|
||||
%End
|
||||
@@ -0,0 +1,272 @@
|
||||
// qbluetoothdeviceinfo.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
class QBluetoothDeviceInfo
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qbluetoothdeviceinfo.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum MajorDeviceClass
|
||||
{
|
||||
MiscellaneousDevice,
|
||||
ComputerDevice,
|
||||
PhoneDevice,
|
||||
LANAccessDevice,
|
||||
%If (Qt_5_13_0 -)
|
||||
NetworkDevice,
|
||||
%End
|
||||
AudioVideoDevice,
|
||||
PeripheralDevice,
|
||||
ImagingDevice,
|
||||
WearableDevice,
|
||||
ToyDevice,
|
||||
HealthDevice,
|
||||
UncategorizedDevice,
|
||||
};
|
||||
|
||||
enum MinorMiscellaneousClass
|
||||
{
|
||||
UncategorizedMiscellaneous,
|
||||
};
|
||||
|
||||
enum MinorComputerClass
|
||||
{
|
||||
UncategorizedComputer,
|
||||
DesktopComputer,
|
||||
ServerComputer,
|
||||
LaptopComputer,
|
||||
HandheldClamShellComputer,
|
||||
HandheldComputer,
|
||||
WearableComputer,
|
||||
};
|
||||
|
||||
enum MinorPhoneClass
|
||||
{
|
||||
UncategorizedPhone,
|
||||
CellularPhone,
|
||||
CordlessPhone,
|
||||
SmartPhone,
|
||||
WiredModemOrVoiceGatewayPhone,
|
||||
CommonIsdnAccessPhone,
|
||||
};
|
||||
|
||||
enum MinorNetworkClass
|
||||
{
|
||||
NetworkFullService,
|
||||
NetworkLoadFactorOne,
|
||||
NetworkLoadFactorTwo,
|
||||
NetworkLoadFactorThree,
|
||||
NetworkLoadFactorFour,
|
||||
NetworkLoadFactorFive,
|
||||
NetworkLoadFactorSix,
|
||||
NetworkNoService,
|
||||
};
|
||||
|
||||
enum MinorAudioVideoClass
|
||||
{
|
||||
UncategorizedAudioVideoDevice,
|
||||
WearableHeadsetDevice,
|
||||
HandsFreeDevice,
|
||||
Microphone,
|
||||
Loudspeaker,
|
||||
Headphones,
|
||||
PortableAudioDevice,
|
||||
CarAudio,
|
||||
SetTopBox,
|
||||
HiFiAudioDevice,
|
||||
Vcr,
|
||||
VideoCamera,
|
||||
Camcorder,
|
||||
VideoMonitor,
|
||||
VideoDisplayAndLoudspeaker,
|
||||
VideoConferencing,
|
||||
GamingDevice,
|
||||
};
|
||||
|
||||
enum MinorPeripheralClass
|
||||
{
|
||||
UncategorizedPeripheral,
|
||||
KeyboardPeripheral,
|
||||
PointingDevicePeripheral,
|
||||
KeyboardWithPointingDevicePeripheral,
|
||||
JoystickPeripheral,
|
||||
GamepadPeripheral,
|
||||
RemoteControlPeripheral,
|
||||
SensingDevicePeripheral,
|
||||
DigitizerTabletPeripheral,
|
||||
CardReaderPeripheral,
|
||||
};
|
||||
|
||||
enum MinorImagingClass
|
||||
{
|
||||
UncategorizedImagingDevice,
|
||||
ImageDisplay,
|
||||
ImageCamera,
|
||||
ImageScanner,
|
||||
ImagePrinter,
|
||||
};
|
||||
|
||||
enum MinorWearableClass
|
||||
{
|
||||
UncategorizedWearableDevice,
|
||||
WearableWristWatch,
|
||||
WearablePager,
|
||||
WearableJacket,
|
||||
WearableHelmet,
|
||||
WearableGlasses,
|
||||
};
|
||||
|
||||
enum MinorToyClass
|
||||
{
|
||||
UncategorizedToy,
|
||||
ToyRobot,
|
||||
ToyVehicle,
|
||||
ToyDoll,
|
||||
ToyController,
|
||||
ToyGame,
|
||||
};
|
||||
|
||||
enum MinorHealthClass
|
||||
{
|
||||
UncategorizedHealthDevice,
|
||||
HealthBloodPressureMonitor,
|
||||
HealthThermometer,
|
||||
HealthWeightScale,
|
||||
HealthGlucoseMeter,
|
||||
HealthPulseOximeter,
|
||||
HealthDataDisplay,
|
||||
HealthStepCounter,
|
||||
};
|
||||
|
||||
enum ServiceClass
|
||||
{
|
||||
NoService,
|
||||
PositioningService,
|
||||
NetworkingService,
|
||||
RenderingService,
|
||||
CapturingService,
|
||||
ObjectTransferService,
|
||||
AudioService,
|
||||
TelephonyService,
|
||||
InformationService,
|
||||
AllServices,
|
||||
};
|
||||
|
||||
typedef QFlags<QBluetoothDeviceInfo::ServiceClass> ServiceClasses;
|
||||
|
||||
enum DataCompleteness
|
||||
{
|
||||
DataComplete,
|
||||
DataIncomplete,
|
||||
DataUnavailable,
|
||||
};
|
||||
|
||||
QBluetoothDeviceInfo();
|
||||
QBluetoothDeviceInfo(const QBluetoothAddress &address, const QString &name, quint32 classOfDevice);
|
||||
%If (Qt_5_5_0 -)
|
||||
QBluetoothDeviceInfo(const QBluetoothUuid &uuid, const QString &name, quint32 classOfDevice);
|
||||
%End
|
||||
QBluetoothDeviceInfo(const QBluetoothDeviceInfo &other);
|
||||
~QBluetoothDeviceInfo();
|
||||
bool isValid() const;
|
||||
bool isCached() const;
|
||||
void setCached(bool cached);
|
||||
bool operator==(const QBluetoothDeviceInfo &other) const;
|
||||
bool operator!=(const QBluetoothDeviceInfo &other) const;
|
||||
QBluetoothAddress address() const;
|
||||
QString name() const;
|
||||
QBluetoothDeviceInfo::ServiceClasses serviceClasses() const;
|
||||
QBluetoothDeviceInfo::MajorDeviceClass majorDeviceClass() const;
|
||||
quint8 minorDeviceClass() const;
|
||||
qint16 rssi() const;
|
||||
void setRssi(qint16 signal);
|
||||
void setServiceUuids(const QList<QBluetoothUuid> &uuids, QBluetoothDeviceInfo::DataCompleteness completeness);
|
||||
%If (Qt_5_13_0 -)
|
||||
void setServiceUuids(const QVector<QBluetoothUuid> &uuids);
|
||||
%End
|
||||
QList<QBluetoothUuid> serviceUuids(QBluetoothDeviceInfo::DataCompleteness *completeness /Out/ = 0) const;
|
||||
QBluetoothDeviceInfo::DataCompleteness serviceUuidsCompleteness() const;
|
||||
%If (Qt_5_4_0 -)
|
||||
|
||||
enum CoreConfiguration
|
||||
{
|
||||
UnknownCoreConfiguration,
|
||||
LowEnergyCoreConfiguration,
|
||||
BaseRateCoreConfiguration,
|
||||
BaseRateAndLowEnergyCoreConfiguration,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
typedef QFlags<QBluetoothDeviceInfo::CoreConfiguration> CoreConfigurations;
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
void setCoreConfigurations(QBluetoothDeviceInfo::CoreConfigurations coreConfigs);
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
QBluetoothDeviceInfo::CoreConfigurations coreConfigurations() const;
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
void setDeviceUuid(const QBluetoothUuid &uuid);
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
QBluetoothUuid deviceUuid() const;
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
|
||||
enum class Field
|
||||
{
|
||||
None /PyName=None_/,
|
||||
RSSI,
|
||||
ManufacturerData,
|
||||
All,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
typedef QFlags<QBluetoothDeviceInfo::Field> Fields;
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
QVector<quint16> manufacturerIds() const;
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
QByteArray manufacturerData(quint16 manufacturerId) const;
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
bool setManufacturerData(quint16 manufacturerId, const QByteArray &data);
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
QHash<quint16, QByteArray> manufacturerData() const;
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
QFlags<QBluetoothDeviceInfo::CoreConfiguration> operator|(QBluetoothDeviceInfo::CoreConfiguration f1, QFlags<QBluetoothDeviceInfo::CoreConfiguration> f2);
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
QFlags<QBluetoothDeviceInfo::ServiceClass> operator|(QBluetoothDeviceInfo::ServiceClass f1, QFlags<QBluetoothDeviceInfo::ServiceClass> f2);
|
||||
%End
|
||||
@@ -0,0 +1,47 @@
|
||||
// qbluetoothhostinfo.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
class QBluetoothHostInfo
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qbluetoothhostinfo.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QBluetoothHostInfo();
|
||||
QBluetoothHostInfo(const QBluetoothHostInfo &other);
|
||||
~QBluetoothHostInfo();
|
||||
QBluetoothAddress address() const;
|
||||
void setAddress(const QBluetoothAddress &address);
|
||||
QString name() const;
|
||||
void setName(const QString &name);
|
||||
%If (Qt_5_5_0 -)
|
||||
bool operator==(const QBluetoothHostInfo &other) const;
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
bool operator!=(const QBluetoothHostInfo &other) const;
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,92 @@
|
||||
// qbluetoothlocaldevice.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
class QBluetoothLocalDevice : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qbluetoothlocaldevice.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Pairing
|
||||
{
|
||||
Unpaired,
|
||||
Paired,
|
||||
AuthorizedPaired,
|
||||
};
|
||||
|
||||
enum HostMode
|
||||
{
|
||||
HostPoweredOff,
|
||||
HostConnectable,
|
||||
HostDiscoverable,
|
||||
HostDiscoverableLimitedInquiry,
|
||||
};
|
||||
|
||||
enum Error
|
||||
{
|
||||
NoError,
|
||||
PairingError,
|
||||
UnknownError,
|
||||
};
|
||||
|
||||
%If (Qt_5_6_1 -)
|
||||
explicit QBluetoothLocalDevice(QObject *parent /TransferThis/ = 0);
|
||||
%End
|
||||
%If (- Qt_5_6_1)
|
||||
QBluetoothLocalDevice(QObject *parent /TransferThis/ = 0);
|
||||
%End
|
||||
QBluetoothLocalDevice(const QBluetoothAddress &address, QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QBluetoothLocalDevice();
|
||||
bool isValid() const;
|
||||
void requestPairing(const QBluetoothAddress &address, QBluetoothLocalDevice::Pairing pairing);
|
||||
QBluetoothLocalDevice::Pairing pairingStatus(const QBluetoothAddress &address) const;
|
||||
void setHostMode(QBluetoothLocalDevice::HostMode mode);
|
||||
QBluetoothLocalDevice::HostMode hostMode() const;
|
||||
void powerOn();
|
||||
QString name() const;
|
||||
QBluetoothAddress address() const;
|
||||
static QList<QBluetoothHostInfo> allDevices();
|
||||
%If (Qt_5_3_0 -)
|
||||
QList<QBluetoothAddress> connectedDevices() const;
|
||||
%End
|
||||
|
||||
public slots:
|
||||
void pairingConfirmation(bool confirmation);
|
||||
|
||||
signals:
|
||||
void hostModeStateChanged(QBluetoothLocalDevice::HostMode state);
|
||||
void pairingFinished(const QBluetoothAddress &address, QBluetoothLocalDevice::Pairing pairing);
|
||||
void pairingDisplayPinCode(const QBluetoothAddress &address, QString pin);
|
||||
void pairingDisplayConfirmation(const QBluetoothAddress &address, QString pin);
|
||||
void error(QBluetoothLocalDevice::Error error);
|
||||
%If (Qt_5_3_0 -)
|
||||
void deviceConnected(const QBluetoothAddress &address);
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
void deviceDisconnected(const QBluetoothAddress &address);
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,108 @@
|
||||
// qbluetoothserver.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
class QBluetoothServer : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qbluetoothserver.h>
|
||||
%End
|
||||
|
||||
%ConvertToSubClassCode
|
||||
static struct class_graph {
|
||||
const char *name;
|
||||
sipTypeDef **type;
|
||||
int yes, no;
|
||||
} graph[] = {
|
||||
{sipName_QBluetoothDeviceDiscoveryAgent, &sipType_QBluetoothDeviceDiscoveryAgent, -1, 1},
|
||||
{sipName_QBluetoothServiceDiscoveryAgent, &sipType_QBluetoothServiceDiscoveryAgent, -1, 2},
|
||||
#if QT_VERSION >= 0x050400
|
||||
{sipName_QLowEnergyService, &sipType_QLowEnergyService, -1, 3},
|
||||
#else
|
||||
{0, 0, -1, 3},
|
||||
#endif
|
||||
{sipName_QBluetoothTransferReply, &sipType_QBluetoothTransferReply, -1, 4},
|
||||
{sipName_QBluetoothTransferManager, &sipType_QBluetoothTransferManager, -1, 5},
|
||||
{sipName_QBluetoothServer, &sipType_QBluetoothServer, -1, 6},
|
||||
#if QT_VERSION >= 0x050400
|
||||
{sipName_QLowEnergyController, &sipType_QLowEnergyController, -1, 7},
|
||||
#else
|
||||
{0, 0, -1, 7},
|
||||
#endif
|
||||
{sipName_QBluetoothSocket, &sipType_QBluetoothSocket, -1, 8},
|
||||
{sipName_QBluetoothLocalDevice, &sipType_QBluetoothLocalDevice, -1, -1},
|
||||
};
|
||||
|
||||
int i = 0;
|
||||
|
||||
sipType = NULL;
|
||||
|
||||
do
|
||||
{
|
||||
struct class_graph *cg = &graph[i];
|
||||
|
||||
if (cg->name != NULL && sipCpp->inherits(cg->name))
|
||||
{
|
||||
sipType = *cg->type;
|
||||
i = cg->yes;
|
||||
}
|
||||
else
|
||||
i = cg->no;
|
||||
}
|
||||
while (i >= 0);
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Error
|
||||
{
|
||||
NoError,
|
||||
UnknownError,
|
||||
PoweredOffError,
|
||||
InputOutputError,
|
||||
ServiceAlreadyRegisteredError,
|
||||
UnsupportedProtocolError,
|
||||
};
|
||||
|
||||
QBluetoothServer(QBluetoothServiceInfo::Protocol serverType, QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QBluetoothServer();
|
||||
void close() /ReleaseGIL/;
|
||||
bool listen(const QBluetoothAddress &address = QBluetoothAddress(), quint16 port = 0) /ReleaseGIL/;
|
||||
QBluetoothServiceInfo listen(const QBluetoothUuid &uuid, const QString &serviceName = QString()) /ReleaseGIL/;
|
||||
bool isListening() const;
|
||||
void setMaxPendingConnections(int numConnections);
|
||||
int maxPendingConnections() const;
|
||||
bool hasPendingConnections() const;
|
||||
QBluetoothSocket *nextPendingConnection() /Factory/;
|
||||
QBluetoothAddress serverAddress() const;
|
||||
quint16 serverPort() const;
|
||||
void setSecurityFlags(QBluetooth::SecurityFlags security);
|
||||
QBluetooth::SecurityFlags securityFlags() const;
|
||||
QBluetoothServiceInfo::Protocol serverType() const;
|
||||
QBluetoothServer::Error error() const;
|
||||
|
||||
signals:
|
||||
void newConnection();
|
||||
void error(QBluetoothServer::Error);
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,79 @@
|
||||
// qbluetoothservicediscoveryagent.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
class QBluetoothServiceDiscoveryAgent : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qbluetoothservicediscoveryagent.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Error
|
||||
{
|
||||
NoError,
|
||||
InputOutputError,
|
||||
PoweredOffError,
|
||||
%If (Qt_5_3_0 -)
|
||||
InvalidBluetoothAdapterError,
|
||||
%End
|
||||
UnknownError,
|
||||
};
|
||||
|
||||
enum DiscoveryMode
|
||||
{
|
||||
MinimalDiscovery,
|
||||
FullDiscovery,
|
||||
};
|
||||
|
||||
%If (Qt_5_6_1 -)
|
||||
explicit QBluetoothServiceDiscoveryAgent(QObject *parent /TransferThis/ = 0);
|
||||
%End
|
||||
%If (- Qt_5_6_1)
|
||||
QBluetoothServiceDiscoveryAgent(QObject *parent /TransferThis/ = 0);
|
||||
%End
|
||||
QBluetoothServiceDiscoveryAgent(const QBluetoothAddress &deviceAdapter, QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QBluetoothServiceDiscoveryAgent();
|
||||
bool isActive() const;
|
||||
QBluetoothServiceDiscoveryAgent::Error error() const;
|
||||
QString errorString() const;
|
||||
QList<QBluetoothServiceInfo> discoveredServices() const;
|
||||
void setUuidFilter(const QList<QBluetoothUuid> &uuids);
|
||||
void setUuidFilter(const QBluetoothUuid &uuid);
|
||||
QList<QBluetoothUuid> uuidFilter() const;
|
||||
bool setRemoteAddress(const QBluetoothAddress &address);
|
||||
QBluetoothAddress remoteAddress() const;
|
||||
|
||||
public slots:
|
||||
void start(QBluetoothServiceDiscoveryAgent::DiscoveryMode mode = QBluetoothServiceDiscoveryAgent::MinimalDiscovery);
|
||||
void stop();
|
||||
void clear();
|
||||
|
||||
signals:
|
||||
void serviceDiscovered(const QBluetoothServiceInfo &info);
|
||||
void finished();
|
||||
void canceled();
|
||||
void error(QBluetoothServiceDiscoveryAgent::Error error);
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,95 @@
|
||||
// qbluetoothserviceinfo.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
class QBluetoothServiceInfo
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qbluetoothserviceinfo.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum AttributeId
|
||||
{
|
||||
ServiceRecordHandle,
|
||||
ServiceClassIds,
|
||||
ServiceRecordState,
|
||||
ServiceId,
|
||||
ProtocolDescriptorList,
|
||||
BrowseGroupList,
|
||||
LanguageBaseAttributeIdList,
|
||||
ServiceInfoTimeToLive,
|
||||
ServiceAvailability,
|
||||
BluetoothProfileDescriptorList,
|
||||
DocumentationUrl,
|
||||
ClientExecutableUrl,
|
||||
IconUrl,
|
||||
AdditionalProtocolDescriptorList,
|
||||
PrimaryLanguageBase,
|
||||
ServiceName,
|
||||
ServiceDescription,
|
||||
ServiceProvider,
|
||||
};
|
||||
|
||||
enum Protocol
|
||||
{
|
||||
UnknownProtocol,
|
||||
L2capProtocol,
|
||||
RfcommProtocol,
|
||||
};
|
||||
|
||||
QBluetoothServiceInfo();
|
||||
QBluetoothServiceInfo(const QBluetoothServiceInfo &other);
|
||||
~QBluetoothServiceInfo();
|
||||
bool isValid() const;
|
||||
bool isComplete() const;
|
||||
void setDevice(const QBluetoothDeviceInfo &info);
|
||||
QBluetoothDeviceInfo device() const;
|
||||
QVariant attribute(quint16 attributeId) const;
|
||||
QList<quint16> attributes() const;
|
||||
bool contains(quint16 attributeId) const;
|
||||
void removeAttribute(quint16 attributeId);
|
||||
QBluetoothServiceInfo::Protocol socketProtocol() const;
|
||||
int protocolServiceMultiplexer() const;
|
||||
int serverChannel() const;
|
||||
QBluetoothServiceInfo::Sequence protocolDescriptor(QBluetoothUuid::ProtocolUuid protocol) const;
|
||||
bool isRegistered() const;
|
||||
bool registerService(const QBluetoothAddress &localAdapter = QBluetoothAddress());
|
||||
bool unregisterService();
|
||||
void setAttribute(quint16 attributeId, const QBluetoothUuid &value);
|
||||
void setAttribute(quint16 attributeId, const QBluetoothServiceInfo::Sequence &value);
|
||||
void setAttribute(quint16 attributeId, const QVariant &value);
|
||||
void setServiceName(const QString &name);
|
||||
QString serviceName() const;
|
||||
void setServiceDescription(const QString &description);
|
||||
QString serviceDescription() const;
|
||||
void setServiceProvider(const QString &provider);
|
||||
QString serviceProvider() const;
|
||||
void setServiceAvailability(quint8 availability);
|
||||
quint8 serviceAvailability() const;
|
||||
void setServiceUuid(const QBluetoothUuid &uuid);
|
||||
QBluetoothUuid serviceUuid() const;
|
||||
QList<QBluetoothUuid> serviceClassUuids() const;
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,149 @@
|
||||
// qbluetoothsocket.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
class QBluetoothSocket : public QIODevice
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qbluetoothsocket.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum SocketState
|
||||
{
|
||||
UnconnectedState,
|
||||
ServiceLookupState,
|
||||
ConnectingState,
|
||||
ConnectedState,
|
||||
BoundState,
|
||||
ClosingState,
|
||||
ListeningState,
|
||||
};
|
||||
|
||||
enum SocketError
|
||||
{
|
||||
NoSocketError,
|
||||
UnknownSocketError,
|
||||
HostNotFoundError,
|
||||
ServiceNotFoundError,
|
||||
NetworkError,
|
||||
UnsupportedProtocolError,
|
||||
%If (Qt_5_3_0 -)
|
||||
OperationError,
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
RemoteHostClosedError,
|
||||
%End
|
||||
};
|
||||
|
||||
QBluetoothSocket(QBluetoothServiceInfo::Protocol socketType, QObject *parent /TransferThis/ = 0);
|
||||
%If (Qt_5_6_1 -)
|
||||
explicit QBluetoothSocket(QObject *parent /TransferThis/ = 0);
|
||||
%End
|
||||
%If (- Qt_5_6_1)
|
||||
QBluetoothSocket(QObject *parent /TransferThis/ = 0);
|
||||
%End
|
||||
virtual ~QBluetoothSocket();
|
||||
void abort();
|
||||
virtual void close() /ReleaseGIL/;
|
||||
virtual bool isSequential() const;
|
||||
virtual qint64 bytesAvailable() const;
|
||||
virtual qint64 bytesToWrite() const;
|
||||
virtual bool canReadLine() const;
|
||||
void connectToService(const QBluetoothServiceInfo &service, QIODevice::OpenMode mode = QIODevice::ReadWrite) /ReleaseGIL/;
|
||||
void connectToService(const QBluetoothAddress &address, const QBluetoothUuid &uuid, QIODevice::OpenMode mode = QIODevice::ReadWrite) /ReleaseGIL/;
|
||||
void connectToService(const QBluetoothAddress &address, quint16 port, QIODevice::OpenMode mode = QIODevice::ReadWrite) /ReleaseGIL/;
|
||||
void disconnectFromService() /ReleaseGIL/;
|
||||
QString localName() const;
|
||||
QBluetoothAddress localAddress() const;
|
||||
quint16 localPort() const;
|
||||
QString peerName() const;
|
||||
QBluetoothAddress peerAddress() const;
|
||||
quint16 peerPort() const;
|
||||
bool setSocketDescriptor(int socketDescriptor, QBluetoothServiceInfo::Protocol socketType, QBluetoothSocket::SocketState state = QBluetoothSocket::ConnectedState, QIODevice::OpenMode mode = QIODevice::ReadWrite);
|
||||
int socketDescriptor() const;
|
||||
QBluetoothServiceInfo::Protocol socketType() const;
|
||||
QBluetoothSocket::SocketState state() const;
|
||||
QBluetoothSocket::SocketError error() const;
|
||||
QString errorString() const;
|
||||
|
||||
signals:
|
||||
void connected();
|
||||
void disconnected();
|
||||
void error(QBluetoothSocket::SocketError error);
|
||||
void stateChanged(QBluetoothSocket::SocketState state);
|
||||
|
||||
protected:
|
||||
virtual SIP_PYOBJECT readData(qint64 maxlen) /TypeHint="Py_v3:bytes;str",ReleaseGIL/ [qint64 (char *data, qint64 maxSize)];
|
||||
%MethodCode
|
||||
// Return the data read or None if there was an error.
|
||||
if (a0 < 0)
|
||||
{
|
||||
PyErr_SetString(PyExc_ValueError, "maximum length of data to be read cannot be negative");
|
||||
sipIsErr = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
char *s = new char[a0];
|
||||
qint64 len;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
#if defined(SIP_PROTECTED_IS_PUBLIC)
|
||||
len = sipSelfWasArg ? sipCpp->QBluetoothSocket::readData(s, a0) : sipCpp->readData(s, a0);
|
||||
#else
|
||||
len = sipCpp->sipProtectVirt_readData(sipSelfWasArg, s, a0);
|
||||
#endif
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
if (len < 0)
|
||||
{
|
||||
Py_INCREF(Py_None);
|
||||
sipRes = Py_None;
|
||||
}
|
||||
else
|
||||
{
|
||||
sipRes = SIPBytes_FromStringAndSize(s, len);
|
||||
|
||||
if (!sipRes)
|
||||
sipIsErr = 1;
|
||||
}
|
||||
|
||||
delete[] s;
|
||||
}
|
||||
%End
|
||||
|
||||
virtual qint64 writeData(const char *data /Array/, qint64 maxSize /ArraySize/) /ReleaseGIL/;
|
||||
void setSocketState(QBluetoothSocket::SocketState state);
|
||||
void setSocketError(QBluetoothSocket::SocketError error);
|
||||
void doDeviceDiscovery(const QBluetoothServiceInfo &service, QIODevice::OpenMode openMode);
|
||||
|
||||
public:
|
||||
%If (Qt_5_6_0 -)
|
||||
void setPreferredSecurityFlags(QBluetooth::SecurityFlags flags);
|
||||
%End
|
||||
%If (Qt_5_6_0 -)
|
||||
QBluetooth::SecurityFlags preferredSecurityFlags() const;
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,40 @@
|
||||
// qbluetoothtransfermanager.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
class QBluetoothTransferManager : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qbluetoothtransfermanager.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QBluetoothTransferManager(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QBluetoothTransferManager();
|
||||
QBluetoothTransferReply *put(const QBluetoothTransferRequest &request, QIODevice *data) /Transfer/;
|
||||
|
||||
signals:
|
||||
void finished(QBluetoothTransferReply *reply);
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,74 @@
|
||||
// qbluetoothtransferreply.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
class QBluetoothTransferReply : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qbluetoothtransferreply.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum TransferError
|
||||
{
|
||||
NoError,
|
||||
UnknownError,
|
||||
FileNotFoundError,
|
||||
HostNotFoundError,
|
||||
UserCanceledTransferError,
|
||||
%If (Qt_5_3_0 -)
|
||||
IODeviceNotReadableError,
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
ResourceBusyError,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
SessionError,
|
||||
%End
|
||||
};
|
||||
|
||||
virtual ~QBluetoothTransferReply();
|
||||
virtual bool isFinished() const = 0;
|
||||
virtual bool isRunning() const = 0;
|
||||
QBluetoothTransferManager *manager() const;
|
||||
virtual QBluetoothTransferReply::TransferError error() const = 0;
|
||||
virtual QString errorString() const = 0;
|
||||
QBluetoothTransferRequest request() const;
|
||||
|
||||
public slots:
|
||||
void abort();
|
||||
|
||||
signals:
|
||||
void finished(QBluetoothTransferReply *);
|
||||
void transferProgress(qint64 bytesTransferred, qint64 bytesTotal);
|
||||
%If (Qt_5_4_0 -)
|
||||
void error(QBluetoothTransferReply::TransferError lastError);
|
||||
%End
|
||||
|
||||
protected:
|
||||
explicit QBluetoothTransferReply(QObject *parent /TransferThis/ = 0);
|
||||
void setManager(QBluetoothTransferManager *manager);
|
||||
void setRequest(const QBluetoothTransferRequest &request);
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,51 @@
|
||||
// qbluetoothtransferrequest.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
class QBluetoothTransferRequest
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qbluetoothtransferrequest.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Attribute
|
||||
{
|
||||
DescriptionAttribute,
|
||||
TimeAttribute,
|
||||
TypeAttribute,
|
||||
LengthAttribute,
|
||||
NameAttribute,
|
||||
};
|
||||
|
||||
explicit QBluetoothTransferRequest(const QBluetoothAddress &address = QBluetoothAddress());
|
||||
QBluetoothTransferRequest(const QBluetoothTransferRequest &other);
|
||||
~QBluetoothTransferRequest();
|
||||
QVariant attribute(QBluetoothTransferRequest::Attribute code, const QVariant &defaultValue = QVariant()) const;
|
||||
void setAttribute(QBluetoothTransferRequest::Attribute code, const QVariant &value);
|
||||
QBluetoothAddress address() const;
|
||||
bool operator!=(const QBluetoothTransferRequest &other) const;
|
||||
bool operator==(const QBluetoothTransferRequest &other) const;
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,553 @@
|
||||
// qbluetoothuuid.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
class QBluetoothUuid : public QUuid
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qbluetoothuuid.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum ProtocolUuid
|
||||
{
|
||||
Sdp,
|
||||
Udp,
|
||||
Rfcomm,
|
||||
Tcp,
|
||||
TcsBin,
|
||||
TcsAt,
|
||||
Att,
|
||||
Obex,
|
||||
Ip,
|
||||
Ftp,
|
||||
Http,
|
||||
Wsp,
|
||||
Bnep,
|
||||
Upnp,
|
||||
Hidp,
|
||||
HardcopyControlChannel,
|
||||
HardcopyDataChannel,
|
||||
HardcopyNotification,
|
||||
Avctp,
|
||||
Avdtp,
|
||||
Cmtp,
|
||||
UdiCPlain,
|
||||
McapControlChannel,
|
||||
McapDataChannel,
|
||||
L2cap,
|
||||
};
|
||||
|
||||
enum ServiceClassUuid
|
||||
{
|
||||
ServiceDiscoveryServer,
|
||||
BrowseGroupDescriptor,
|
||||
PublicBrowseGroup,
|
||||
SerialPort,
|
||||
LANAccessUsingPPP,
|
||||
DialupNetworking,
|
||||
IrMCSync,
|
||||
ObexObjectPush,
|
||||
OBEXFileTransfer,
|
||||
IrMCSyncCommand,
|
||||
Headset,
|
||||
AudioSource,
|
||||
AudioSink,
|
||||
AV_RemoteControlTarget,
|
||||
AdvancedAudioDistribution,
|
||||
AV_RemoteControl,
|
||||
AV_RemoteControlController,
|
||||
HeadsetAG,
|
||||
PANU,
|
||||
NAP,
|
||||
GN,
|
||||
DirectPrinting,
|
||||
ReferencePrinting,
|
||||
ImagingResponder,
|
||||
ImagingAutomaticArchive,
|
||||
ImagingReferenceObjects,
|
||||
Handsfree,
|
||||
HandsfreeAudioGateway,
|
||||
DirectPrintingReferenceObjectsService,
|
||||
ReflectedUI,
|
||||
BasicPrinting,
|
||||
PrintingStatus,
|
||||
HumanInterfaceDeviceService,
|
||||
HardcopyCableReplacement,
|
||||
HCRPrint,
|
||||
HCRScan,
|
||||
SIMAccess,
|
||||
PhonebookAccessPCE,
|
||||
PhonebookAccessPSE,
|
||||
PhonebookAccess,
|
||||
HeadsetHS,
|
||||
MessageAccessServer,
|
||||
MessageNotificationServer,
|
||||
MessageAccessProfile,
|
||||
PnPInformation,
|
||||
GenericNetworking,
|
||||
GenericFileTransfer,
|
||||
GenericAudio,
|
||||
GenericTelephony,
|
||||
VideoSource,
|
||||
VideoSink,
|
||||
VideoDistribution,
|
||||
HDP,
|
||||
HDPSource,
|
||||
HDPSink,
|
||||
%If (Qt_5_3_0 -)
|
||||
BasicImage,
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
GNSS,
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
GNSSServer,
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
Display3D,
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
Glasses3D,
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
Synchronization3D,
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
MPSProfile,
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
MPSService,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
GenericAccess,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
GenericAttribute,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
ImmediateAlert,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
LinkLoss,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
TxPower,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
CurrentTimeService,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
ReferenceTimeUpdateService,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
NextDSTChangeService,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
Glucose,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
HealthThermometer,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
DeviceInformation,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
HeartRate,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
PhoneAlertStatusService,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
BatteryService,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
BloodPressure,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
AlertNotificationService,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
HumanInterfaceDevice,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
ScanParameters,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
RunningSpeedAndCadence,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
CyclingSpeedAndCadence,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
CyclingPower,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
LocationAndNavigation,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
EnvironmentalSensing,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
BodyComposition,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
UserData,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
WeightScale,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
BondManagement,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
ContinuousGlucoseMonitoring,
|
||||
%End
|
||||
};
|
||||
|
||||
%If (Qt_5_4_0 -)
|
||||
|
||||
enum CharacteristicType
|
||||
{
|
||||
DeviceName,
|
||||
Appearance,
|
||||
PeripheralPrivacyFlag,
|
||||
ReconnectionAddress,
|
||||
PeripheralPreferredConnectionParameters,
|
||||
ServiceChanged,
|
||||
AlertLevel,
|
||||
TxPowerLevel,
|
||||
DateTime,
|
||||
DayOfWeek,
|
||||
DayDateTime,
|
||||
ExactTime256,
|
||||
DSTOffset,
|
||||
TimeZone,
|
||||
LocalTimeInformation,
|
||||
TimeWithDST,
|
||||
TimeAccuracy,
|
||||
TimeSource,
|
||||
ReferenceTimeInformation,
|
||||
TimeUpdateControlPoint,
|
||||
TimeUpdateState,
|
||||
GlucoseMeasurement,
|
||||
BatteryLevel,
|
||||
TemperatureMeasurement,
|
||||
TemperatureType,
|
||||
IntermediateTemperature,
|
||||
MeasurementInterval,
|
||||
BootKeyboardInputReport,
|
||||
SystemID,
|
||||
ModelNumberString,
|
||||
SerialNumberString,
|
||||
FirmwareRevisionString,
|
||||
HardwareRevisionString,
|
||||
SoftwareRevisionString,
|
||||
ManufacturerNameString,
|
||||
IEEE1107320601RegulatoryCertificationDataList,
|
||||
CurrentTime,
|
||||
ScanRefresh,
|
||||
BootKeyboardOutputReport,
|
||||
BootMouseInputReport,
|
||||
GlucoseMeasurementContext,
|
||||
BloodPressureMeasurement,
|
||||
IntermediateCuffPressure,
|
||||
HeartRateMeasurement,
|
||||
BodySensorLocation,
|
||||
HeartRateControlPoint,
|
||||
AlertStatus,
|
||||
RingerControlPoint,
|
||||
RingerSetting,
|
||||
AlertCategoryIDBitMask,
|
||||
AlertCategoryID,
|
||||
AlertNotificationControlPoint,
|
||||
UnreadAlertStatus,
|
||||
NewAlert,
|
||||
SupportedNewAlertCategory,
|
||||
SupportedUnreadAlertCategory,
|
||||
BloodPressureFeature,
|
||||
HIDInformation,
|
||||
ReportMap,
|
||||
HIDControlPoint,
|
||||
Report,
|
||||
ProtocolMode,
|
||||
ScanIntervalWindow,
|
||||
PnPID,
|
||||
GlucoseFeature,
|
||||
RecordAccessControlPoint,
|
||||
RSCMeasurement,
|
||||
RSCFeature,
|
||||
SCControlPoint,
|
||||
CSCMeasurement,
|
||||
CSCFeature,
|
||||
SensorLocation,
|
||||
CyclingPowerMeasurement,
|
||||
CyclingPowerVector,
|
||||
CyclingPowerFeature,
|
||||
CyclingPowerControlPoint,
|
||||
LocationAndSpeed,
|
||||
Navigation,
|
||||
PositionQuality,
|
||||
LNFeature,
|
||||
LNControlPoint,
|
||||
%If (Qt_5_5_0 -)
|
||||
MagneticDeclination,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
Elevation,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
Pressure,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
Temperature,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
Humidity,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
TrueWindSpeed,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
TrueWindDirection,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
ApparentWindSpeed,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
ApparentWindDirection,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
GustFactor,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
PollenConcentration,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
UVIndex,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
Irradiance,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
Rainfall,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
WindChill,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
HeatIndex,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
DewPoint,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
DescriptorValueChanged,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
AerobicHeartRateLowerLimit,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
AerobicThreshold,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
Age,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
AnaerobicHeartRateLowerLimit,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
AnaerobicHeartRateUpperLimit,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
AnaerobicThreshold,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
AerobicHeartRateUpperLimit,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
DateOfBirth,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
DateOfThresholdAssessment,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
EmailAddress,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
FatBurnHeartRateLowerLimit,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
FatBurnHeartRateUpperLimit,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
FirstName,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
FiveZoneHeartRateLimits,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
Gender,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
HeartRateMax,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
Height,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
HipCircumference,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
LastName,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
MaximumRecommendedHeartRate,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
RestingHeartRate,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
SportTypeForAerobicAnaerobicThresholds,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
ThreeZoneHeartRateLimits,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
TwoZoneHeartRateLimits,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
VO2Max,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
WaistCircumference,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
Weight,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
DatabaseChangeIncrement,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
UserIndex,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
BodyCompositionFeature,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
BodyCompositionMeasurement,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
WeightMeasurement,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
WeightScaleFeature,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
UserControlPoint,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
MagneticFluxDensity2D,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
MagneticFluxDensity3D,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
Language,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
BarometricPressureTrend,
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
|
||||
enum DescriptorType
|
||||
{
|
||||
UnknownDescriptorType,
|
||||
CharacteristicExtendedProperties,
|
||||
CharacteristicUserDescription,
|
||||
ClientCharacteristicConfiguration,
|
||||
ServerCharacteristicConfiguration,
|
||||
CharacteristicPresentationFormat,
|
||||
CharacteristicAggregateFormat,
|
||||
ValidRange,
|
||||
ExternalReportReference,
|
||||
ReportReference,
|
||||
%If (Qt_5_5_0 -)
|
||||
EnvironmentalSensingConfiguration,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
EnvironmentalSensingMeasurement,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
EnvironmentalSensingTriggerSetting,
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
QBluetoothUuid();
|
||||
QBluetoothUuid(QBluetoothUuid::ProtocolUuid uuid /Constrained/);
|
||||
QBluetoothUuid(QBluetoothUuid::ServiceClassUuid uuid /Constrained/);
|
||||
%If (Qt_5_4_0 -)
|
||||
QBluetoothUuid(QBluetoothUuid::CharacteristicType uuid /Constrained/);
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
QBluetoothUuid(QBluetoothUuid::DescriptorType uuid /Constrained/);
|
||||
%End
|
||||
explicit QBluetoothUuid(quint32 uuid);
|
||||
explicit QBluetoothUuid(quint128 uuid);
|
||||
explicit QBluetoothUuid(const QString &uuid);
|
||||
QBluetoothUuid(const QBluetoothUuid &uuid);
|
||||
QBluetoothUuid(const QUuid &uuid);
|
||||
~QBluetoothUuid();
|
||||
bool operator==(const QBluetoothUuid &other) const;
|
||||
%If (Qt_5_7_0 -)
|
||||
bool operator!=(const QBluetoothUuid &other) const;
|
||||
%End
|
||||
int minimumSize() const;
|
||||
quint16 toUInt16(bool *ok = 0) const;
|
||||
quint32 toUInt32(bool *ok = 0) const;
|
||||
quint128 toUInt128() const;
|
||||
%If (Qt_5_4_0 -)
|
||||
static QString serviceClassToString(QBluetoothUuid::ServiceClassUuid uuid);
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
static QString protocolToString(QBluetoothUuid::ProtocolUuid uuid);
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
static QString characteristicToString(QBluetoothUuid::CharacteristicType uuid);
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
static QString descriptorToString(QBluetoothUuid::DescriptorType uuid);
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
QDataStream &operator<<(QDataStream &s, const QBluetoothUuid &uuid /Constrained/) /ReleaseGIL/;
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
QDataStream &operator>>(QDataStream &s, QBluetoothUuid &uuid /Constrained/) /ReleaseGIL/;
|
||||
%End
|
||||
@@ -0,0 +1,66 @@
|
||||
// qlowenergyadvertisingdata.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_7_0 -)
|
||||
|
||||
class QLowEnergyAdvertisingData
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlowenergyadvertisingdata.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QLowEnergyAdvertisingData();
|
||||
QLowEnergyAdvertisingData(const QLowEnergyAdvertisingData &other);
|
||||
~QLowEnergyAdvertisingData();
|
||||
void setLocalName(const QString &name);
|
||||
QString localName() const;
|
||||
static quint16 invalidManufacturerId();
|
||||
void setManufacturerData(quint16 id, const QByteArray &data);
|
||||
quint16 manufacturerId() const;
|
||||
QByteArray manufacturerData() const;
|
||||
void setIncludePowerLevel(bool doInclude);
|
||||
bool includePowerLevel() const;
|
||||
|
||||
enum Discoverability
|
||||
{
|
||||
DiscoverabilityNone,
|
||||
DiscoverabilityLimited,
|
||||
DiscoverabilityGeneral,
|
||||
};
|
||||
|
||||
void setDiscoverability(QLowEnergyAdvertisingData::Discoverability mode);
|
||||
QLowEnergyAdvertisingData::Discoverability discoverability() const;
|
||||
void setServices(const QList<QBluetoothUuid> &services);
|
||||
QList<QBluetoothUuid> services() const;
|
||||
void setRawData(const QByteArray &data);
|
||||
QByteArray rawData() const;
|
||||
void swap(QLowEnergyAdvertisingData &other);
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
bool operator==(const QLowEnergyAdvertisingData &data1, const QLowEnergyAdvertisingData &data2);
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
bool operator!=(const QLowEnergyAdvertisingData &data1, const QLowEnergyAdvertisingData &data2);
|
||||
%End
|
||||
@@ -0,0 +1,84 @@
|
||||
// qlowenergyadvertisingparameters.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_7_0 -)
|
||||
|
||||
class QLowEnergyAdvertisingParameters
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlowenergyadvertisingparameters.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QLowEnergyAdvertisingParameters();
|
||||
QLowEnergyAdvertisingParameters(const QLowEnergyAdvertisingParameters &other);
|
||||
~QLowEnergyAdvertisingParameters();
|
||||
|
||||
enum Mode
|
||||
{
|
||||
AdvInd,
|
||||
AdvScanInd,
|
||||
AdvNonConnInd,
|
||||
};
|
||||
|
||||
void setMode(QLowEnergyAdvertisingParameters::Mode mode);
|
||||
QLowEnergyAdvertisingParameters::Mode mode() const;
|
||||
|
||||
struct AddressInfo
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlowenergyadvertisingparameters.h>
|
||||
%End
|
||||
|
||||
AddressInfo(const QBluetoothAddress &addr, QLowEnergyController::RemoteAddressType t);
|
||||
AddressInfo();
|
||||
QBluetoothAddress address;
|
||||
QLowEnergyController::RemoteAddressType type;
|
||||
};
|
||||
|
||||
enum FilterPolicy
|
||||
{
|
||||
IgnoreWhiteList,
|
||||
UseWhiteListForScanning,
|
||||
UseWhiteListForConnecting,
|
||||
UseWhiteListForScanningAndConnecting,
|
||||
};
|
||||
|
||||
void setWhiteList(const QList<QLowEnergyAdvertisingParameters::AddressInfo> &whiteList, QLowEnergyAdvertisingParameters::FilterPolicy policy);
|
||||
QList<QLowEnergyAdvertisingParameters::AddressInfo> whiteList() const;
|
||||
QLowEnergyAdvertisingParameters::FilterPolicy filterPolicy() const;
|
||||
void setInterval(quint16 minimum, quint16 maximum);
|
||||
int minimumInterval() const;
|
||||
int maximumInterval() const;
|
||||
void swap(QLowEnergyAdvertisingParameters &other);
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
bool operator==(const QLowEnergyAdvertisingParameters &p1, const QLowEnergyAdvertisingParameters &p2);
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
bool operator==(const QLowEnergyAdvertisingParameters::AddressInfo &ai1, const QLowEnergyAdvertisingParameters::AddressInfo &ai2);
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
bool operator!=(const QLowEnergyAdvertisingParameters &p1, const QLowEnergyAdvertisingParameters &p2);
|
||||
%End
|
||||
@@ -0,0 +1,64 @@
|
||||
// qlowenergycharacteristic.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_4_0 -)
|
||||
|
||||
class QLowEnergyCharacteristic
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlowenergycharacteristic.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum PropertyType
|
||||
{
|
||||
Unknown,
|
||||
Broadcasting,
|
||||
Read,
|
||||
WriteNoResponse,
|
||||
Write,
|
||||
Notify,
|
||||
Indicate,
|
||||
WriteSigned,
|
||||
ExtendedProperty,
|
||||
};
|
||||
|
||||
typedef QFlags<QLowEnergyCharacteristic::PropertyType> PropertyTypes;
|
||||
QLowEnergyCharacteristic();
|
||||
QLowEnergyCharacteristic(const QLowEnergyCharacteristic &other);
|
||||
~QLowEnergyCharacteristic();
|
||||
bool operator==(const QLowEnergyCharacteristic &other) const;
|
||||
bool operator!=(const QLowEnergyCharacteristic &other) const;
|
||||
QString name() const;
|
||||
QBluetoothUuid uuid() const;
|
||||
QByteArray value() const;
|
||||
QLowEnergyCharacteristic::PropertyTypes properties() const;
|
||||
QLowEnergyHandle handle() const;
|
||||
QLowEnergyDescriptor descriptor(const QBluetoothUuid &uuid) const;
|
||||
QList<QLowEnergyDescriptor> descriptors() const;
|
||||
bool isValid() const;
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
QFlags<QLowEnergyCharacteristic::PropertyType> operator|(QLowEnergyCharacteristic::PropertyType f1, QFlags<QLowEnergyCharacteristic::PropertyType> f2);
|
||||
%End
|
||||
@@ -0,0 +1,61 @@
|
||||
// qlowenergycharacteristicdata.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_7_0 -)
|
||||
|
||||
class QLowEnergyCharacteristicData
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlowenergycharacteristicdata.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QLowEnergyCharacteristicData();
|
||||
QLowEnergyCharacteristicData(const QLowEnergyCharacteristicData &other);
|
||||
~QLowEnergyCharacteristicData();
|
||||
QBluetoothUuid uuid() const;
|
||||
void setUuid(const QBluetoothUuid &uuid);
|
||||
QByteArray value() const;
|
||||
void setValue(const QByteArray &value);
|
||||
QLowEnergyCharacteristic::PropertyTypes properties() const;
|
||||
void setProperties(QLowEnergyCharacteristic::PropertyTypes properties);
|
||||
QList<QLowEnergyDescriptorData> descriptors() const;
|
||||
void setDescriptors(const QList<QLowEnergyDescriptorData> &descriptors);
|
||||
void addDescriptor(const QLowEnergyDescriptorData &descriptor);
|
||||
void setReadConstraints(QBluetooth::AttAccessConstraints constraints);
|
||||
QBluetooth::AttAccessConstraints readConstraints() const;
|
||||
void setWriteConstraints(QBluetooth::AttAccessConstraints constraints);
|
||||
QBluetooth::AttAccessConstraints writeConstraints() const;
|
||||
void setValueLength(int minimum, int maximum);
|
||||
int minimumValueLength() const;
|
||||
int maximumValueLength() const;
|
||||
bool isValid() const;
|
||||
void swap(QLowEnergyCharacteristicData &other);
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
bool operator==(const QLowEnergyCharacteristicData &cd1, const QLowEnergyCharacteristicData &cd2);
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
bool operator!=(const QLowEnergyCharacteristicData &cd1, const QLowEnergyCharacteristicData &cd2);
|
||||
%End
|
||||
@@ -0,0 +1,51 @@
|
||||
// qlowenergyconnectionparameters.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_7_0 -)
|
||||
|
||||
class QLowEnergyConnectionParameters
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlowenergyconnectionparameters.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QLowEnergyConnectionParameters();
|
||||
QLowEnergyConnectionParameters(const QLowEnergyConnectionParameters &other);
|
||||
~QLowEnergyConnectionParameters();
|
||||
void setIntervalRange(double minimum, double maximum);
|
||||
double minimumInterval() const;
|
||||
double maximumInterval() const;
|
||||
void setLatency(int latency);
|
||||
int latency() const;
|
||||
void setSupervisionTimeout(int timeout);
|
||||
int supervisionTimeout() const;
|
||||
void swap(QLowEnergyConnectionParameters &other);
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
bool operator==(const QLowEnergyConnectionParameters &p1, const QLowEnergyConnectionParameters &p2);
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
bool operator!=(const QLowEnergyConnectionParameters &p1, const QLowEnergyConnectionParameters &p2);
|
||||
%End
|
||||
@@ -0,0 +1,153 @@
|
||||
// qlowenergycontroller.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_4_0 -)
|
||||
|
||||
class QLowEnergyController : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlowenergycontroller.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Error
|
||||
{
|
||||
NoError,
|
||||
UnknownError,
|
||||
UnknownRemoteDeviceError,
|
||||
NetworkError,
|
||||
InvalidBluetoothAdapterError,
|
||||
%If (Qt_5_5_0 -)
|
||||
ConnectionError,
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
AdvertisingError,
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
RemoteHostClosedError,
|
||||
%End
|
||||
%If (Qt_5_14_0 -)
|
||||
AuthorizationError,
|
||||
%End
|
||||
};
|
||||
|
||||
enum ControllerState
|
||||
{
|
||||
UnconnectedState,
|
||||
ConnectingState,
|
||||
ConnectedState,
|
||||
DiscoveringState,
|
||||
DiscoveredState,
|
||||
ClosingState,
|
||||
%If (Qt_5_7_0 -)
|
||||
AdvertisingState,
|
||||
%End
|
||||
};
|
||||
|
||||
enum RemoteAddressType
|
||||
{
|
||||
PublicAddress,
|
||||
RandomAddress,
|
||||
};
|
||||
|
||||
%If (Qt_5_5_0 -)
|
||||
QLowEnergyController(const QBluetoothDeviceInfo &remoteDevice, QObject *parent /TransferThis/ = 0);
|
||||
%End
|
||||
QLowEnergyController(const QBluetoothAddress &remoteDevice, QObject *parent /TransferThis/ = 0);
|
||||
QLowEnergyController(const QBluetoothAddress &remoteDevice, const QBluetoothAddress &localDevice, QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QLowEnergyController();
|
||||
QBluetoothAddress localAddress() const;
|
||||
QBluetoothAddress remoteAddress() const;
|
||||
QLowEnergyController::ControllerState state() const;
|
||||
QLowEnergyController::RemoteAddressType remoteAddressType() const;
|
||||
void setRemoteAddressType(QLowEnergyController::RemoteAddressType type);
|
||||
void connectToDevice();
|
||||
void disconnectFromDevice();
|
||||
void discoverServices();
|
||||
QList<QBluetoothUuid> services() const;
|
||||
QLowEnergyService *createServiceObject(const QBluetoothUuid &service, QObject *parent /TransferThis/ = 0) /Factory/;
|
||||
QLowEnergyController::Error error() const;
|
||||
QString errorString() const;
|
||||
%If (Qt_5_5_0 -)
|
||||
QString remoteName() const;
|
||||
%End
|
||||
|
||||
signals:
|
||||
void connected();
|
||||
void disconnected();
|
||||
void stateChanged(QLowEnergyController::ControllerState state);
|
||||
void error(QLowEnergyController::Error newError);
|
||||
void serviceDiscovered(const QBluetoothUuid &newService);
|
||||
void discoveryFinished();
|
||||
|
||||
public:
|
||||
%If (Qt_5_7_0 -)
|
||||
|
||||
enum Role
|
||||
{
|
||||
CentralRole,
|
||||
PeripheralRole,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
static QLowEnergyController *createCentral(const QBluetoothDeviceInfo &remoteDevice, QObject *parent /TransferThis/ = 0) /Factory/;
|
||||
%End
|
||||
%If (Qt_5_14_0 -)
|
||||
static QLowEnergyController *createCentral(const QBluetoothAddress &remoteDevice, const QBluetoothAddress &localDevice, QObject *parent /TransferThis/ = 0) /Factory/;
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
static QLowEnergyController *createPeripheral(QObject *parent /TransferThis/ = 0) /Factory/;
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
void startAdvertising(const QLowEnergyAdvertisingParameters ¶meters, const QLowEnergyAdvertisingData &advertisingData, const QLowEnergyAdvertisingData &scanResponseData = QLowEnergyAdvertisingData());
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
void stopAdvertising();
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
QLowEnergyService *addService(const QLowEnergyServiceData &service, QObject *parent /TransferThis/ = 0) /Factory/;
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
void requestConnectionUpdate(const QLowEnergyConnectionParameters ¶meters);
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
QLowEnergyController::Role role() const;
|
||||
%End
|
||||
|
||||
signals:
|
||||
%If (Qt_5_7_0 -)
|
||||
void connectionUpdated(const QLowEnergyConnectionParameters ¶meters);
|
||||
%End
|
||||
|
||||
public:
|
||||
%If (Qt_5_8_0 -)
|
||||
QBluetoothUuid remoteDeviceUuid() const;
|
||||
%End
|
||||
|
||||
private:
|
||||
%If (Qt_5_7_0 -)
|
||||
explicit QLowEnergyController(QObject *parent = 0);
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,45 @@
|
||||
// qlowenergydescriptor.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_4_0 -)
|
||||
|
||||
class QLowEnergyDescriptor
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlowenergydescriptor.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QLowEnergyDescriptor();
|
||||
QLowEnergyDescriptor(const QLowEnergyDescriptor &other);
|
||||
~QLowEnergyDescriptor();
|
||||
bool operator==(const QLowEnergyDescriptor &other) const;
|
||||
bool operator!=(const QLowEnergyDescriptor &other) const;
|
||||
bool isValid() const;
|
||||
QByteArray value() const;
|
||||
QBluetoothUuid uuid() const;
|
||||
QLowEnergyHandle handle() const;
|
||||
QString name() const;
|
||||
QBluetoothUuid::DescriptorType type() const;
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,56 @@
|
||||
// qlowenergydescriptordata.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_7_0 -)
|
||||
|
||||
class QLowEnergyDescriptorData
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlowenergydescriptordata.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QLowEnergyDescriptorData();
|
||||
QLowEnergyDescriptorData(const QBluetoothUuid &uuid, const QByteArray &value);
|
||||
QLowEnergyDescriptorData(const QLowEnergyDescriptorData &other);
|
||||
~QLowEnergyDescriptorData();
|
||||
QByteArray value() const;
|
||||
void setValue(const QByteArray &value);
|
||||
QBluetoothUuid uuid() const;
|
||||
void setUuid(const QBluetoothUuid &uuid);
|
||||
bool isValid() const;
|
||||
void setReadPermissions(bool readable, QBluetooth::AttAccessConstraints constraints = QBluetooth::AttAccessConstraints());
|
||||
bool isReadable() const;
|
||||
QBluetooth::AttAccessConstraints readConstraints() const;
|
||||
void setWritePermissions(bool writable, QBluetooth::AttAccessConstraints constraints = QBluetooth::AttAccessConstraints());
|
||||
bool isWritable() const;
|
||||
QBluetooth::AttAccessConstraints writeConstraints() const;
|
||||
void swap(QLowEnergyDescriptorData &other);
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
bool operator==(const QLowEnergyDescriptorData &d1, const QLowEnergyDescriptorData &d12);
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
bool operator!=(const QLowEnergyDescriptorData &d1, const QLowEnergyDescriptorData &d2);
|
||||
%End
|
||||
@@ -0,0 +1,119 @@
|
||||
// qlowenergyservice.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_4_0 -)
|
||||
|
||||
class QLowEnergyService : public QObject /NoDefaultCtors/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlowenergyservice.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum ServiceType
|
||||
{
|
||||
PrimaryService,
|
||||
IncludedService,
|
||||
};
|
||||
|
||||
typedef QFlags<QLowEnergyService::ServiceType> ServiceTypes;
|
||||
|
||||
enum ServiceError
|
||||
{
|
||||
NoError,
|
||||
OperationError,
|
||||
CharacteristicWriteError,
|
||||
DescriptorWriteError,
|
||||
%If (Qt_5_5_0 -)
|
||||
CharacteristicReadError,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
DescriptorReadError,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
UnknownError,
|
||||
%End
|
||||
};
|
||||
|
||||
enum ServiceState
|
||||
{
|
||||
InvalidService,
|
||||
DiscoveryRequired,
|
||||
DiscoveringServices,
|
||||
ServiceDiscovered,
|
||||
%If (Qt_5_7_0 -)
|
||||
LocalService,
|
||||
%End
|
||||
};
|
||||
|
||||
enum WriteMode
|
||||
{
|
||||
WriteWithResponse,
|
||||
WriteWithoutResponse,
|
||||
%If (Qt_5_7_0 -)
|
||||
WriteSigned,
|
||||
%End
|
||||
};
|
||||
|
||||
virtual ~QLowEnergyService();
|
||||
QList<QBluetoothUuid> includedServices() const;
|
||||
QLowEnergyService::ServiceTypes type() const;
|
||||
QLowEnergyService::ServiceState state() const;
|
||||
QLowEnergyCharacteristic characteristic(const QBluetoothUuid &uuid) const;
|
||||
QList<QLowEnergyCharacteristic> characteristics() const;
|
||||
QBluetoothUuid serviceUuid() const;
|
||||
QString serviceName() const;
|
||||
void discoverDetails();
|
||||
QLowEnergyService::ServiceError error() const;
|
||||
bool contains(const QLowEnergyCharacteristic &characteristic) const;
|
||||
bool contains(const QLowEnergyDescriptor &descriptor) const;
|
||||
void writeCharacteristic(const QLowEnergyCharacteristic &characteristic, const QByteArray &newValue, QLowEnergyService::WriteMode mode = QLowEnergyService::WriteWithResponse);
|
||||
void writeDescriptor(const QLowEnergyDescriptor &descriptor, const QByteArray &newValue);
|
||||
|
||||
signals:
|
||||
void stateChanged(QLowEnergyService::ServiceState newState);
|
||||
void characteristicChanged(const QLowEnergyCharacteristic &info, const QByteArray &value);
|
||||
void characteristicWritten(const QLowEnergyCharacteristic &info, const QByteArray &value);
|
||||
void descriptorWritten(const QLowEnergyDescriptor &info, const QByteArray &value);
|
||||
void error(QLowEnergyService::ServiceError error);
|
||||
|
||||
public:
|
||||
%If (Qt_5_5_0 -)
|
||||
void readCharacteristic(const QLowEnergyCharacteristic &characteristic);
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
void readDescriptor(const QLowEnergyDescriptor &descriptor);
|
||||
%End
|
||||
|
||||
signals:
|
||||
%If (Qt_5_5_0 -)
|
||||
void characteristicRead(const QLowEnergyCharacteristic &info, const QByteArray &value);
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
void descriptorRead(const QLowEnergyDescriptor &info, const QByteArray &value);
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
QFlags<QLowEnergyService::ServiceType> operator|(QLowEnergyService::ServiceType f1, QFlags<QLowEnergyService::ServiceType> f2);
|
||||
%End
|
||||
@@ -0,0 +1,62 @@
|
||||
// qlowenergyservicedata.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtBluetooth Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_7_0 -)
|
||||
|
||||
class QLowEnergyServiceData
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlowenergyservicedata.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QLowEnergyServiceData();
|
||||
QLowEnergyServiceData(const QLowEnergyServiceData &other);
|
||||
~QLowEnergyServiceData();
|
||||
|
||||
enum ServiceType
|
||||
{
|
||||
ServiceTypePrimary,
|
||||
ServiceTypeSecondary,
|
||||
};
|
||||
|
||||
QLowEnergyServiceData::ServiceType type() const;
|
||||
void setType(QLowEnergyServiceData::ServiceType type);
|
||||
QBluetoothUuid uuid() const;
|
||||
void setUuid(const QBluetoothUuid &uuid);
|
||||
QList<QLowEnergyService *> includedServices() const;
|
||||
void setIncludedServices(const QList<QLowEnergyService *> &services);
|
||||
void addIncludedService(QLowEnergyService *service);
|
||||
QList<QLowEnergyCharacteristicData> characteristics() const;
|
||||
void setCharacteristics(const QList<QLowEnergyCharacteristicData> &characteristics);
|
||||
void addCharacteristic(const QLowEnergyCharacteristicData &characteristic);
|
||||
bool isValid() const;
|
||||
void swap(QLowEnergyServiceData &other);
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
bool operator==(const QLowEnergyServiceData &sd1, const QLowEnergyServiceData &sd2);
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
bool operator!=(const QLowEnergyServiceData &sd1, const QLowEnergyServiceData &sd2);
|
||||
%End
|
||||
@@ -0,0 +1,240 @@
|
||||
// This is the SIP interface definition for the QList based mapped types
|
||||
// specific to the QtBluetooth module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%MappedType QList<quint16>
|
||||
/TypeHintIn="Iterable[int]", TypeHintOut="List[int]",
|
||||
TypeHintValue="[]"/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlist.h>
|
||||
%End
|
||||
|
||||
%ConvertFromTypeCode
|
||||
PyObject *l = PyList_New(sipCpp->size());
|
||||
|
||||
if (!l)
|
||||
return 0;
|
||||
|
||||
for (int i = 0; i < sipCpp->size(); ++i)
|
||||
{
|
||||
// Convert to a Python long to make sure it doesn't get interpreted as
|
||||
// a signed value.
|
||||
PyObject *pobj = PyLong_FromUnsignedLongLong(sipCpp->value(i));
|
||||
|
||||
if (!pobj)
|
||||
{
|
||||
Py_DECREF(l);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyList_SetItem(l, i, pobj);
|
||||
}
|
||||
|
||||
return l;
|
||||
%End
|
||||
|
||||
%ConvertToTypeCode
|
||||
PyObject *iter = PyObject_GetIter(sipPy);
|
||||
|
||||
if (!sipIsErr)
|
||||
{
|
||||
PyErr_Clear();
|
||||
Py_XDECREF(iter);
|
||||
|
||||
return (iter
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
&& !PyString_Check(sipPy)
|
||||
#endif
|
||||
&& !PyUnicode_Check(sipPy));
|
||||
}
|
||||
|
||||
if (!iter)
|
||||
{
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
QList<quint16> *qv = new QList<quint16>;
|
||||
|
||||
for (Py_ssize_t i = 0; ; ++i)
|
||||
{
|
||||
PyErr_Clear();
|
||||
PyObject *itm = PyIter_Next(iter);
|
||||
|
||||
if (!itm)
|
||||
{
|
||||
if (PyErr_Occurred())
|
||||
{
|
||||
delete qv;
|
||||
Py_DECREF(iter);
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
PyErr_Clear();
|
||||
unsigned long val = PyLong_AsUnsignedLongMask(itm);
|
||||
|
||||
if (PyErr_Occurred())
|
||||
{
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"index %zd has type '%s' but 'int' is expected", i,
|
||||
sipPyTypeName(Py_TYPE(itm)));
|
||||
|
||||
Py_DECREF(itm);
|
||||
delete qv;
|
||||
Py_DECREF(iter);
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
qv->append(val);
|
||||
|
||||
Py_DECREF(itm);
|
||||
}
|
||||
|
||||
Py_DECREF(iter);
|
||||
|
||||
*sipCppPtr = qv;
|
||||
|
||||
return sipGetState(sipTransferObj);
|
||||
%End
|
||||
};
|
||||
|
||||
|
||||
// QBluetoothServiceInfo::Sequence is actually a sub-class of QList<QVariant>.
|
||||
// Note that QBluetoothServiceInfo::Alternative is identical and they are both
|
||||
// syntactic sugar. By ignoring methods using the latter then everything works
|
||||
// as expected.
|
||||
%MappedType QBluetoothServiceInfo::Sequence
|
||||
/TypeHintIn="Iterable[QVariant]", TypeHintOut="List[QVariant]",
|
||||
TypeHintValue="[]"/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qbluetoothserviceinfo.h>
|
||||
%End
|
||||
|
||||
%ConvertFromTypeCode
|
||||
PyObject *l = PyList_New(sipCpp->size());
|
||||
|
||||
if (!l)
|
||||
return 0;
|
||||
|
||||
for (int i = 0; i < sipCpp->size(); ++i)
|
||||
{
|
||||
QVariant *t = new QVariant(sipCpp->at(i));
|
||||
PyObject *tobj = sipConvertFromNewType(t, sipType_QVariant,
|
||||
sipTransferObj);
|
||||
|
||||
if (!tobj)
|
||||
{
|
||||
delete t;
|
||||
Py_DECREF(l);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyList_SetItem(l, i, tobj);
|
||||
}
|
||||
|
||||
return l;
|
||||
%End
|
||||
|
||||
%ConvertToTypeCode
|
||||
PyObject *iter = PyObject_GetIter(sipPy);
|
||||
|
||||
if (!sipIsErr)
|
||||
{
|
||||
PyErr_Clear();
|
||||
Py_XDECREF(iter);
|
||||
|
||||
return (iter
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
&& !PyString_Check(sipPy)
|
||||
#endif
|
||||
&& !PyUnicode_Check(sipPy));
|
||||
}
|
||||
|
||||
if (!iter)
|
||||
{
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
QBluetoothServiceInfo::Sequence *ql = new QBluetoothServiceInfo::Sequence;
|
||||
|
||||
for (Py_ssize_t i = 0; ; ++i)
|
||||
{
|
||||
PyErr_Clear();
|
||||
PyObject *itm = PyIter_Next(iter);
|
||||
|
||||
if (!itm)
|
||||
{
|
||||
if (PyErr_Occurred())
|
||||
{
|
||||
delete ql;
|
||||
Py_DECREF(iter);
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
int state;
|
||||
QVariant *t = reinterpret_cast<QVariant *>(
|
||||
sipForceConvertToType(itm, sipType_QVariant, sipTransferObj,
|
||||
SIP_NOT_NONE, &state, sipIsErr));
|
||||
|
||||
if (*sipIsErr)
|
||||
{
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"index %zd has type '%s' but '_TYPE_' is expected", i,
|
||||
sipPyTypeName(Py_TYPE(itm)));
|
||||
|
||||
Py_DECREF(itm);
|
||||
delete ql;
|
||||
Py_DECREF(iter);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
ql->append(*t);
|
||||
|
||||
sipReleaseType(t, sipType_QVariant, state);
|
||||
Py_DECREF(itm);
|
||||
}
|
||||
|
||||
Py_DECREF(iter);
|
||||
|
||||
*sipCppPtr = ql;
|
||||
|
||||
return sipGetState(sipTransferObj);
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,115 @@
|
||||
// This is the SIP interface definition for the quint128 mapped type.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%MappedType quint128 /TypeHint="Tuple[int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int]"/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qbluetoothuuid.h>
|
||||
%End
|
||||
|
||||
%ConvertFromTypeCode
|
||||
PyObject *t = PyTuple_New(16);
|
||||
|
||||
if (!t)
|
||||
return 0;
|
||||
|
||||
for (Py_ssize_t i = 0; i < 16; ++i)
|
||||
{
|
||||
// Convert to a Python long to make sure it doesn't get interpreted as
|
||||
// a signed value.
|
||||
PyObject *pobj = PyLong_FromUnsignedLong(sipCpp->data[i]);
|
||||
|
||||
if (!pobj)
|
||||
{
|
||||
Py_DECREF(t);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyTuple_SetItem(t, i, pobj);
|
||||
}
|
||||
|
||||
return t;
|
||||
%End
|
||||
|
||||
%ConvertToTypeCode
|
||||
if (!sipIsErr)
|
||||
return (PySequence_Check(sipPy)
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
&& !PyString_Check(sipPy)
|
||||
#endif
|
||||
&& !PyUnicode_Check(sipPy));
|
||||
|
||||
Py_ssize_t len = PySequence_Size(sipPy);
|
||||
|
||||
if (len != 16)
|
||||
{
|
||||
// A negative length should only be an internal error so let the
|
||||
// original exception stand.
|
||||
if (len >= 0)
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"sequence has %zd elements but 16 elements are expected",
|
||||
len);
|
||||
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
quint128 *qv = new quint128;
|
||||
|
||||
for (Py_ssize_t i = 0; i < 16; ++i)
|
||||
{
|
||||
PyObject *itm = PySequence_GetItem(sipPy, i);
|
||||
|
||||
if (!itm)
|
||||
{
|
||||
delete qv;
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyErr_Clear();
|
||||
unsigned long val = PyLong_AsUnsignedLongMask(itm);
|
||||
|
||||
if (PyErr_Occurred())
|
||||
{
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"element %zd has type '%s' but 'int' is expected", i,
|
||||
sipPyTypeName(Py_TYPE(itm)));
|
||||
|
||||
Py_DECREF(itm);
|
||||
delete qv;
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
qv->data[i] = val;
|
||||
|
||||
Py_DECREF(itm);
|
||||
}
|
||||
|
||||
*sipCppPtr = qv;
|
||||
|
||||
return sipGetState(sipTransferObj);
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
# Automatically generated configuration for PyQt5.QtCore.
|
||||
|
||||
sip-version = "6.8.6"
|
||||
sip-abi-version = "12.15"
|
||||
module-tags = ["Qt_5_15_2", "WS_WIN"]
|
||||
module-disabled-features = []
|
||||
230
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/QtCoremod.sip
Normal file
230
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/QtCoremod.sip
Normal file
@@ -0,0 +1,230 @@
|
||||
// QtCoremod.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%Module(name=PyQt5.QtCore, call_super_init=True, default_VirtualErrorHandler=PyQt5, keyword_arguments="Optional", use_limited_api=True, py_ssize_t_clean=True)
|
||||
|
||||
%Timeline {Qt_5_0_0 Qt_5_0_1 Qt_5_0_2 Qt_5_1_0 Qt_5_1_1 Qt_5_2_0 Qt_5_2_1 Qt_5_3_0 Qt_5_3_1 Qt_5_3_2 Qt_5_4_0 Qt_5_4_1 Qt_5_4_2 Qt_5_5_0 Qt_5_5_1 Qt_5_6_0 Qt_5_6_1 Qt_5_6_2 Qt_5_6_3 Qt_5_6_4 Qt_5_6_5 Qt_5_6_6 Qt_5_6_7 Qt_5_6_8 Qt_5_6_9 Qt_5_7_0 Qt_5_7_1 Qt_5_8_0 Qt_5_8_1 Qt_5_9_0 Qt_5_9_1 Qt_5_9_2 Qt_5_9_3 Qt_5_9_4 Qt_5_9_5 Qt_5_9_6 Qt_5_9_7 Qt_5_9_8 Qt_5_9_9 Qt_5_10_0 Qt_5_10_1 Qt_5_11_0 Qt_5_11_1 Qt_5_11_2 Qt_5_11_3 Qt_5_12_0 Qt_5_12_1 Qt_5_12_2 Qt_5_12_3 Qt_5_12_4 Qt_5_13_0 Qt_5_14_0 Qt_5_15_0 Qt_5_15_1 Qt_5_15_2}
|
||||
|
||||
%Platforms {WS_X11 WS_WIN WS_MACX}
|
||||
|
||||
%Feature PyQt_Accessibility
|
||||
%Feature PyQt_SessionManager
|
||||
%Feature PyQt_SSL
|
||||
%Feature PyQt_qreal_double
|
||||
%Feature Py_v3
|
||||
%Feature PyQt_PrintDialog
|
||||
%Feature PyQt_Printer
|
||||
%Feature PyQt_PrintPreviewWidget
|
||||
%Feature PyQt_PrintPreviewDialog
|
||||
%Feature PyQt_RawFont
|
||||
%Feature PyQt_OpenGL
|
||||
%Feature PyQt_Desktop_OpenGL
|
||||
%Feature PyQt_NotBootstrapped
|
||||
%Feature PyQt_Process
|
||||
%Feature PyQt_MacOSXOnly
|
||||
%Feature PyQt_WebChannel
|
||||
%Feature PyQt_CONSTEXPR
|
||||
|
||||
%Copying
|
||||
Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
|
||||
This file is part of PyQt5.
|
||||
|
||||
This file may be used under the terms of the GNU General Public License
|
||||
version 3.0 as published by the Free Software Foundation and appearing in
|
||||
the file LICENSE included in the packaging of this file. Please review the
|
||||
following information to ensure the GNU General Public License version 3.0
|
||||
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
|
||||
If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
then you may purchase a commercial license. For more information contact
|
||||
info@riverbankcomputing.com.
|
||||
|
||||
This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
%End
|
||||
|
||||
%Plugin PyQt5
|
||||
|
||||
%If (Py_v3)
|
||||
%DefaultEncoding "ASCII"
|
||||
%End
|
||||
|
||||
%If (!Py_v3)
|
||||
// Hook into the VendorID package if it is enabled.
|
||||
%Feature VendorID
|
||||
|
||||
%If (VendorID)
|
||||
|
||||
%ModuleCode
|
||||
#include <vendorid.h>
|
||||
%End
|
||||
|
||||
%PreInitialisationCode
|
||||
if (!vendorid_check())
|
||||
{
|
||||
PyErr_SetString(PyExc_RuntimeError, "PyQt cannot be used with this Python interpreter");
|
||||
return;
|
||||
}
|
||||
%End
|
||||
|
||||
%End
|
||||
|
||||
%End
|
||||
|
||||
|
||||
%Include(name=pyqt-internal.sip5, optional=True)
|
||||
%Include(name=pyqt-gpl.sip5, optional=True)
|
||||
%Include(name=pyqt-commercial.sip5, optional=True)
|
||||
|
||||
%DefaultSupertype sip.simplewrapper
|
||||
|
||||
%Include qglobal.sip
|
||||
%Include qnamespace.sip
|
||||
%Include qabstractanimation.sip
|
||||
%Include qabstracteventdispatcher.sip
|
||||
%Include qabstractitemmodel.sip
|
||||
%Include qabstractnativeeventfilter.sip
|
||||
%Include qabstractproxymodel.sip
|
||||
%Include qabstractstate.sip
|
||||
%Include qabstracttransition.sip
|
||||
%Include qanimationgroup.sip
|
||||
%Include qbasictimer.sip
|
||||
%Include qbitarray.sip
|
||||
%Include qbuffer.sip
|
||||
%Include qbytearray.sip
|
||||
%Include qbytearraymatcher.sip
|
||||
%Include qcalendar.sip
|
||||
%Include qcborcommon.sip
|
||||
%Include qcborstream.sip
|
||||
%Include qchar.sip
|
||||
%Include qcollator.sip
|
||||
%Include qcommandlineoption.sip
|
||||
%Include qcommandlineparser.sip
|
||||
%Include qconcatenatetablesproxymodel.sip
|
||||
%Include qcoreapplication.sip
|
||||
%Include qcoreevent.sip
|
||||
%Include qcryptographichash.sip
|
||||
%Include qdatastream.sip
|
||||
%Include qdatetime.sip
|
||||
%Include qdeadlinetimer.sip
|
||||
%Include qdir.sip
|
||||
%Include qdiriterator.sip
|
||||
%Include qeasingcurve.sip
|
||||
%Include qelapsedtimer.sip
|
||||
%Include qeventloop.sip
|
||||
%Include qeventtransition.sip
|
||||
%Include qfile.sip
|
||||
%Include qfiledevice.sip
|
||||
%Include qfileinfo.sip
|
||||
%Include qfileselector.sip
|
||||
%Include qfilesystemwatcher.sip
|
||||
%Include qfinalstate.sip
|
||||
%Include qhistorystate.sip
|
||||
%Include qidentityproxymodel.sip
|
||||
%Include qiodevice.sip
|
||||
%Include qitemselectionmodel.sip
|
||||
%Include qjsondocument.sip
|
||||
%Include qjsonvalue.sip
|
||||
%Include qlibrary.sip
|
||||
%Include qlibraryinfo.sip
|
||||
%Include qline.sip
|
||||
%Include qlocale.sip
|
||||
%Include qlockfile.sip
|
||||
%Include qlogging.sip
|
||||
%Include qloggingcategory.sip
|
||||
%Include qmargins.sip
|
||||
%Include qmessageauthenticationcode.sip
|
||||
%Include qmetaobject.sip
|
||||
%Include qmetatype.sip
|
||||
%Include qmimedata.sip
|
||||
%Include qmimedatabase.sip
|
||||
%Include qmimetype.sip
|
||||
%Include qmutex.sip
|
||||
%Include qnumeric.sip
|
||||
%Include qobject.sip
|
||||
%Include qobjectcleanuphandler.sip
|
||||
%Include qobjectdefs.sip
|
||||
%Include qoperatingsystemversion.sip
|
||||
%Include qparallelanimationgroup.sip
|
||||
%Include qpauseanimation.sip
|
||||
%Include qpropertyanimation.sip
|
||||
%Include qpluginloader.sip
|
||||
%Include qpoint.sip
|
||||
%Include qprocess.sip
|
||||
%Include qrandom.sip
|
||||
%Include qreadwritelock.sip
|
||||
%Include qrect.sip
|
||||
%Include qregexp.sip
|
||||
%Include qregularexpression.sip
|
||||
%Include qresource.sip
|
||||
%Include qrunnable.sip
|
||||
%Include qsavefile.sip
|
||||
%Include qsemaphore.sip
|
||||
%Include qsequentialanimationgroup.sip
|
||||
%Include qsettings.sip
|
||||
%Include qsharedmemory.sip
|
||||
%Include qsignalmapper.sip
|
||||
%Include qsignaltransition.sip
|
||||
%Include qsize.sip
|
||||
%Include qsocketnotifier.sip
|
||||
%Include qsortfilterproxymodel.sip
|
||||
%Include qstandardpaths.sip
|
||||
%Include qstate.sip
|
||||
%Include qstatemachine.sip
|
||||
%Include qstorageinfo.sip
|
||||
%Include qstring.sip
|
||||
%Include qstringlistmodel.sip
|
||||
%Include qsystemsemaphore.sip
|
||||
%Include qtemporarydir.sip
|
||||
%Include qtemporaryfile.sip
|
||||
%Include qtextboundaryfinder.sip
|
||||
%Include qtextcodec.sip
|
||||
%Include qtextstream.sip
|
||||
%Include qthread.sip
|
||||
%Include qthreadpool.sip
|
||||
%Include qtimeline.sip
|
||||
%Include qtimer.sip
|
||||
%Include qtimezone.sip
|
||||
%Include qtranslator.sip
|
||||
%Include qtransposeproxymodel.sip
|
||||
%Include qurl.sip
|
||||
%Include qurlquery.sip
|
||||
%Include quuid.sip
|
||||
%Include qvariant.sip
|
||||
%Include qvariantanimation.sip
|
||||
%Include qversionnumber.sip
|
||||
%Include qwaitcondition.sip
|
||||
%Include qxmlstream.sip
|
||||
%Include qjsonarray.sip
|
||||
%Include qjsonobject.sip
|
||||
%Include qpycore_qhash.sip
|
||||
%Include qpycore_qlist.sip
|
||||
%Include qpycore_qmap.sip
|
||||
%Include qpycore_qpair.sip
|
||||
%Include qpycore_qset.sip
|
||||
%Include qpycore_qvariantmap.sip
|
||||
%Include qpycore_qvector.sip
|
||||
%Include qpycore_virtual_error_handler.sip
|
||||
%Include qstringlist.sip
|
||||
%Include qsysinfo.sip
|
||||
%Include qwineventnotifier.sip
|
||||
@@ -0,0 +1 @@
|
||||
%License(type="gpl")
|
||||
@@ -0,0 +1,82 @@
|
||||
// qabstractanimation.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QAbstractAnimation : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qabstractanimation.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Direction
|
||||
{
|
||||
Forward,
|
||||
Backward,
|
||||
};
|
||||
|
||||
enum State
|
||||
{
|
||||
Stopped,
|
||||
Paused,
|
||||
Running,
|
||||
};
|
||||
|
||||
enum DeletionPolicy
|
||||
{
|
||||
KeepWhenStopped,
|
||||
DeleteWhenStopped,
|
||||
};
|
||||
|
||||
QAbstractAnimation(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QAbstractAnimation();
|
||||
QAbstractAnimation::State state() const;
|
||||
QAnimationGroup *group() const;
|
||||
QAbstractAnimation::Direction direction() const;
|
||||
void setDirection(QAbstractAnimation::Direction direction);
|
||||
int currentTime() const;
|
||||
int currentLoopTime() const;
|
||||
int loopCount() const;
|
||||
void setLoopCount(int loopCount);
|
||||
int currentLoop() const;
|
||||
virtual int duration() const = 0;
|
||||
int totalDuration() const;
|
||||
|
||||
signals:
|
||||
void finished();
|
||||
void stateChanged(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
|
||||
void currentLoopChanged(int currentLoop);
|
||||
void directionChanged(QAbstractAnimation::Direction);
|
||||
|
||||
public slots:
|
||||
void start(QAbstractAnimation::DeletionPolicy policy = QAbstractAnimation::KeepWhenStopped);
|
||||
void pause();
|
||||
void resume();
|
||||
void setPaused(bool);
|
||||
void stop();
|
||||
void setCurrentTime(int msecs);
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *event);
|
||||
virtual void updateCurrentTime(int currentTime) = 0;
|
||||
virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
|
||||
virtual void updateDirection(QAbstractAnimation::Direction direction);
|
||||
};
|
||||
@@ -0,0 +1,73 @@
|
||||
// qabstracteventdispatcher.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QAbstractEventDispatcher : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qabstracteventdispatcher.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
struct TimerInfo
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qabstracteventdispatcher.h>
|
||||
%End
|
||||
|
||||
int timerId;
|
||||
int interval;
|
||||
Qt::TimerType timerType;
|
||||
TimerInfo(int id, int i, Qt::TimerType t);
|
||||
};
|
||||
|
||||
explicit QAbstractEventDispatcher(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QAbstractEventDispatcher();
|
||||
static QAbstractEventDispatcher *instance(QThread *thread = 0);
|
||||
virtual bool processEvents(QEventLoop::ProcessEventsFlags flags) = 0 /ReleaseGIL/;
|
||||
virtual bool hasPendingEvents() = 0;
|
||||
virtual void registerSocketNotifier(QSocketNotifier *notifier) = 0;
|
||||
virtual void unregisterSocketNotifier(QSocketNotifier *notifier) = 0;
|
||||
int registerTimer(int interval, Qt::TimerType timerType /Constrained/, QObject *object);
|
||||
virtual void registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object) = 0;
|
||||
virtual bool unregisterTimer(int timerId) = 0;
|
||||
virtual bool unregisterTimers(QObject *object) = 0;
|
||||
virtual QList<QAbstractEventDispatcher::TimerInfo> registeredTimers(QObject *object) const = 0;
|
||||
virtual void wakeUp() = 0;
|
||||
virtual void interrupt() = 0;
|
||||
virtual void flush() = 0;
|
||||
virtual void startingUp();
|
||||
virtual void closingDown();
|
||||
virtual int remainingTime(int timerId) = 0;
|
||||
void installNativeEventFilter(QAbstractNativeEventFilter *filterObj);
|
||||
void removeNativeEventFilter(QAbstractNativeEventFilter *filterObj);
|
||||
%If (WS_WIN)
|
||||
virtual bool registerEventNotifier(QWinEventNotifier *notifier) = 0;
|
||||
%End
|
||||
%If (WS_WIN)
|
||||
virtual void unregisterEventNotifier(QWinEventNotifier *notifier) = 0;
|
||||
%End
|
||||
bool filterNativeEvent(const QByteArray &eventType, void *message, long *result);
|
||||
|
||||
signals:
|
||||
void aboutToBlock();
|
||||
void awake();
|
||||
};
|
||||
@@ -0,0 +1,332 @@
|
||||
// qabstractitemmodel.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QModelIndex
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qabstractitemmodel.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QModelIndex();
|
||||
QModelIndex child(int arow, int acolumn) const;
|
||||
int row() const;
|
||||
int column() const;
|
||||
QVariant data(int role = Qt::ItemDataRole::DisplayRole) const;
|
||||
Qt::ItemFlags flags() const;
|
||||
SIP_PYOBJECT internalPointer() const;
|
||||
%MethodCode
|
||||
sipRes = reinterpret_cast<PyObject *>(sipCpp->internalPointer());
|
||||
|
||||
if (!sipRes)
|
||||
sipRes = Py_None;
|
||||
|
||||
Py_INCREF(sipRes);
|
||||
%End
|
||||
|
||||
SIP_PYOBJECT internalId() const /TypeHint="int"/;
|
||||
%MethodCode
|
||||
// Python needs to treat the result as an unsigned value (which may not happen
|
||||
// on 64 bit systems). Instead we get the real value as it is stored (as a
|
||||
// void *) and let Python convert that.
|
||||
sipRes = PyLong_FromVoidPtr(sipCpp->internalPointer());
|
||||
%End
|
||||
|
||||
const QAbstractItemModel *model() const;
|
||||
bool isValid() const;
|
||||
QModelIndex parent() const;
|
||||
QModelIndex sibling(int arow, int acolumn) const;
|
||||
%If (Qt_5_11_0 -)
|
||||
QModelIndex siblingAtColumn(int column) const;
|
||||
%End
|
||||
%If (Qt_5_11_0 -)
|
||||
QModelIndex siblingAtRow(int row) const;
|
||||
%End
|
||||
bool operator==(const QModelIndex &other) const;
|
||||
bool operator<(const QModelIndex &other) const;
|
||||
bool operator!=(const QModelIndex &other) const;
|
||||
long __hash__() const;
|
||||
%MethodCode
|
||||
sipRes = qHash(*sipCpp);
|
||||
%End
|
||||
};
|
||||
|
||||
class QPersistentModelIndex
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qabstractitemmodel.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QPersistentModelIndex();
|
||||
QPersistentModelIndex(const QModelIndex &index);
|
||||
QPersistentModelIndex(const QPersistentModelIndex &other);
|
||||
~QPersistentModelIndex();
|
||||
int row() const;
|
||||
int column() const;
|
||||
QVariant data(int role = Qt::ItemDataRole::DisplayRole) const;
|
||||
Qt::ItemFlags flags() const;
|
||||
QModelIndex parent() const;
|
||||
QModelIndex sibling(int row, int column) const;
|
||||
QModelIndex child(int row, int column) const;
|
||||
const QAbstractItemModel *model() const;
|
||||
bool isValid() const;
|
||||
void swap(QPersistentModelIndex &other /Constrained/);
|
||||
operator const QModelIndex &() const;
|
||||
bool operator<(const QPersistentModelIndex &other) const;
|
||||
bool operator==(const QPersistentModelIndex &other) const;
|
||||
bool operator==(const QModelIndex &other) const;
|
||||
bool operator!=(const QPersistentModelIndex &other) const;
|
||||
bool operator!=(const QModelIndex &other) const;
|
||||
long __hash__() const;
|
||||
%MethodCode
|
||||
sipRes = qHash(*sipCpp);
|
||||
%End
|
||||
};
|
||||
|
||||
typedef QList<QModelIndex> QModelIndexList;
|
||||
|
||||
class QAbstractItemModel : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qabstractitemmodel.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum LayoutChangeHint
|
||||
{
|
||||
NoLayoutChangeHint,
|
||||
VerticalSortHint,
|
||||
HorizontalSortHint,
|
||||
};
|
||||
|
||||
explicit QAbstractItemModel(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QAbstractItemModel();
|
||||
bool hasIndex(int row, int column, const QModelIndex &parent = QModelIndex()) const;
|
||||
virtual QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const = 0;
|
||||
virtual QModelIndex parent(const QModelIndex &child) const = 0;
|
||||
QObject *parent() const;
|
||||
virtual QModelIndex sibling(int row, int column, const QModelIndex &idx) const;
|
||||
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const = 0;
|
||||
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const = 0;
|
||||
virtual bool hasChildren(const QModelIndex &parent = QModelIndex()) const;
|
||||
virtual QVariant data(const QModelIndex &index, int role = Qt::ItemDataRole::DisplayRole) const = 0;
|
||||
virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::ItemDataRole::EditRole);
|
||||
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::ItemDataRole::DisplayRole) const;
|
||||
virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role = Qt::ItemDataRole::EditRole);
|
||||
virtual QMap<int, QVariant> itemData(const QModelIndex &index) const;
|
||||
virtual bool setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles);
|
||||
virtual QStringList mimeTypes() const;
|
||||
virtual QMimeData *mimeData(const QModelIndexList &indexes) const /TransferBack/;
|
||||
virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
|
||||
virtual Qt::DropActions supportedDropActions() const;
|
||||
virtual bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex());
|
||||
virtual bool insertColumns(int column, int count, const QModelIndex &parent = QModelIndex());
|
||||
virtual bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
|
||||
virtual bool removeColumns(int column, int count, const QModelIndex &parent = QModelIndex());
|
||||
virtual void fetchMore(const QModelIndex &parent);
|
||||
virtual bool canFetchMore(const QModelIndex &parent) const;
|
||||
virtual Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
virtual void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
|
||||
virtual QModelIndex buddy(const QModelIndex &index) const;
|
||||
virtual QModelIndexList match(const QModelIndex &start, int role, const QVariant &value, int hits = 1, Qt::MatchFlags flags = Qt::MatchStartsWith|Qt::MatchWrap) const;
|
||||
virtual QSize span(const QModelIndex &index) const;
|
||||
|
||||
signals:
|
||||
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles = QVector<int>());
|
||||
void headerDataChanged(Qt::Orientation orientation, int first, int last);
|
||||
void layoutAboutToBeChanged(const QList<QPersistentModelIndex> &parents = QList<QPersistentModelIndex>(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint);
|
||||
void layoutChanged(const QList<QPersistentModelIndex> &parents = QList<QPersistentModelIndex>(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint);
|
||||
void rowsAboutToBeInserted(const QModelIndex &parent, int first, int last);
|
||||
void rowsInserted(const QModelIndex &parent, int first, int last);
|
||||
void rowsAboutToBeRemoved(const QModelIndex &parent, int first, int last);
|
||||
void rowsRemoved(const QModelIndex &parent, int first, int last);
|
||||
void columnsAboutToBeInserted(const QModelIndex &parent, int first, int last);
|
||||
void columnsInserted(const QModelIndex &parent, int first, int last);
|
||||
void columnsAboutToBeRemoved(const QModelIndex &parent, int first, int last);
|
||||
void columnsRemoved(const QModelIndex &parent, int first, int last);
|
||||
void modelAboutToBeReset();
|
||||
void modelReset();
|
||||
|
||||
public slots:
|
||||
virtual bool submit();
|
||||
virtual void revert();
|
||||
|
||||
protected:
|
||||
void encodeData(const QModelIndexList &indexes, QDataStream &stream) const;
|
||||
bool decodeData(int row, int column, const QModelIndex &parent, QDataStream &stream);
|
||||
void beginInsertRows(const QModelIndex &parent, int first, int last);
|
||||
void endInsertRows();
|
||||
void beginRemoveRows(const QModelIndex &parent, int first, int last);
|
||||
void endRemoveRows();
|
||||
void beginInsertColumns(const QModelIndex &parent, int first, int last);
|
||||
void endInsertColumns();
|
||||
void beginRemoveColumns(const QModelIndex &parent, int first, int last);
|
||||
void endRemoveColumns();
|
||||
QModelIndexList persistentIndexList() const;
|
||||
void changePersistentIndex(const QModelIndex &from, const QModelIndex &to);
|
||||
void changePersistentIndexList(const QModelIndexList &from, const QModelIndexList &to);
|
||||
|
||||
public:
|
||||
bool insertRow(int row, const QModelIndex &parent = QModelIndex());
|
||||
bool insertColumn(int column, const QModelIndex &parent = QModelIndex());
|
||||
bool removeRow(int row, const QModelIndex &parent = QModelIndex());
|
||||
bool removeColumn(int column, const QModelIndex &parent = QModelIndex());
|
||||
virtual Qt::DropActions supportedDragActions() const;
|
||||
virtual QHash<int, QByteArray> roleNames() const;
|
||||
|
||||
protected:
|
||||
QModelIndex createIndex(int row, int column, SIP_PYOBJECT object = 0) const [QModelIndex (int row, int column, void *object = 0)];
|
||||
%MethodCode
|
||||
// The Qt API is broken (and won't be fixed as it would break binary
|
||||
// compatibility) regarding the internal id of a model index on different
|
||||
// architectures (32 vs 64 bits). We choose to work around the breakage as it
|
||||
// is fairly subtle and continues to catch people out. Instead of letting Qt
|
||||
// convert betweed an integer id and a pointer id (the internal format used by
|
||||
// Qt) we let Python do it.
|
||||
|
||||
void *ptr;
|
||||
|
||||
if (a2)
|
||||
{
|
||||
// Try and convert it to a Python long and fallback to the object's
|
||||
// address if it fails.
|
||||
ptr = PyLong_AsVoidPtr(a2);
|
||||
|
||||
if (PyErr_Occurred())
|
||||
{
|
||||
PyErr_Clear();
|
||||
ptr = a2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ptr = 0;
|
||||
}
|
||||
|
||||
#if defined(SIP_PROTECTED_IS_PUBLIC)
|
||||
sipRes = new QModelIndex(sipCpp->createIndex(a0, a1, ptr));
|
||||
#else
|
||||
sipRes = new QModelIndex(sipCpp->sipProtect_createIndex(a0, a1, ptr));
|
||||
#endif
|
||||
%End
|
||||
|
||||
signals:
|
||||
void rowsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow);
|
||||
void rowsMoved(const QModelIndex &parent, int start, int end, const QModelIndex &destination, int row);
|
||||
void columnsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationColumn);
|
||||
void columnsMoved(const QModelIndex &parent, int start, int end, const QModelIndex &destination, int column);
|
||||
|
||||
protected:
|
||||
bool beginMoveRows(const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationRow);
|
||||
void endMoveRows();
|
||||
bool beginMoveColumns(const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationColumn);
|
||||
void endMoveColumns();
|
||||
void beginResetModel() /ReleaseGIL/;
|
||||
void endResetModel() /ReleaseGIL/;
|
||||
|
||||
protected slots:
|
||||
%If (Qt_5_1_0 -)
|
||||
void resetInternalData();
|
||||
%End
|
||||
|
||||
public:
|
||||
virtual bool canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const;
|
||||
virtual bool moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild);
|
||||
virtual bool moveColumns(const QModelIndex &sourceParent, int sourceColumn, int count, const QModelIndex &destinationParent, int destinationChild);
|
||||
bool moveRow(const QModelIndex &sourceParent, int sourceRow, const QModelIndex &destinationParent, int destinationChild);
|
||||
bool moveColumn(const QModelIndex &sourceParent, int sourceColumn, const QModelIndex &destinationParent, int destinationChild);
|
||||
%If (Qt_5_11_0 -)
|
||||
|
||||
enum class CheckIndexOption
|
||||
{
|
||||
NoOption,
|
||||
IndexIsValid,
|
||||
DoNotUseParent,
|
||||
ParentIsInvalid,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_11_0 -)
|
||||
typedef QFlags<QAbstractItemModel::CheckIndexOption> CheckIndexOptions;
|
||||
%End
|
||||
%If (Qt_5_11_0 -)
|
||||
bool checkIndex(const QModelIndex &index, QAbstractItemModel::CheckIndexOptions options = QAbstractItemModel::CheckIndexOption::NoOption) const;
|
||||
%End
|
||||
};
|
||||
|
||||
class QAbstractTableModel : public QAbstractItemModel
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qabstractitemmodel.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QAbstractTableModel(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QAbstractTableModel();
|
||||
virtual QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
|
||||
virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
|
||||
%If (Qt_5_1_0 -)
|
||||
virtual Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
QObject *parent() const;
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
virtual QModelIndex sibling(int row, int column, const QModelIndex &idx) const;
|
||||
%End
|
||||
|
||||
private:
|
||||
virtual QModelIndex parent(const QModelIndex &child) const;
|
||||
virtual bool hasChildren(const QModelIndex &parent) const;
|
||||
};
|
||||
|
||||
class QAbstractListModel : public QAbstractItemModel
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qabstractitemmodel.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QAbstractListModel(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QAbstractListModel();
|
||||
virtual QModelIndex index(int row, int column = 0, const QModelIndex &parent = QModelIndex()) const;
|
||||
virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
|
||||
%If (Qt_5_1_0 -)
|
||||
virtual Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
QObject *parent() const;
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
virtual QModelIndex sibling(int row, int column, const QModelIndex &idx) const;
|
||||
%End
|
||||
|
||||
private:
|
||||
virtual QModelIndex parent(const QModelIndex &child) const;
|
||||
virtual int columnCount(const QModelIndex &parent) const;
|
||||
virtual bool hasChildren(const QModelIndex &parent) const;
|
||||
};
|
||||
|
||||
%If (Qt_5_11_0 -)
|
||||
QFlags<QAbstractItemModel::CheckIndexOption> operator|(QAbstractItemModel::CheckIndexOption f1, QFlags<QAbstractItemModel::CheckIndexOption> f2);
|
||||
%End
|
||||
@@ -0,0 +1,36 @@
|
||||
// qabstractnativeeventfilter.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QAbstractNativeEventFilter
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qabstractnativeeventfilter.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QAbstractNativeEventFilter();
|
||||
virtual ~QAbstractNativeEventFilter();
|
||||
virtual bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) = 0;
|
||||
|
||||
private:
|
||||
QAbstractNativeEventFilter(const QAbstractNativeEventFilter &);
|
||||
};
|
||||
@@ -0,0 +1,81 @@
|
||||
// qabstractproxymodel.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QAbstractProxyModel : public QAbstractItemModel
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qabstractproxymodel.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QAbstractProxyModel(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QAbstractProxyModel();
|
||||
virtual void setSourceModel(QAbstractItemModel *sourceModel /KeepReference/);
|
||||
QAbstractItemModel *sourceModel() const;
|
||||
virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const = 0;
|
||||
virtual QModelIndex mapFromSource(const QModelIndex &sourceIndex) const = 0;
|
||||
virtual QItemSelection mapSelectionToSource(const QItemSelection &selection) const;
|
||||
virtual QItemSelection mapSelectionFromSource(const QItemSelection &selection) const;
|
||||
virtual bool submit();
|
||||
virtual void revert();
|
||||
virtual QVariant data(const QModelIndex &proxyIndex, int role = Qt::DisplayRole) const;
|
||||
virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
|
||||
%If (Qt_5_5_0 -)
|
||||
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||
%End
|
||||
%If (- Qt_5_5_0)
|
||||
virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const;
|
||||
%End
|
||||
virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role = Qt::EditRole);
|
||||
virtual QMap<int, QVariant> itemData(const QModelIndex &index) const;
|
||||
virtual Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
virtual bool setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles);
|
||||
virtual QModelIndex buddy(const QModelIndex &index) const;
|
||||
virtual bool canFetchMore(const QModelIndex &parent) const;
|
||||
virtual void fetchMore(const QModelIndex &parent);
|
||||
virtual void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
|
||||
virtual QSize span(const QModelIndex &index) const;
|
||||
virtual bool hasChildren(const QModelIndex &parent = QModelIndex()) const;
|
||||
virtual QMimeData *mimeData(const QModelIndexList &indexes) const /TransferBack/;
|
||||
virtual QStringList mimeTypes() const;
|
||||
virtual Qt::DropActions supportedDropActions() const;
|
||||
virtual QModelIndex sibling(int row, int column, const QModelIndex &idx) const;
|
||||
|
||||
protected slots:
|
||||
%If (Qt_5_1_0 -)
|
||||
void resetInternalData();
|
||||
%End
|
||||
|
||||
signals:
|
||||
void sourceModelChanged();
|
||||
|
||||
public:
|
||||
%If (Qt_5_4_0 -)
|
||||
virtual bool canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const;
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
virtual Qt::DropActions supportedDragActions() const;
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,49 @@
|
||||
// qabstractstate.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QAbstractState : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qabstractstate.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
virtual ~QAbstractState();
|
||||
QState *parentState() const;
|
||||
QStateMachine *machine() const;
|
||||
%If (Qt_5_4_0 -)
|
||||
bool active() const;
|
||||
%End
|
||||
|
||||
signals:
|
||||
%If (Qt_5_4_0 -)
|
||||
void activeChanged(bool active);
|
||||
%End
|
||||
void entered();
|
||||
void exited();
|
||||
|
||||
protected:
|
||||
QAbstractState(QState *parent /TransferThis/ = 0);
|
||||
virtual void onEntry(QEvent *event) = 0;
|
||||
virtual void onExit(QEvent *event) = 0;
|
||||
virtual bool event(QEvent *e);
|
||||
};
|
||||
@@ -0,0 +1,110 @@
|
||||
// qabstracttransition.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QAbstractTransition : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qabstracttransition.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QAbstractTransition(QState *sourceState /TransferThis/ = 0);
|
||||
virtual ~QAbstractTransition();
|
||||
QState *sourceState() const;
|
||||
QAbstractState *targetState() const;
|
||||
void setTargetState(QAbstractState *target /KeepReference=0/);
|
||||
QList<QAbstractState *> targetStates() const;
|
||||
void setTargetStates(const QList<QAbstractState *> &targets /KeepReference=0/);
|
||||
QStateMachine *machine() const;
|
||||
void addAnimation(QAbstractAnimation *animation /GetWrapper/);
|
||||
%MethodCode
|
||||
// We want to keep a reference to the animation but this is in addition to the
|
||||
// existing ones and does not replace them - so we can't use /KeepReference/.
|
||||
sipCpp->addAnimation(a0);
|
||||
|
||||
// Use the user object as a list of the references.
|
||||
PyObject *user = sipGetUserObject((sipSimpleWrapper *)sipSelf);
|
||||
|
||||
if (!user)
|
||||
{
|
||||
user = PyList_New(0);
|
||||
sipSetUserObject((sipSimpleWrapper *)sipSelf, user);
|
||||
}
|
||||
|
||||
if (user)
|
||||
PyList_Append(user, a0Wrapper);
|
||||
%End
|
||||
|
||||
void removeAnimation(QAbstractAnimation *animation /GetWrapper/);
|
||||
%MethodCode
|
||||
// Discard the extra animation reference that we took in addAnimation().
|
||||
sipCpp->removeAnimation(a0);
|
||||
|
||||
// Use the user object as a list of the references.
|
||||
PyObject *user = sipGetUserObject((sipSimpleWrapper *)sipSelf);
|
||||
|
||||
if (user)
|
||||
{
|
||||
Py_ssize_t i = 0;
|
||||
|
||||
// Note that we deal with an object appearing in the list more than once.
|
||||
while (i < PyList_Size(user))
|
||||
if (PyList_GetItem(user, i) == a0Wrapper)
|
||||
PyList_SetSlice(user, i, i + 1, NULL);
|
||||
else
|
||||
++i;
|
||||
}
|
||||
%End
|
||||
|
||||
QList<QAbstractAnimation *> animations() const;
|
||||
|
||||
signals:
|
||||
void triggered();
|
||||
%If (Qt_5_4_0 -)
|
||||
void targetStateChanged();
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
void targetStatesChanged();
|
||||
%End
|
||||
|
||||
protected:
|
||||
virtual bool eventTest(QEvent *event) = 0;
|
||||
virtual void onTransition(QEvent *event) = 0;
|
||||
virtual bool event(QEvent *e);
|
||||
|
||||
public:
|
||||
%If (Qt_5_5_0 -)
|
||||
|
||||
enum TransitionType
|
||||
{
|
||||
ExternalTransition,
|
||||
InternalTransition,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
QAbstractTransition::TransitionType transitionType() const;
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
void setTransitionType(QAbstractTransition::TransitionType type);
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,43 @@
|
||||
// qanimationgroup.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QAnimationGroup : public QAbstractAnimation
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qanimationgroup.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QAnimationGroup(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QAnimationGroup();
|
||||
QAbstractAnimation *animationAt(int index) const;
|
||||
int animationCount() const;
|
||||
int indexOfAnimation(QAbstractAnimation *animation) const;
|
||||
void addAnimation(QAbstractAnimation *animation /Transfer/);
|
||||
void insertAnimation(int index, QAbstractAnimation *animation /Transfer/);
|
||||
void removeAnimation(QAbstractAnimation *animation /TransferBack/);
|
||||
QAbstractAnimation *takeAnimation(int index) /TransferBack/;
|
||||
void clear();
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *event);
|
||||
};
|
||||
@@ -0,0 +1,43 @@
|
||||
// qbasictimer.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QBasicTimer
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qbasictimer.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QBasicTimer();
|
||||
%If (Qt_5_14_0 -)
|
||||
QBasicTimer(const QBasicTimer &);
|
||||
%End
|
||||
~QBasicTimer();
|
||||
bool isActive() const;
|
||||
int timerId() const;
|
||||
void start(int msec, Qt::TimerType timerType, QObject *obj);
|
||||
void start(int msec, QObject *obj);
|
||||
void stop();
|
||||
%If (Qt_5_14_0 -)
|
||||
void swap(QBasicTimer &other /Constrained/);
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,94 @@
|
||||
// qbitarray.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QBitArray
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qbitarray.h>
|
||||
%End
|
||||
|
||||
%TypeCode
|
||||
// This is needed by __hash__().
|
||||
#include <qhash.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QBitArray();
|
||||
QBitArray(int size, bool value = false);
|
||||
QBitArray(const QBitArray &other);
|
||||
int size() const;
|
||||
int count() const /__len__/;
|
||||
int count(bool on) const;
|
||||
bool isEmpty() const;
|
||||
bool isNull() const;
|
||||
void resize(int size);
|
||||
void detach();
|
||||
bool isDetached() const;
|
||||
void clear();
|
||||
QBitArray &operator&=(const QBitArray &);
|
||||
QBitArray &operator|=(const QBitArray &);
|
||||
QBitArray &operator^=(const QBitArray &);
|
||||
QBitArray operator~() const;
|
||||
bool operator==(const QBitArray &a) const;
|
||||
bool operator!=(const QBitArray &a) const;
|
||||
void fill(bool val, int first, int last);
|
||||
void truncate(int pos);
|
||||
bool fill(bool value, int size = -1);
|
||||
bool testBit(int i) const;
|
||||
void setBit(int i);
|
||||
void clearBit(int i);
|
||||
void setBit(int i, bool val);
|
||||
bool toggleBit(int i);
|
||||
bool operator[](int i) const;
|
||||
%MethodCode
|
||||
Py_ssize_t idx = sipConvertFromSequenceIndex(a0, sipCpp->count());
|
||||
|
||||
if (idx < 0)
|
||||
sipIsErr = 1;
|
||||
else
|
||||
sipRes = sipCpp->operator[]((int)idx);
|
||||
%End
|
||||
|
||||
bool at(int i) const;
|
||||
long __hash__() const;
|
||||
%MethodCode
|
||||
sipRes = qHash(*sipCpp);
|
||||
%End
|
||||
|
||||
void swap(QBitArray &other /Constrained/);
|
||||
%If (Qt_5_11_0 -)
|
||||
SIP_PYOBJECT bits() const /TypeHint="bytes"/;
|
||||
%MethodCode
|
||||
return PyBytes_FromStringAndSize(sipCpp->bits(), (sipCpp->size() + 7) / 8);
|
||||
%End
|
||||
|
||||
%End
|
||||
%If (Qt_5_11_0 -)
|
||||
static QBitArray fromBits(const char *data /Encoding="None"/, Py_ssize_t len) [QBitArray (const char *data, qsizetype len)];
|
||||
%End
|
||||
};
|
||||
|
||||
QBitArray operator&(const QBitArray &, const QBitArray &);
|
||||
QBitArray operator|(const QBitArray &, const QBitArray &);
|
||||
QBitArray operator^(const QBitArray &, const QBitArray &);
|
||||
QDataStream &operator<<(QDataStream &, const QBitArray & /Constrained/) /ReleaseGIL/;
|
||||
QDataStream &operator>>(QDataStream &, QBitArray & /Constrained/) /ReleaseGIL/;
|
||||
88
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qbuffer.sip
Normal file
88
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qbuffer.sip
Normal file
@@ -0,0 +1,88 @@
|
||||
// qbuffer.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QBuffer : public QIODevice
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qbuffer.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QBuffer(QObject *parent /TransferThis/ = 0);
|
||||
QBuffer(QByteArray *byteArray /Constrained/, QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QBuffer();
|
||||
QByteArray &buffer();
|
||||
const QByteArray &data() const;
|
||||
void setBuffer(QByteArray *a /Constrained/);
|
||||
void setData(const QByteArray &data);
|
||||
void setData(const char *adata /Array/, int alen /ArraySize/);
|
||||
virtual bool open(QIODevice::OpenMode openMode);
|
||||
virtual void close();
|
||||
virtual qint64 size() const;
|
||||
virtual qint64 pos() const;
|
||||
virtual bool seek(qint64 off);
|
||||
virtual bool atEnd() const;
|
||||
virtual bool canReadLine() const;
|
||||
|
||||
protected:
|
||||
virtual SIP_PYOBJECT readData(qint64 maxlen) /TypeHint="Py_v3:bytes;str",ReleaseGIL/ [qint64 (char *data, qint64 maxlen)];
|
||||
%MethodCode
|
||||
// Return the data read or None if there was an error.
|
||||
if (a0 < 0)
|
||||
{
|
||||
PyErr_SetString(PyExc_ValueError, "maximum length of data to be read cannot be negative");
|
||||
sipIsErr = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
char *s = new char[a0];
|
||||
qint64 len;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
#if defined(SIP_PROTECTED_IS_PUBLIC)
|
||||
len = sipSelfWasArg ? sipCpp->QBuffer::readData(s, a0) : sipCpp->readData(s, a0);
|
||||
#else
|
||||
len = sipCpp->sipProtectVirt_readData(sipSelfWasArg, s, a0);
|
||||
#endif
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
if (len < 0)
|
||||
{
|
||||
Py_INCREF(Py_None);
|
||||
sipRes = Py_None;
|
||||
}
|
||||
else
|
||||
{
|
||||
sipRes = SIPBytes_FromStringAndSize(s, len);
|
||||
|
||||
if (!sipRes)
|
||||
sipIsErr = 1;
|
||||
}
|
||||
|
||||
delete[] s;
|
||||
}
|
||||
%End
|
||||
|
||||
virtual qint64 writeData(const char *data /Array/, qint64 len /ArraySize/) /ReleaseGIL/;
|
||||
virtual void connectNotify(const QMetaMethod &);
|
||||
virtual void disconnectNotify(const QMetaMethod &);
|
||||
};
|
||||
546
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qbytearray.sip
Normal file
546
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qbytearray.sip
Normal file
@@ -0,0 +1,546 @@
|
||||
// qbytearray.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%ModuleCode
|
||||
#include <qbytearray.h>
|
||||
%End
|
||||
|
||||
class QByteArray /TypeHintIn="Union[QByteArray, bytes, bytearray]"/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qbytearray.h>
|
||||
%End
|
||||
|
||||
%TypeCode
|
||||
// This is needed by __hash__().
|
||||
#include <qhash.h>
|
||||
|
||||
|
||||
// Convenience function for converting a QByteArray to a Python str object.
|
||||
static PyObject *QByteArrayToPyStr(QByteArray *ba)
|
||||
{
|
||||
char *data = ba->data();
|
||||
|
||||
if (data)
|
||||
// QByteArrays may have embedded '\0's so set the size explicitly.
|
||||
return SIPBytes_FromStringAndSize(data, ba->size());
|
||||
|
||||
return SIPBytes_FromString("");
|
||||
}
|
||||
%End
|
||||
|
||||
%ConvertToTypeCode
|
||||
// We have to be very careful about what we allow to be converted to a
|
||||
// QByteArray and to a QString as we need to take into account the v1 and v2
|
||||
// APIs and Python v2.x and v3.x.
|
||||
//
|
||||
// QSvgRenderer() is a good example of what needs to work "naturally". This
|
||||
// has a ctor that takes a QString argument that is the name of the SVG file.
|
||||
// It has another ctor that takes a QByteArray argument that is the SVG data.
|
||||
//
|
||||
// In Python v2.x we want a str object to be interpreted as the name of the
|
||||
// file (as that is the historical behaviour). This has the following
|
||||
// implications.
|
||||
//
|
||||
// - The QString version of the ctor must appear before the QByteArray version
|
||||
// in the .sip file. This rule should be applied wherever a similar
|
||||
// situation arises.
|
||||
// - A QString must not automatically convert a QByteArray.
|
||||
// - QByteArray must also exist in the v2 API.
|
||||
//
|
||||
// In Python v3.x we want a bytes object to be used wherever a QByteArray is
|
||||
// expected. This means that a QString must not automatically convert a bytes
|
||||
// object.
|
||||
//
|
||||
// In PyQt v5.4 and earlier a QByteArray could be created from a Latin-1
|
||||
// encoded string. This was a mistaken attempt to ease the porting of Python2
|
||||
// code to Python3.
|
||||
|
||||
if (sipIsErr == NULL)
|
||||
return (PyByteArray_Check(sipPy) || SIPBytes_Check(sipPy) ||
|
||||
sipCanConvertToType(sipPy, sipType_QByteArray, SIP_NO_CONVERTORS));
|
||||
|
||||
if (PyByteArray_Check(sipPy))
|
||||
{
|
||||
*sipCppPtr = new QByteArray(PyByteArray_AsString(sipPy),
|
||||
PyByteArray_Size(sipPy));
|
||||
|
||||
return sipGetState(sipTransferObj);
|
||||
}
|
||||
|
||||
if (SIPBytes_Check(sipPy))
|
||||
{
|
||||
*sipCppPtr = new QByteArray(SIPBytes_AsString(sipPy),
|
||||
SIPBytes_Size(sipPy));
|
||||
|
||||
return sipGetState(sipTransferObj);
|
||||
}
|
||||
|
||||
*sipCppPtr = reinterpret_cast<QByteArray *>(sipConvertToType(sipPy,
|
||||
sipType_QByteArray, sipTransferObj, SIP_NO_CONVERTORS, 0, sipIsErr));
|
||||
|
||||
return 0;
|
||||
%End
|
||||
|
||||
%BIGetBufferCode
|
||||
#if defined(Py_LIMITED_API)
|
||||
Q_UNUSED(sipSelf);
|
||||
|
||||
sipBuffer->bd_buffer = sipCpp->data();
|
||||
sipBuffer->bd_length = sipCpp->size();
|
||||
sipBuffer->bd_readonly = 0;
|
||||
sipRes = 0;
|
||||
#else
|
||||
sipRes = PyBuffer_FillInfo(sipBuffer, sipSelf, sipCpp->data(),
|
||||
sipCpp->size(), 0, sipFlags);
|
||||
#endif
|
||||
%End
|
||||
|
||||
%BIGetReadBufferCode
|
||||
if (sipSegment != 0)
|
||||
{
|
||||
PyErr_SetString(PyExc_SystemError, "accessing non-existent QByteArray segment");
|
||||
sipRes = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
*sipPtrPtr = (void *)sipCpp->data();
|
||||
sipRes = sipCpp->size();
|
||||
}
|
||||
%End
|
||||
|
||||
%BIGetSegCountCode
|
||||
if (sipLenPtr)
|
||||
*sipLenPtr = sipCpp->size();
|
||||
|
||||
sipRes = 1;
|
||||
%End
|
||||
|
||||
%BIGetCharBufferCode
|
||||
if (sipSegment != 0)
|
||||
{
|
||||
PyErr_SetString(PyExc_SystemError, "accessing non-existent QByteArray segment");
|
||||
sipRes = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
*sipPtrPtr = (void *)sipCpp->data();
|
||||
sipRes = sipCpp->size();
|
||||
}
|
||||
%End
|
||||
|
||||
%PickleCode
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
sipRes = Py_BuildValue((char *)"(y#)", sipCpp->data(), static_cast<Py_ssize_t>(sipCpp->size()));
|
||||
#else
|
||||
sipRes = Py_BuildValue((char *)"(s#)", sipCpp->data(), static_cast<Py_ssize_t>(sipCpp->size()));
|
||||
#endif
|
||||
%End
|
||||
|
||||
public:
|
||||
QByteArray();
|
||||
QByteArray(int size, char c);
|
||||
QByteArray(const QByteArray &a);
|
||||
~QByteArray();
|
||||
void resize(int size);
|
||||
QByteArray &fill(char ch, int size = -1);
|
||||
void clear();
|
||||
int indexOf(const QByteArray &ba, int from = 0) const;
|
||||
int indexOf(const QString &str, int from = 0) const;
|
||||
int lastIndexOf(const QByteArray &ba, int from = -1) const;
|
||||
int lastIndexOf(const QString &str, int from = -1) const;
|
||||
int count(const QByteArray &a) const;
|
||||
QByteArray left(int len) const;
|
||||
QByteArray right(int len) const;
|
||||
QByteArray mid(int pos, int length = -1) const;
|
||||
bool startsWith(const QByteArray &a) const;
|
||||
bool endsWith(const QByteArray &a) const;
|
||||
void truncate(int pos);
|
||||
void chop(int n);
|
||||
QByteArray toLower() const;
|
||||
QByteArray toUpper() const;
|
||||
QByteArray trimmed() const;
|
||||
QByteArray simplified() const;
|
||||
QByteArray leftJustified(int width, char fill = ' ', bool truncate = false) const;
|
||||
QByteArray rightJustified(int width, char fill = ' ', bool truncate = false) const;
|
||||
QByteArray &prepend(const QByteArray &a);
|
||||
QByteArray &append(const QByteArray &a);
|
||||
QByteArray &append(const QString &s);
|
||||
QByteArray &insert(int i, const QByteArray &a);
|
||||
QByteArray &insert(int i, const QString &s);
|
||||
QByteArray &remove(int index, int len);
|
||||
QByteArray &replace(int index, int len, const QByteArray &s);
|
||||
QByteArray &replace(const QByteArray &before, const QByteArray &after);
|
||||
QByteArray &replace(const QString &before, const QByteArray &after);
|
||||
QList<QByteArray> split(char sep) const;
|
||||
QByteArray &operator+=(const QByteArray &a);
|
||||
QByteArray &operator+=(const QString &s);
|
||||
bool operator==(const QString &s2) const;
|
||||
bool operator!=(const QString &s2) const;
|
||||
bool operator<(const QString &s2) const;
|
||||
bool operator>(const QString &s2) const;
|
||||
bool operator<=(const QString &s2) const;
|
||||
bool operator>=(const QString &s2) const;
|
||||
short toShort(bool *ok = 0, int base = 10) const;
|
||||
ushort toUShort(bool *ok = 0, int base = 10) const;
|
||||
int toInt(bool *ok = 0, int base = 10) const;
|
||||
uint toUInt(bool *ok = 0, int base = 10) const;
|
||||
long toLong(bool *ok = 0, int base = 10) const;
|
||||
ulong toULong(bool *ok = 0, int base = 10) const;
|
||||
qlonglong toLongLong(bool *ok = 0, int base = 10) const;
|
||||
qulonglong toULongLong(bool *ok = 0, int base = 10) const;
|
||||
float toFloat(bool *ok = 0) const;
|
||||
double toDouble(bool *ok = 0) const;
|
||||
QByteArray toBase64() const;
|
||||
QByteArray &setNum(double n /Constrained/, char format = 'g', int precision = 6);
|
||||
QByteArray &setNum(SIP_PYOBJECT n /TypeHint="int"/, int base = 10);
|
||||
%MethodCode
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
if (PyInt_Check(a0))
|
||||
{
|
||||
qlonglong val = PyInt_AsLong(a0);
|
||||
|
||||
sipRes = &sipCpp->setNum(val, a1);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
qlonglong val = sipLong_AsLongLong(a0);
|
||||
|
||||
if (!PyErr_Occurred())
|
||||
{
|
||||
sipRes = &sipCpp->setNum(val, a1);
|
||||
}
|
||||
else
|
||||
{
|
||||
// If it is positive then it might fit an unsigned long long.
|
||||
|
||||
qulonglong uval = sipLong_AsUnsignedLongLong(a0);
|
||||
|
||||
if (!PyErr_Occurred())
|
||||
{
|
||||
sipRes = &sipCpp->setNum(uval, a1);
|
||||
}
|
||||
else
|
||||
{
|
||||
sipError = (PyErr_ExceptionMatches(PyExc_OverflowError)
|
||||
? sipErrorFail : sipErrorContinue);
|
||||
}
|
||||
}
|
||||
}
|
||||
%End
|
||||
|
||||
static QByteArray number(double n /Constrained/, char format = 'g', int precision = 6);
|
||||
static QByteArray number(SIP_PYOBJECT n /TypeHint="int"/, int base = 10);
|
||||
%MethodCode
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
if (PyInt_Check(a0))
|
||||
{
|
||||
qlonglong val = PyInt_AsLong(a0);
|
||||
|
||||
sipRes = new QByteArray(QByteArray::number(val, a1));
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
qlonglong val = sipLong_AsLongLong(a0);
|
||||
|
||||
if (!PyErr_Occurred())
|
||||
{
|
||||
sipRes = new QByteArray(QByteArray::number(val, a1));
|
||||
}
|
||||
else
|
||||
{
|
||||
// If it is positive then it might fit an unsigned long long.
|
||||
|
||||
qulonglong uval = sipLong_AsUnsignedLongLong(a0);
|
||||
|
||||
if (!PyErr_Occurred())
|
||||
{
|
||||
sipRes = new QByteArray(QByteArray::number(uval, a1));
|
||||
}
|
||||
else
|
||||
{
|
||||
sipError = (PyErr_ExceptionMatches(PyExc_OverflowError)
|
||||
? sipErrorFail : sipErrorContinue);
|
||||
}
|
||||
}
|
||||
}
|
||||
%End
|
||||
|
||||
static QByteArray fromBase64(const QByteArray &base64);
|
||||
static QByteArray fromRawData(const char * /Array/, int size /ArraySize/);
|
||||
static QByteArray fromHex(const QByteArray &hexEncoded);
|
||||
int count() const /__len__/;
|
||||
int length() const;
|
||||
bool isNull() const;
|
||||
int size() const;
|
||||
char at(int i) const /Encoding="None"/;
|
||||
char operator[](int i) const /Encoding="None"/;
|
||||
%MethodCode
|
||||
Py_ssize_t idx = sipConvertFromSequenceIndex(a0, sipCpp->count());
|
||||
|
||||
if (idx < 0)
|
||||
sipIsErr = 1;
|
||||
else
|
||||
sipRes = sipCpp->operator[]((int)idx);
|
||||
%End
|
||||
|
||||
QByteArray operator[](SIP_PYSLICE slice) const;
|
||||
%MethodCode
|
||||
Py_ssize_t start, stop, step, slicelength;
|
||||
|
||||
if (sipConvertFromSliceObject(a0, sipCpp->length(), &start, &stop, &step, &slicelength) < 0)
|
||||
{
|
||||
sipIsErr = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
sipRes = new QByteArray();
|
||||
|
||||
for (Py_ssize_t i = 0; i < slicelength; ++i)
|
||||
{
|
||||
sipRes -> append(sipCpp->at(start));
|
||||
start += step;
|
||||
}
|
||||
}
|
||||
%End
|
||||
|
||||
int __contains__(const QByteArray &a) const;
|
||||
%MethodCode
|
||||
// It looks like you can't assign QBool to int.
|
||||
sipRes = bool(sipCpp->contains(*a0));
|
||||
%End
|
||||
|
||||
long __hash__() const;
|
||||
%MethodCode
|
||||
sipRes = qHash(*sipCpp);
|
||||
%End
|
||||
|
||||
SIP_PYOBJECT __str__() const /TypeHint="str"/;
|
||||
%MethodCode
|
||||
sipRes = QByteArrayToPyStr(sipCpp);
|
||||
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
PyObject *repr = PyObject_Repr(sipRes);
|
||||
|
||||
if (repr)
|
||||
{
|
||||
Py_DECREF(sipRes);
|
||||
sipRes = repr;
|
||||
}
|
||||
#endif
|
||||
%End
|
||||
|
||||
SIP_PYOBJECT __repr__() const /TypeHint="str"/;
|
||||
%MethodCode
|
||||
if (sipCpp->isNull())
|
||||
{
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
sipRes = PyUnicode_FromString("PyQt5.QtCore.QByteArray()");
|
||||
#else
|
||||
sipRes = PyString_FromString("PyQt5.QtCore.QByteArray()");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
PyObject *str = QByteArrayToPyStr(sipCpp);
|
||||
|
||||
if (str)
|
||||
{
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
sipRes = PyUnicode_FromFormat("PyQt5.QtCore.QByteArray(%R)", str);
|
||||
#else
|
||||
sipRes = PyString_FromString("PyQt5.QtCore.QByteArray(");
|
||||
PyString_ConcatAndDel(&sipRes, PyObject_Repr(str));
|
||||
PyString_ConcatAndDel(&sipRes, PyString_FromString(")"));
|
||||
#endif
|
||||
|
||||
Py_DECREF(str);
|
||||
}
|
||||
}
|
||||
%End
|
||||
|
||||
QByteArray operator*(int m) const;
|
||||
%MethodCode
|
||||
sipRes = new QByteArray();
|
||||
|
||||
while (a0-- > 0)
|
||||
*sipRes += *sipCpp;
|
||||
%End
|
||||
|
||||
QByteArray &operator*=(int m);
|
||||
%MethodCode
|
||||
QByteArray orig(*sipCpp);
|
||||
|
||||
sipCpp->clear();
|
||||
|
||||
while (a0-- > 0)
|
||||
*sipCpp += orig;
|
||||
%End
|
||||
|
||||
bool isEmpty() const;
|
||||
SIP_PYOBJECT data() /TypeHint="Py_v3:bytes;str"/;
|
||||
%MethodCode
|
||||
// QByteArrays may contain embedded '\0's so set the size explicitly.
|
||||
|
||||
char *res = sipCpp->data();
|
||||
int len = sipCpp->size();
|
||||
|
||||
if (res)
|
||||
{
|
||||
if ((sipRes = SIPBytes_FromStringAndSize(res, len)) == NULL)
|
||||
sipIsErr = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
Py_INCREF(Py_None);
|
||||
sipRes = Py_None;
|
||||
}
|
||||
%End
|
||||
|
||||
int capacity() const;
|
||||
void reserve(int size);
|
||||
void squeeze();
|
||||
void push_back(const QByteArray &a);
|
||||
void push_front(const QByteArray &a);
|
||||
bool contains(const QByteArray &a) const;
|
||||
QByteArray toHex() const;
|
||||
QByteArray toPercentEncoding(const QByteArray &exclude = QByteArray(), const QByteArray &include = QByteArray(), char percent = '%') const;
|
||||
static QByteArray fromPercentEncoding(const QByteArray &input, char percent = '%');
|
||||
QByteArray repeated(int times) const;
|
||||
void swap(QByteArray &other /Constrained/);
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
enum Base64Option
|
||||
{
|
||||
Base64Encoding,
|
||||
Base64UrlEncoding,
|
||||
KeepTrailingEquals,
|
||||
OmitTrailingEquals,
|
||||
%If (Qt_5_15_0 -)
|
||||
IgnoreBase64DecodingErrors,
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
AbortOnBase64DecodingErrors,
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
typedef QFlags<QByteArray::Base64Option> Base64Options;
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
QByteArray toBase64(QByteArray::Base64Options options) const;
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
static QByteArray fromBase64(const QByteArray &base64, QByteArray::Base64Options options);
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
QByteArray &prepend(int count, char c /Encoding="None"/);
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
QByteArray &append(int count, char c /Encoding="None"/);
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
QByteArray &insert(int i, int count, char c /Encoding="None"/);
|
||||
%End
|
||||
%If (Qt_5_9_0 -)
|
||||
QByteArray toHex(char separator) const;
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
QByteArray chopped(int len) const;
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
int compare(const QByteArray &a, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
bool isUpper() const;
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
bool isLower() const;
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
|
||||
enum class Base64DecodingStatus
|
||||
{
|
||||
Ok,
|
||||
IllegalInputLength,
|
||||
IllegalCharacter,
|
||||
IllegalPadding,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
static QByteArray::FromBase64Result fromBase64Encoding(const QByteArray &base64, QByteArray::Base64Options options = QByteArray::Base64Encoding);
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
|
||||
class FromBase64Result
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qbytearray.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QByteArray decoded;
|
||||
QByteArray::Base64DecodingStatus decodingStatus;
|
||||
void swap(QByteArray::FromBase64Result &other /Constrained/);
|
||||
operator bool() const;
|
||||
%MethodCode
|
||||
// This is required because SIP doesn't handle operator bool() properly.
|
||||
sipRes = sipCpp->operator bool();
|
||||
%End
|
||||
|
||||
long __hash__() const;
|
||||
%MethodCode
|
||||
sipRes = qHash(*sipCpp);
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
};
|
||||
|
||||
bool operator==(const QByteArray &a1, const QByteArray &a2);
|
||||
bool operator!=(const QByteArray &a1, const QByteArray &a2);
|
||||
bool operator<(const QByteArray &a1, const QByteArray &a2);
|
||||
bool operator<=(const QByteArray &a1, const QByteArray &a2);
|
||||
bool operator>(const QByteArray &a1, const QByteArray &a2);
|
||||
bool operator>=(const QByteArray &a1, const QByteArray &a2);
|
||||
const QByteArray operator+(const QByteArray &a1, const QByteArray &a2);
|
||||
QDataStream &operator<<(QDataStream &, const QByteArray & /Constrained/) /ReleaseGIL/;
|
||||
QDataStream &operator>>(QDataStream &, QByteArray & /Constrained/) /ReleaseGIL/;
|
||||
QByteArray qCompress(const QByteArray &data, int compressionLevel = -1);
|
||||
QByteArray qUncompress(const QByteArray &data);
|
||||
%If (Qt_5_2_0 -)
|
||||
QFlags<QByteArray::Base64Option> operator|(QByteArray::Base64Option f1, QFlags<QByteArray::Base64Option> f2);
|
||||
%End
|
||||
quint16 qChecksum(const char *s /Array/, uint len /ArraySize/);
|
||||
%If (Qt_5_9_0 -)
|
||||
quint16 qChecksum(const char *s /Array/, uint len /ArraySize/, Qt::ChecksumType standard);
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
bool operator==(const QByteArray::FromBase64Result &lhs, const QByteArray::FromBase64Result &rhs);
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
bool operator!=(const QByteArray::FromBase64Result &lhs, const QByteArray::FromBase64Result &rhs);
|
||||
%End
|
||||
@@ -0,0 +1,37 @@
|
||||
// qbytearraymatcher.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QByteArrayMatcher
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qbytearraymatcher.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QByteArrayMatcher();
|
||||
explicit QByteArrayMatcher(const QByteArray &pattern);
|
||||
QByteArrayMatcher(const QByteArrayMatcher &other);
|
||||
~QByteArrayMatcher();
|
||||
void setPattern(const QByteArray &pattern);
|
||||
int indexIn(const QByteArray &ba, int from = 0) const;
|
||||
QByteArray pattern() const;
|
||||
};
|
||||
100
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qcalendar.sip
Normal file
100
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qcalendar.sip
Normal file
@@ -0,0 +1,100 @@
|
||||
// qcalendar.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_14_0 -)
|
||||
|
||||
class QCalendar
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcalendar.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum
|
||||
{
|
||||
Unspecified,
|
||||
};
|
||||
|
||||
struct YearMonthDay
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcalendar.h>
|
||||
%End
|
||||
|
||||
YearMonthDay();
|
||||
YearMonthDay(int year, int month = 1, int day = 1);
|
||||
bool isValid() const;
|
||||
int year;
|
||||
int month;
|
||||
int day;
|
||||
};
|
||||
|
||||
enum class System
|
||||
{
|
||||
Gregorian,
|
||||
Julian,
|
||||
Milankovic,
|
||||
Jalali,
|
||||
IslamicCivil,
|
||||
};
|
||||
|
||||
QCalendar();
|
||||
explicit QCalendar(QCalendar::System system);
|
||||
explicit QCalendar(const char *name /Encoding="Latin-1"/) [(QLatin1String name)];
|
||||
%MethodCode
|
||||
// This is currently the only occurence of a QLatin1String argument.
|
||||
sipCpp = new QCalendar(QLatin1String(a0));
|
||||
%End
|
||||
|
||||
int daysInMonth(int month, int year = QCalendar::Unspecified) const;
|
||||
int daysInYear(int year) const;
|
||||
int monthsInYear(int year) const;
|
||||
bool isDateValid(int year, int month, int day) const;
|
||||
bool isLeapYear(int year) const;
|
||||
bool isGregorian() const;
|
||||
bool isLunar() const;
|
||||
bool isLuniSolar() const;
|
||||
bool isSolar() const;
|
||||
bool isProleptic() const;
|
||||
bool hasYearZero() const;
|
||||
int maximumDaysInMonth() const;
|
||||
int minimumDaysInMonth() const;
|
||||
int maximumMonthsInYear() const;
|
||||
QString name() const;
|
||||
QDate dateFromParts(int year, int month, int day) const;
|
||||
QDate dateFromParts(const QCalendar::YearMonthDay &parts) const;
|
||||
QCalendar::YearMonthDay partsFromDate(QDate date) const;
|
||||
int dayOfWeek(QDate date) const;
|
||||
QString monthName(const QLocale &locale, int month, int year = QCalendar::Unspecified, QLocale::FormatType format = QLocale::LongFormat) const;
|
||||
QString standaloneMonthName(const QLocale &locale, int month, int year = QCalendar::Unspecified, QLocale::FormatType format = QLocale::LongFormat) const;
|
||||
QString weekDayName(const QLocale &locale, int day, QLocale::FormatType format = QLocale::LongFormat) const;
|
||||
QString standaloneWeekDayName(const QLocale &locale, int day, QLocale::FormatType format = QLocale::LongFormat) const;
|
||||
QString dateTimeToString(const QString &format, const QDateTime &datetime, const QDate &dateOnly, const QTime &timeOnly, const QLocale &locale) const;
|
||||
%MethodCode
|
||||
// QStringView has issues being implemented as a mapped type.
|
||||
sipRes = new QString(sipCpp->dateTimeToString(QStringView(*a0), *a1, *a2, *a3, *a4));
|
||||
%End
|
||||
|
||||
static QStringList availableCalendars();
|
||||
};
|
||||
|
||||
%End
|
||||
108
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qcborcommon.sip
Normal file
108
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qcborcommon.sip
Normal file
@@ -0,0 +1,108 @@
|
||||
// qcborcommon.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_12_0 -)
|
||||
%ModuleCode
|
||||
#include <qcborcommon.h>
|
||||
%End
|
||||
%End
|
||||
|
||||
%If (Qt_5_12_0 -)
|
||||
|
||||
enum class QCborSimpleType
|
||||
{
|
||||
False /PyName=False_/,
|
||||
True /PyName=True_/,
|
||||
Null,
|
||||
Undefined,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
|
||||
struct QCborError
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcborcommon.h>
|
||||
%End
|
||||
|
||||
enum Code
|
||||
{
|
||||
UnknownError,
|
||||
AdvancePastEnd,
|
||||
InputOutputError,
|
||||
GarbageAtEnd,
|
||||
EndOfFile,
|
||||
UnexpectedBreak,
|
||||
UnknownType,
|
||||
IllegalType,
|
||||
IllegalNumber,
|
||||
IllegalSimpleType,
|
||||
InvalidUtf8String,
|
||||
DataTooLarge,
|
||||
NestingTooDeep,
|
||||
UnsupportedType,
|
||||
NoError,
|
||||
};
|
||||
|
||||
// Error code access
|
||||
// This class is currently undocumented. Access to the error code is via a
|
||||
// cast (which SIP doesn't support) or a badly named instance variable. To be
|
||||
// safe we implement a more Qt-typical solution.
|
||||
QCborError::Code code() const;
|
||||
%MethodCode
|
||||
sipRes = sipCpp->c;
|
||||
%End
|
||||
QString toString() const;
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
|
||||
enum class QCborKnownTags
|
||||
{
|
||||
DateTimeString,
|
||||
UnixTime_t,
|
||||
PositiveBignum,
|
||||
NegativeBignum,
|
||||
Decimal,
|
||||
Bigfloat,
|
||||
COSE_Encrypt0,
|
||||
COSE_Mac0,
|
||||
COSE_Sign1,
|
||||
ExpectedBase64url,
|
||||
ExpectedBase64,
|
||||
ExpectedBase16,
|
||||
EncodedCbor,
|
||||
Url,
|
||||
Base64url,
|
||||
Base64,
|
||||
RegularExpression,
|
||||
MimeMessage,
|
||||
Uuid,
|
||||
COSE_Encrypt,
|
||||
COSE_Mac,
|
||||
COSE_Sign,
|
||||
Signature,
|
||||
};
|
||||
|
||||
%End
|
||||
234
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qcborstream.sip
Normal file
234
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qcborstream.sip
Normal file
@@ -0,0 +1,234 @@
|
||||
// qcborstream.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_12_0 -)
|
||||
|
||||
class QCborStreamWriter
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcborstream.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QCborStreamWriter(QIODevice *device);
|
||||
explicit QCborStreamWriter(QByteArray *data);
|
||||
~QCborStreamWriter();
|
||||
void setDevice(QIODevice *device);
|
||||
QIODevice *device() const;
|
||||
void append(QCborSimpleType st);
|
||||
void append(QCborKnownTags tag);
|
||||
void append(const QString &str) [void (QStringView str)];
|
||||
void append(const QByteArray &ba);
|
||||
void append(bool b /Constrained/);
|
||||
void append(double d /Constrained/);
|
||||
%MethodCode
|
||||
// Use the smallest type without losing precision.
|
||||
|
||||
qfloat16 a0_16 = a0;
|
||||
|
||||
if (qIsNaN(a0) || a0_16 == a0)
|
||||
{
|
||||
sipCpp->append(a0_16);
|
||||
}
|
||||
else
|
||||
{
|
||||
float a0_float = a0;
|
||||
|
||||
if (a0_float == a0)
|
||||
sipCpp->append(a0_float);
|
||||
else
|
||||
sipCpp->append(a0);
|
||||
}
|
||||
%End
|
||||
|
||||
void append(SIP_PYOBJECT /TypeHint="int"/);
|
||||
%MethodCode
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
if (PyLong_Check(a0))
|
||||
#endif
|
||||
{
|
||||
static PyObject *zero = 0;
|
||||
|
||||
if (!zero)
|
||||
zero = PyLong_FromLong(0);
|
||||
|
||||
if (PyObject_RichCompareBool(a0, zero, Py_LT) > 0)
|
||||
{
|
||||
PyErr_Clear();
|
||||
qint64 val = sipLong_AsLongLong(a0);
|
||||
|
||||
if (PyErr_Occurred())
|
||||
sipError = sipErrorFail;
|
||||
else
|
||||
sipCpp->append(val);
|
||||
}
|
||||
else
|
||||
{
|
||||
PyErr_Clear();
|
||||
quint64 val = sipLong_AsUnsignedLongLong(a0);
|
||||
|
||||
if (PyErr_Occurred())
|
||||
sipError = sipErrorFail;
|
||||
else
|
||||
sipCpp->append(val);
|
||||
}
|
||||
}
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
else if (PyInt_Check(a0))
|
||||
{
|
||||
PyErr_Clear();
|
||||
long val = PyInt_AsLong(a0);
|
||||
|
||||
if (PyErr_Occurred())
|
||||
sipError = sipErrorFail;
|
||||
else if (val < 0)
|
||||
sipCpp->append((qint64)val);
|
||||
else
|
||||
sipCpp->append((quint64)val);
|
||||
}
|
||||
#endif
|
||||
%End
|
||||
|
||||
void appendNull();
|
||||
void appendUndefined();
|
||||
void startArray();
|
||||
void startArray(quint64 count);
|
||||
bool endArray();
|
||||
void startMap();
|
||||
void startMap(quint64 count);
|
||||
bool endMap();
|
||||
|
||||
private:
|
||||
QCborStreamWriter(const QCborStreamWriter &);
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
|
||||
class QCborStreamReader
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcborstream.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Type
|
||||
{
|
||||
UnsignedInteger,
|
||||
NegativeInteger,
|
||||
ByteString,
|
||||
ByteArray,
|
||||
TextString,
|
||||
String,
|
||||
Array,
|
||||
Map,
|
||||
Tag,
|
||||
SimpleType,
|
||||
HalfFloat,
|
||||
Float16,
|
||||
Float,
|
||||
Double,
|
||||
Invalid,
|
||||
};
|
||||
|
||||
enum StringResultCode
|
||||
{
|
||||
EndOfString,
|
||||
Ok,
|
||||
Error,
|
||||
};
|
||||
|
||||
QCborStreamReader();
|
||||
explicit QCborStreamReader(const QByteArray &data);
|
||||
explicit QCborStreamReader(QIODevice *device);
|
||||
~QCborStreamReader();
|
||||
void setDevice(QIODevice *device);
|
||||
QIODevice *device() const;
|
||||
void addData(const QByteArray &data);
|
||||
void reparse();
|
||||
void clear();
|
||||
void reset();
|
||||
QCborError lastError();
|
||||
qint64 currentOffset() const;
|
||||
bool isValid() const;
|
||||
int containerDepth() const;
|
||||
QCborStreamReader::Type parentContainerType() const;
|
||||
bool hasNext() const;
|
||||
bool next(int maxRecursion = 10000);
|
||||
QCborStreamReader::Type type() const;
|
||||
bool isUnsignedInteger() const;
|
||||
bool isNegativeInteger() const;
|
||||
bool isInteger() const;
|
||||
bool isByteArray() const;
|
||||
bool isString() const;
|
||||
bool isArray() const;
|
||||
bool isMap() const;
|
||||
bool isTag() const;
|
||||
bool isSimpleType() const;
|
||||
bool isFloat16() const;
|
||||
bool isFloat() const;
|
||||
bool isDouble() const;
|
||||
bool isInvalid() const;
|
||||
bool isSimpleType(QCborSimpleType st) const;
|
||||
bool isFalse() const;
|
||||
bool isTrue() const;
|
||||
bool isBool() const;
|
||||
bool isNull() const;
|
||||
bool isUndefined() const;
|
||||
bool isLengthKnown() const;
|
||||
quint64 length() const /__len__/;
|
||||
bool isContainer() const;
|
||||
bool enterContainer();
|
||||
bool leaveContainer();
|
||||
SIP_PYTUPLE readString() /TypeHint="Tuple[str, QCborStreamReader.StringResultCode]"/;
|
||||
%MethodCode
|
||||
QCborStreamReader::StringResult<QString> res = sipCpp->readString();
|
||||
|
||||
QString *qs = new QString;
|
||||
if (res.status != QCborStreamReader::Error)
|
||||
*qs = res.data;
|
||||
|
||||
sipRes = sipBuildResult(NULL, "NF", qs, sipType_QString, NULL, res.status, sipType_QCborStreamReader_StringResultCode);
|
||||
%End
|
||||
|
||||
SIP_PYTUPLE readByteArray() /TypeHint="Tuple[QByteArray, QCborStreamReader.StringResultCode]"/;
|
||||
%MethodCode
|
||||
QCborStreamReader::StringResult<QByteArray> res = sipCpp->readByteArray();
|
||||
|
||||
QByteArray *qba = new QByteArray;
|
||||
if (res.status != QCborStreamReader::Error)
|
||||
*qba = res.data;
|
||||
|
||||
sipRes = sipBuildResult(NULL, "NF", qba, sipType_QByteArray, NULL, res.status, sipType_QCborStreamReader_StringResultCode);
|
||||
%End
|
||||
|
||||
bool toBool() const;
|
||||
quint64 toUnsignedInteger() const;
|
||||
QCborSimpleType toSimpleType() const;
|
||||
double toDouble() const;
|
||||
qint64 toInteger() const;
|
||||
|
||||
private:
|
||||
QCborStreamReader(const QCborStreamReader &);
|
||||
};
|
||||
|
||||
%End
|
||||
55
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qchar.sip
Normal file
55
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qchar.sip
Normal file
@@ -0,0 +1,55 @@
|
||||
// qchar.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
// QChar mapped type.
|
||||
%MappedType QChar /TypeHint="str",TypeHintValue="''"/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qchar.h>
|
||||
%End
|
||||
|
||||
%ConvertToTypeCode
|
||||
if (sipIsErr == NULL)
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
return (PyString_Check(sipPy) || PyUnicode_Check(sipPy));
|
||||
#else
|
||||
return PyUnicode_Check(sipPy);
|
||||
#endif
|
||||
|
||||
QString qs = qpycore_PyObject_AsQString(sipPy);
|
||||
|
||||
if (qs.size() != 1)
|
||||
{
|
||||
PyErr_SetString(PyExc_ValueError, "string of length 1 expected");
|
||||
*sipIsErr = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
*sipCppPtr = new QChar(qs.at(0));
|
||||
|
||||
return sipGetState(sipTransferObj);
|
||||
%End
|
||||
|
||||
%ConvertFromTypeCode
|
||||
return qpycore_PyObject_FromQString(QString(*sipCpp));
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,70 @@
|
||||
// qcollator.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
class QCollatorSortKey
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcollator.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QCollatorSortKey(const QCollatorSortKey &other);
|
||||
~QCollatorSortKey();
|
||||
void swap(QCollatorSortKey &other /Constrained/);
|
||||
int compare(const QCollatorSortKey &key) const;
|
||||
|
||||
private:
|
||||
QCollatorSortKey();
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
bool operator<(const QCollatorSortKey &lhs, const QCollatorSortKey &rhs);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
class QCollator
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcollator.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QCollator(const QLocale &locale = QLocale());
|
||||
QCollator(const QCollator &);
|
||||
~QCollator();
|
||||
void swap(QCollator &other /Constrained/);
|
||||
void setLocale(const QLocale &locale);
|
||||
QLocale locale() const;
|
||||
Qt::CaseSensitivity caseSensitivity() const;
|
||||
void setCaseSensitivity(Qt::CaseSensitivity cs);
|
||||
void setNumericMode(bool on);
|
||||
bool numericMode() const;
|
||||
void setIgnorePunctuation(bool on);
|
||||
bool ignorePunctuation() const;
|
||||
int compare(const QString &s1, const QString &s2) const;
|
||||
QCollatorSortKey sortKey(const QString &string) const;
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,90 @@
|
||||
// qcommandlineoption.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
class QCommandLineOption
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcommandlineoption.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
%If (Qt_5_4_0 -)
|
||||
explicit QCommandLineOption(const QString &name);
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
explicit QCommandLineOption(const QStringList &names);
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
QCommandLineOption(const QString &name, const QString &description, const QString &valueName = QString(), const QString &defaultValue = QString());
|
||||
%End
|
||||
%If (- Qt_5_4_0)
|
||||
QCommandLineOption(const QString &name, const QString &description = QString(), const QString &valueName = QString(), const QString &defaultValue = QString());
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
QCommandLineOption(const QStringList &names, const QString &description, const QString &valueName = QString(), const QString &defaultValue = QString());
|
||||
%End
|
||||
%If (- Qt_5_4_0)
|
||||
QCommandLineOption(const QStringList &names, const QString &description = QString(), const QString &valueName = QString(), const QString &defaultValue = QString());
|
||||
%End
|
||||
QCommandLineOption(const QCommandLineOption &other);
|
||||
~QCommandLineOption();
|
||||
void swap(QCommandLineOption &other /Constrained/);
|
||||
QStringList names() const;
|
||||
void setValueName(const QString &name);
|
||||
QString valueName() const;
|
||||
void setDescription(const QString &description);
|
||||
QString description() const;
|
||||
void setDefaultValue(const QString &defaultValue);
|
||||
void setDefaultValues(const QStringList &defaultValues);
|
||||
QStringList defaultValues() const;
|
||||
%If (Qt_5_6_0 -)
|
||||
void setHidden(bool hidden);
|
||||
%End
|
||||
%If (Qt_5_6_0 -)
|
||||
bool isHidden() const;
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
|
||||
enum Flag
|
||||
{
|
||||
HiddenFromHelp,
|
||||
ShortOptionStyle,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
typedef QFlags<QCommandLineOption::Flag> Flags;
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
QCommandLineOption::Flags flags() const;
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
void setFlags(QCommandLineOption::Flags aflags);
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
QFlags<QCommandLineOption::Flag> operator|(QCommandLineOption::Flag f1, QFlags<QCommandLineOption::Flag> f2);
|
||||
%End
|
||||
@@ -0,0 +1,87 @@
|
||||
// qcommandlineparser.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
class QCommandLineParser
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcommandlineparser.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QCommandLineParser();
|
||||
~QCommandLineParser();
|
||||
|
||||
enum SingleDashWordOptionMode
|
||||
{
|
||||
ParseAsCompactedShortOptions,
|
||||
ParseAsLongOptions,
|
||||
};
|
||||
|
||||
void setSingleDashWordOptionMode(QCommandLineParser::SingleDashWordOptionMode parsingMode);
|
||||
bool addOption(const QCommandLineOption &commandLineOption);
|
||||
QCommandLineOption addVersionOption();
|
||||
QCommandLineOption addHelpOption();
|
||||
void setApplicationDescription(const QString &description);
|
||||
QString applicationDescription() const;
|
||||
void addPositionalArgument(const QString &name, const QString &description, const QString &syntax = QString());
|
||||
void clearPositionalArguments();
|
||||
void process(const QStringList &arguments) /ReleaseGIL/;
|
||||
void process(const QCoreApplication &app) /ReleaseGIL/;
|
||||
bool parse(const QStringList &arguments);
|
||||
QString errorText() const;
|
||||
bool isSet(const QString &name) const;
|
||||
QString value(const QString &name) const;
|
||||
QStringList values(const QString &name) const;
|
||||
bool isSet(const QCommandLineOption &option) const;
|
||||
QString value(const QCommandLineOption &option) const;
|
||||
QStringList values(const QCommandLineOption &option) const;
|
||||
QStringList positionalArguments() const;
|
||||
QStringList optionNames() const;
|
||||
QStringList unknownOptionNames() const;
|
||||
void showHelp(int exitCode = 0) /ReleaseGIL/;
|
||||
QString helpText() const;
|
||||
%If (Qt_5_4_0 -)
|
||||
bool addOptions(const QList<QCommandLineOption> &options);
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
void showVersion();
|
||||
%End
|
||||
%If (Qt_5_6_0 -)
|
||||
|
||||
enum OptionsAfterPositionalArgumentsMode
|
||||
{
|
||||
ParseAsOptions,
|
||||
ParseAsPositionalArguments,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_6_0 -)
|
||||
void setOptionsAfterPositionalArgumentsMode(QCommandLineParser::OptionsAfterPositionalArgumentsMode mode);
|
||||
%End
|
||||
|
||||
private:
|
||||
QCommandLineParser(const QCommandLineParser &);
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,96 @@
|
||||
// qconcatenatetablesproxymodel.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_13_0 -)
|
||||
|
||||
class QConcatenateTablesProxyModel : public QAbstractItemModel
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qconcatenatetablesproxymodel.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QConcatenateTablesProxyModel(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QConcatenateTablesProxyModel();
|
||||
void addSourceModel(QAbstractItemModel *sourceModel /GetWrapper/);
|
||||
%MethodCode
|
||||
// We want to keep a reference to the model but this is in addition to the
|
||||
// existing ones and does not replace them - so we can't use /KeepReference/.
|
||||
sipCpp->addSourceModel(a0);
|
||||
|
||||
// Use the user object as a list of the references.
|
||||
PyObject *user = sipGetUserObject((sipSimpleWrapper *)sipSelf);
|
||||
|
||||
if (!user)
|
||||
{
|
||||
user = PyList_New(0);
|
||||
sipSetUserObject((sipSimpleWrapper *)sipSelf, user);
|
||||
}
|
||||
|
||||
if (user)
|
||||
PyList_Append(user, a0Wrapper);
|
||||
%End
|
||||
|
||||
void removeSourceModel(QAbstractItemModel *sourceModel /GetWrapper/);
|
||||
%MethodCode
|
||||
// Discard the extra model reference that we took in addSourceModel().
|
||||
sipCpp->removeSourceModel(a0);
|
||||
|
||||
// Use the user object as a list of the references.
|
||||
PyObject *user = sipGetUserObject((sipSimpleWrapper *)sipSelf);
|
||||
|
||||
if (user)
|
||||
{
|
||||
Py_ssize_t i = 0;
|
||||
|
||||
// Note that we deal with an object appearing in the list more than once.
|
||||
while (i < PyList_Size(user))
|
||||
if (PyList_GetItem(user, i) == a0Wrapper)
|
||||
PyList_SetSlice(user, i, i + 1, NULL);
|
||||
else
|
||||
++i;
|
||||
}
|
||||
%End
|
||||
|
||||
QModelIndex mapFromSource(const QModelIndex &sourceIndex) const;
|
||||
QModelIndex mapToSource(const QModelIndex &proxyIndex) const;
|
||||
virtual QVariant data(const QModelIndex &index, int role = Qt::ItemDataRole::DisplayRole) const;
|
||||
virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::ItemDataRole::EditRole);
|
||||
virtual QMap<int, QVariant> itemData(const QModelIndex &proxyIndex) const;
|
||||
virtual bool setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles);
|
||||
virtual Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
virtual QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
|
||||
virtual QModelIndex parent(const QModelIndex &index) const;
|
||||
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::ItemDataRole::DisplayRole) const;
|
||||
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
virtual QStringList mimeTypes() const;
|
||||
virtual QMimeData *mimeData(const QModelIndexList &indexes) const /TransferBack/;
|
||||
virtual bool canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const;
|
||||
virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
|
||||
virtual QSize span(const QModelIndex &index) const;
|
||||
%If (Qt_5_15_0 -)
|
||||
QList<QAbstractItemModel *> sourceModels() const;
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,377 @@
|
||||
// qcoreapplication.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%ModuleCode
|
||||
#include <qcoreapplication.h>
|
||||
%End
|
||||
|
||||
class QCoreApplication : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcoreapplication.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QCoreApplication(SIP_PYLIST argv /TypeHint="List[str]"/) /PostHook=__pyQtQAppHook__/ [(int &argc, char **argv)];
|
||||
%MethodCode
|
||||
// The Python interface is a list of argument strings that is modified.
|
||||
|
||||
int argc;
|
||||
char **argv;
|
||||
|
||||
// Convert the list.
|
||||
if ((argv = pyqt5_from_argv_list(a0, argc)) == NULL)
|
||||
sipIsErr = 1;
|
||||
else
|
||||
{
|
||||
// Create it now the arguments are right.
|
||||
static int nargc;
|
||||
nargc = argc;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp = new sipQCoreApplication(nargc, argv);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
// Now modify the original list.
|
||||
pyqt5_update_argv_list(a0, argc, argv);
|
||||
}
|
||||
%End
|
||||
|
||||
virtual ~QCoreApplication() /ReleaseGIL/;
|
||||
%MethodCode
|
||||
pyqt5_cleanup_qobjects();
|
||||
%End
|
||||
|
||||
static void setOrganizationDomain(const QString &orgDomain);
|
||||
static QString organizationDomain();
|
||||
static void setOrganizationName(const QString &orgName);
|
||||
static QString organizationName();
|
||||
static void setApplicationName(const QString &application);
|
||||
static QString applicationName();
|
||||
static QStringList arguments();
|
||||
static QCoreApplication *instance();
|
||||
static int exec() /PostHook=__pyQtPostEventLoopHook__,PreHook=__pyQtPreEventLoopHook__,PyName=exec_,ReleaseGIL/;
|
||||
%If (Py_v3)
|
||||
static int exec() /PostHook=__pyQtPostEventLoopHook__,PreHook=__pyQtPreEventLoopHook__,ReleaseGIL/;
|
||||
%End
|
||||
static void processEvents(QEventLoop::ProcessEventsFlags flags = QEventLoop::ProcessEventsFlag::AllEvents) /ReleaseGIL/;
|
||||
static void processEvents(QEventLoop::ProcessEventsFlags flags, int maxtime) /ReleaseGIL/;
|
||||
static void exit(int returnCode = 0);
|
||||
static bool sendEvent(QObject *receiver, QEvent *event) /ReleaseGIL/;
|
||||
static void postEvent(QObject *receiver, QEvent *event /Transfer/, int priority = Qt::EventPriority::NormalEventPriority);
|
||||
static void sendPostedEvents(QObject *receiver = 0, int eventType = 0) /ReleaseGIL/;
|
||||
static void removePostedEvents(QObject *receiver, int eventType = 0);
|
||||
static bool hasPendingEvents();
|
||||
virtual bool notify(QObject *, QEvent *) /ReleaseGIL/;
|
||||
static bool startingUp();
|
||||
static bool closingDown();
|
||||
static QString applicationDirPath();
|
||||
static QString applicationFilePath();
|
||||
static void setLibraryPaths(const QStringList &);
|
||||
static QStringList libraryPaths();
|
||||
static void addLibraryPath(const QString &);
|
||||
static void removeLibraryPath(const QString &);
|
||||
static bool installTranslator(QTranslator *messageFile);
|
||||
static bool removeTranslator(QTranslator *messageFile);
|
||||
static QString translate(const char *context, const char *sourceText /Encoding="UTF-8"/, const char *disambiguation = 0, int n = -1);
|
||||
static void flush() /ReleaseGIL/;
|
||||
static void setAttribute(Qt::ApplicationAttribute attribute, bool on = true);
|
||||
static bool testAttribute(Qt::ApplicationAttribute attribute);
|
||||
|
||||
public slots:
|
||||
static void quit();
|
||||
|
||||
signals:
|
||||
void aboutToQuit();
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *);
|
||||
|
||||
public:
|
||||
static void setApplicationVersion(const QString &version);
|
||||
static QString applicationVersion();
|
||||
static qint64 applicationPid();
|
||||
static QAbstractEventDispatcher *eventDispatcher();
|
||||
static void setEventDispatcher(QAbstractEventDispatcher *eventDispatcher /Transfer/);
|
||||
static bool isQuitLockEnabled();
|
||||
static void setQuitLockEnabled(bool enabled);
|
||||
void installNativeEventFilter(QAbstractNativeEventFilter *filterObj);
|
||||
void removeNativeEventFilter(QAbstractNativeEventFilter *filterObj);
|
||||
%If (Qt_5_3_0 -)
|
||||
static void setSetuidAllowed(bool allow);
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
static bool isSetuidAllowed();
|
||||
%End
|
||||
SIP_PYOBJECT __enter__();
|
||||
%MethodCode
|
||||
// Just return a reference to self.
|
||||
sipRes = sipSelf;
|
||||
Py_INCREF(sipRes);
|
||||
%End
|
||||
|
||||
void __exit__(SIP_PYOBJECT type, SIP_PYOBJECT value, SIP_PYOBJECT traceback);
|
||||
%MethodCode
|
||||
// Make sure the QCoreApplication is destroyed.
|
||||
delete sipCpp;
|
||||
%End
|
||||
};
|
||||
|
||||
void qAddPostRoutine(SIP_PYCALLABLE);
|
||||
%MethodCode
|
||||
// Add it to the list of post routines if it already exists.
|
||||
if (qtcore_PostRoutines != NULL)
|
||||
{
|
||||
// See if there is an empty slot.
|
||||
bool app = true;
|
||||
|
||||
for (Py_ssize_t i = 0; i < PyList_Size(qtcore_PostRoutines); ++i)
|
||||
if (PyList_GetItem(qtcore_PostRoutines, i) == Py_None)
|
||||
{
|
||||
Py_INCREF(a0);
|
||||
PyList_SetItem(qtcore_PostRoutines, i, a0);
|
||||
|
||||
app = false;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (app && PyList_Append(qtcore_PostRoutines, a0) < 0)
|
||||
sipIsErr = 1;
|
||||
}
|
||||
else if ((qtcore_PostRoutines = PyList_New(1)) != NULL)
|
||||
{
|
||||
Py_INCREF(a0);
|
||||
PyList_SetItem(qtcore_PostRoutines, 0, a0);
|
||||
|
||||
qAddPostRoutine(qtcore_CallPostRoutines);
|
||||
}
|
||||
else
|
||||
{
|
||||
sipIsErr = 1;
|
||||
}
|
||||
%End
|
||||
|
||||
void qRemovePostRoutine(SIP_PYCALLABLE);
|
||||
%MethodCode
|
||||
// Remove it from the list of post routines if it exists.
|
||||
if (qtcore_PostRoutines != NULL)
|
||||
for (Py_ssize_t i = 0; i < PyList_Size(qtcore_PostRoutines); ++i)
|
||||
if (PyList_GetItem(qtcore_PostRoutines, i) == a0)
|
||||
{
|
||||
Py_INCREF(Py_None);
|
||||
PyList_SetItem(qtcore_PostRoutines, i, Py_None);
|
||||
|
||||
break;
|
||||
}
|
||||
%End
|
||||
|
||||
%If (Qt_5_1_0 -)
|
||||
void qAddPreRoutine(SIP_PYCALLABLE routine /TypeHint="Callable[[], None]"/);
|
||||
%MethodCode
|
||||
// Add it to the list of pre routines if it already exists.
|
||||
if (qtcore_PreRoutines != NULL)
|
||||
{
|
||||
if (PyList_Append(qtcore_PreRoutines, a0) < 0)
|
||||
sipIsErr = 1;
|
||||
}
|
||||
else if ((qtcore_PreRoutines = PyList_New(1)) != NULL)
|
||||
{
|
||||
Py_INCREF(a0);
|
||||
PyList_SetItem(qtcore_PreRoutines, 0, a0);
|
||||
|
||||
qAddPreRoutine(qtcore_CallPreRoutines);
|
||||
}
|
||||
else
|
||||
{
|
||||
sipIsErr = 1;
|
||||
}
|
||||
%End
|
||||
|
||||
%End
|
||||
// Module code needed by qAddPreRoutine, qAddPostRoutine() and qRemovePostRoutine().
|
||||
%ModuleCode
|
||||
#if QT_VERSION >= 0x050100
|
||||
// The list of Python pre routines.
|
||||
static PyObject *qtcore_PreRoutines = NULL;
|
||||
|
||||
// Call all of the registered Python pre routines.
|
||||
static void qtcore_CallPreRoutines()
|
||||
{
|
||||
for (Py_ssize_t i = 0; i < PyList_Size(qtcore_PreRoutines); ++i)
|
||||
{
|
||||
PyObject *pr = PyList_GetItem(qtcore_PreRoutines, i);
|
||||
|
||||
if (pr != Py_None)
|
||||
{
|
||||
PyObject *res = PyObject_CallObject(pr, NULL);
|
||||
|
||||
Py_XDECREF(res);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// The list of Python post routines.
|
||||
static PyObject *qtcore_PostRoutines = NULL;
|
||||
|
||||
// Call all of the registered Python post routines.
|
||||
static void qtcore_CallPostRoutines()
|
||||
{
|
||||
for (Py_ssize_t i = 0; i < PyList_Size(qtcore_PostRoutines); ++i)
|
||||
{
|
||||
PyObject *pr = PyList_GetItem(qtcore_PostRoutines, i);
|
||||
|
||||
if (pr != Py_None)
|
||||
{
|
||||
PyObject *res = PyObject_CallObject(pr, NULL);
|
||||
|
||||
Py_XDECREF(res);
|
||||
}
|
||||
}
|
||||
}
|
||||
%End
|
||||
void pyqtRemoveInputHook();
|
||||
%MethodCode
|
||||
// Clear the Python input hook installed when the module was initialised.
|
||||
PyOS_InputHook = 0;
|
||||
%End
|
||||
|
||||
void pyqtRestoreInputHook();
|
||||
%MethodCode
|
||||
// Restore the input hook.
|
||||
PyOS_InputHook = qtcore_input_hook;
|
||||
%End
|
||||
|
||||
%ModuleCode
|
||||
#include <QCoreApplication>
|
||||
#include <QThread>
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
#include <conio.h>
|
||||
#include <QTimer>
|
||||
#else
|
||||
#include <QSocketNotifier>
|
||||
#endif
|
||||
|
||||
// This is the input hook that will process events while the interpreter is
|
||||
// waiting for interactive input.
|
||||
extern "C" {static int qtcore_input_hook();}
|
||||
|
||||
static int qtcore_input_hook()
|
||||
{
|
||||
QCoreApplication *app = QCoreApplication::instance();
|
||||
|
||||
if (app && app->thread() == QThread::currentThread())
|
||||
{
|
||||
#if defined(Q_OS_WIN)
|
||||
QTimer timer;
|
||||
QObject::connect(&timer, SIGNAL(timeout()), app, SLOT(quit()));
|
||||
|
||||
while (!_kbhit())
|
||||
{
|
||||
// The delay is based on feedback from users.
|
||||
timer.start(35);
|
||||
QCoreApplication::exec();
|
||||
timer.stop();
|
||||
}
|
||||
|
||||
QObject::disconnect(&timer, SIGNAL(timeout()), app, SLOT(quit()));
|
||||
#else
|
||||
QSocketNotifier notifier(0, QSocketNotifier::Read, 0);
|
||||
QObject::connect(¬ifier, SIGNAL(activated(int)), app, SLOT(quit()));
|
||||
QCoreApplication::exec();
|
||||
QObject::disconnect(¬ifier, SIGNAL(activated(int)), app, SLOT(quit()));
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
%End
|
||||
|
||||
%PostInitialisationCode
|
||||
// Process events from the input hook.
|
||||
PyOS_InputHook = qtcore_input_hook;
|
||||
%End
|
||||
|
||||
%ExportedTypeHintCode
|
||||
# Support for QDate, QDateTime and QTime.
|
||||
import datetime
|
||||
|
||||
# Convenient type aliases.
|
||||
PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal]
|
||||
PYQT_SLOT = typing.Union[typing.Callable[..., Any], QtCore.pyqtBoundSignal]
|
||||
%End
|
||||
|
||||
%TypeHintCode
|
||||
# Support for QDate, QDateTime and QTime.
|
||||
import datetime
|
||||
|
||||
# Support for Q_ENUM and Q_FLAG.
|
||||
import enum
|
||||
|
||||
|
||||
# Support for new-style signals and slots.
|
||||
class pyqtSignal:
|
||||
|
||||
signatures = ... # type: typing.Tuple[str, ...]
|
||||
|
||||
def __init__(self, *types: typing.Any, name: str = ...) -> None: ...
|
||||
|
||||
@typing.overload
|
||||
def __get__(self, instance: None, owner: typing.Type['QObject']) -> 'pyqtSignal': ...
|
||||
|
||||
@typing.overload
|
||||
def __get__(self, instance: 'QObject', owner: typing.Type['QObject']) -> 'pyqtBoundSignal': ...
|
||||
|
||||
|
||||
|
||||
class pyqtBoundSignal:
|
||||
|
||||
signal = ... # type: str
|
||||
|
||||
def __getitem__(self, key: object) -> 'pyqtBoundSignal': ...
|
||||
|
||||
def connect(self, slot: 'PYQT_SLOT') -> 'QMetaObject.Connection': ...
|
||||
|
||||
@typing.overload
|
||||
def disconnect(self) -> None: ...
|
||||
|
||||
@typing.overload
|
||||
def disconnect(self, slot: typing.Union['PYQT_SLOT', 'QMetaObject.Connection']) -> None: ...
|
||||
|
||||
def emit(self, *args: typing.Any) -> None: ...
|
||||
|
||||
|
||||
FuncT = typing.TypeVar('FuncT', bound=typing.Callable)
|
||||
def pyqtSlot(*types, name: typing.Optional[str] = ..., result: typing.Optional[str] = ...) -> typing.Callable[[FuncT], FuncT]: ...
|
||||
|
||||
|
||||
# For QObject.findChild() and QObject.findChildren().
|
||||
QObjectT = typing.TypeVar('QObjectT', bound=QObject)
|
||||
|
||||
|
||||
# Convenient type aliases.
|
||||
PYQT_SIGNAL = typing.Union[pyqtSignal, pyqtBoundSignal]
|
||||
PYQT_SLOT = typing.Union[typing.Callable[..., None], pyqtBoundSignal]
|
||||
%End
|
||||
274
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qcoreevent.sip
Normal file
274
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qcoreevent.sip
Normal file
@@ -0,0 +1,274 @@
|
||||
// qcoreevent.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QEvent /Supertype=sip.wrapper/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcoreevent.h>
|
||||
%End
|
||||
|
||||
%ConvertToSubClassCode
|
||||
switch (sipCpp->type())
|
||||
{
|
||||
case QEvent::Timer:
|
||||
sipType = sipType_QTimerEvent;
|
||||
break;
|
||||
|
||||
case QEvent::ChildAdded:
|
||||
case QEvent::ChildPolished:
|
||||
case QEvent::ChildRemoved:
|
||||
sipType = sipType_QChildEvent;
|
||||
break;
|
||||
|
||||
case QEvent::DynamicPropertyChange:
|
||||
sipType = sipType_QDynamicPropertyChangeEvent;
|
||||
break;
|
||||
|
||||
case QEvent::StateMachineSignal:
|
||||
sipType = sipType_QStateMachine_SignalEvent;
|
||||
break;
|
||||
|
||||
case QEvent::StateMachineWrapped:
|
||||
sipType = sipType_QStateMachine_WrappedEvent;
|
||||
break;
|
||||
|
||||
default:
|
||||
sipType = 0;
|
||||
}
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Type
|
||||
{
|
||||
None /PyName=None_/,
|
||||
Timer,
|
||||
MouseButtonPress,
|
||||
MouseButtonRelease,
|
||||
MouseButtonDblClick,
|
||||
MouseMove,
|
||||
KeyPress,
|
||||
KeyRelease,
|
||||
FocusIn,
|
||||
FocusOut,
|
||||
Enter,
|
||||
Leave,
|
||||
Paint,
|
||||
Move,
|
||||
Resize,
|
||||
Show,
|
||||
Hide,
|
||||
Close,
|
||||
ParentChange,
|
||||
ParentAboutToChange,
|
||||
ThreadChange,
|
||||
WindowActivate,
|
||||
WindowDeactivate,
|
||||
ShowToParent,
|
||||
HideToParent,
|
||||
Wheel,
|
||||
WindowTitleChange,
|
||||
WindowIconChange,
|
||||
ApplicationWindowIconChange,
|
||||
ApplicationFontChange,
|
||||
ApplicationLayoutDirectionChange,
|
||||
ApplicationPaletteChange,
|
||||
PaletteChange,
|
||||
Clipboard,
|
||||
MetaCall,
|
||||
SockAct,
|
||||
WinEventAct,
|
||||
DeferredDelete,
|
||||
DragEnter,
|
||||
DragMove,
|
||||
DragLeave,
|
||||
Drop,
|
||||
ChildAdded,
|
||||
ChildPolished,
|
||||
ChildRemoved,
|
||||
PolishRequest,
|
||||
Polish,
|
||||
LayoutRequest,
|
||||
UpdateRequest,
|
||||
UpdateLater,
|
||||
ContextMenu,
|
||||
InputMethod,
|
||||
TabletMove,
|
||||
LocaleChange,
|
||||
LanguageChange,
|
||||
LayoutDirectionChange,
|
||||
TabletPress,
|
||||
TabletRelease,
|
||||
OkRequest,
|
||||
IconDrag,
|
||||
FontChange,
|
||||
EnabledChange,
|
||||
ActivationChange,
|
||||
StyleChange,
|
||||
IconTextChange,
|
||||
ModifiedChange,
|
||||
MouseTrackingChange,
|
||||
WindowBlocked,
|
||||
WindowUnblocked,
|
||||
WindowStateChange,
|
||||
ToolTip,
|
||||
WhatsThis,
|
||||
StatusTip,
|
||||
ActionChanged,
|
||||
ActionAdded,
|
||||
ActionRemoved,
|
||||
FileOpen,
|
||||
Shortcut,
|
||||
ShortcutOverride,
|
||||
WhatsThisClicked,
|
||||
ToolBarChange,
|
||||
ApplicationActivate,
|
||||
ApplicationActivated,
|
||||
ApplicationDeactivate,
|
||||
ApplicationDeactivated,
|
||||
QueryWhatsThis,
|
||||
EnterWhatsThisMode,
|
||||
LeaveWhatsThisMode,
|
||||
ZOrderChange,
|
||||
HoverEnter,
|
||||
HoverLeave,
|
||||
HoverMove,
|
||||
GraphicsSceneMouseMove,
|
||||
GraphicsSceneMousePress,
|
||||
GraphicsSceneMouseRelease,
|
||||
GraphicsSceneMouseDoubleClick,
|
||||
GraphicsSceneContextMenu,
|
||||
GraphicsSceneHoverEnter,
|
||||
GraphicsSceneHoverMove,
|
||||
GraphicsSceneHoverLeave,
|
||||
GraphicsSceneHelp,
|
||||
GraphicsSceneDragEnter,
|
||||
GraphicsSceneDragMove,
|
||||
GraphicsSceneDragLeave,
|
||||
GraphicsSceneDrop,
|
||||
GraphicsSceneWheel,
|
||||
GraphicsSceneResize,
|
||||
GraphicsSceneMove,
|
||||
KeyboardLayoutChange,
|
||||
DynamicPropertyChange,
|
||||
TabletEnterProximity,
|
||||
TabletLeaveProximity,
|
||||
NonClientAreaMouseMove,
|
||||
NonClientAreaMouseButtonPress,
|
||||
NonClientAreaMouseButtonRelease,
|
||||
NonClientAreaMouseButtonDblClick,
|
||||
MacSizeChange,
|
||||
ContentsRectChange,
|
||||
CursorChange,
|
||||
ToolTipChange,
|
||||
GrabMouse,
|
||||
UngrabMouse,
|
||||
GrabKeyboard,
|
||||
UngrabKeyboard,
|
||||
StateMachineSignal,
|
||||
StateMachineWrapped,
|
||||
TouchBegin,
|
||||
TouchUpdate,
|
||||
TouchEnd,
|
||||
%If (Qt_5_2_0 -)
|
||||
NativeGesture,
|
||||
%End
|
||||
RequestSoftwareInputPanel,
|
||||
CloseSoftwareInputPanel,
|
||||
WinIdChange,
|
||||
Gesture,
|
||||
GestureOverride,
|
||||
FocusAboutToChange,
|
||||
ScrollPrepare,
|
||||
Scroll,
|
||||
Expose,
|
||||
InputMethodQuery,
|
||||
OrientationChange,
|
||||
TouchCancel,
|
||||
PlatformPanel,
|
||||
%If (Qt_5_1_0 -)
|
||||
ApplicationStateChange,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
ReadOnlyChange,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
PlatformSurface,
|
||||
%End
|
||||
%If (Qt_5_9_0 -)
|
||||
TabletTrackingChange,
|
||||
%End
|
||||
EnterEditFocus,
|
||||
LeaveEditFocus,
|
||||
User,
|
||||
MaxUser,
|
||||
};
|
||||
|
||||
explicit QEvent(QEvent::Type type);
|
||||
QEvent(const QEvent &other);
|
||||
virtual ~QEvent();
|
||||
QEvent::Type type() const;
|
||||
bool spontaneous() const;
|
||||
void setAccepted(bool accepted);
|
||||
bool isAccepted() const;
|
||||
void accept();
|
||||
void ignore();
|
||||
static int registerEventType(int hint = -1);
|
||||
};
|
||||
|
||||
class QTimerEvent : public QEvent
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcoreevent.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QTimerEvent(int timerId);
|
||||
virtual ~QTimerEvent();
|
||||
int timerId() const;
|
||||
};
|
||||
|
||||
class QChildEvent : public QEvent
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcoreevent.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QChildEvent(QEvent::Type type, QObject *child);
|
||||
virtual ~QChildEvent();
|
||||
QObject *child() const;
|
||||
bool added() const;
|
||||
bool polished() const;
|
||||
bool removed() const;
|
||||
};
|
||||
|
||||
class QDynamicPropertyChangeEvent : public QEvent
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcoreevent.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QDynamicPropertyChangeEvent(const QByteArray &name);
|
||||
virtual ~QDynamicPropertyChangeEvent();
|
||||
QByteArray propertyName() const;
|
||||
};
|
||||
@@ -0,0 +1,79 @@
|
||||
// qcryptographichash.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QCryptographicHash
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcryptographichash.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Algorithm
|
||||
{
|
||||
Md4,
|
||||
Md5,
|
||||
Sha1,
|
||||
Sha224,
|
||||
Sha256,
|
||||
Sha384,
|
||||
Sha512,
|
||||
%If (Qt_5_1_0 -)
|
||||
Sha3_224,
|
||||
%End
|
||||
%If (Qt_5_1_0 -)
|
||||
Sha3_256,
|
||||
%End
|
||||
%If (Qt_5_1_0 -)
|
||||
Sha3_384,
|
||||
%End
|
||||
%If (Qt_5_1_0 -)
|
||||
Sha3_512,
|
||||
%End
|
||||
%If (Qt_5_9_2 -)
|
||||
Keccak_224,
|
||||
%End
|
||||
%If (Qt_5_9_2 -)
|
||||
Keccak_256,
|
||||
%End
|
||||
%If (Qt_5_9_2 -)
|
||||
Keccak_384,
|
||||
%End
|
||||
%If (Qt_5_9_2 -)
|
||||
Keccak_512,
|
||||
%End
|
||||
};
|
||||
|
||||
explicit QCryptographicHash(QCryptographicHash::Algorithm method);
|
||||
~QCryptographicHash();
|
||||
void reset();
|
||||
void addData(const char *data /Array/, int length /ArraySize/);
|
||||
void addData(const QByteArray &data);
|
||||
bool addData(QIODevice *device);
|
||||
QByteArray result() const;
|
||||
static QByteArray hash(const QByteArray &data, QCryptographicHash::Algorithm method);
|
||||
%If (Qt_5_12_0 -)
|
||||
static int hashLength(QCryptographicHash::Algorithm method);
|
||||
%End
|
||||
|
||||
private:
|
||||
QCryptographicHash(const QCryptographicHash &);
|
||||
};
|
||||
475
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qdatastream.sip
Normal file
475
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qdatastream.sip
Normal file
@@ -0,0 +1,475 @@
|
||||
// qdatastream.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QDataStream
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qdatastream.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Version
|
||||
{
|
||||
Qt_1_0,
|
||||
Qt_2_0,
|
||||
Qt_2_1,
|
||||
Qt_3_0,
|
||||
Qt_3_1,
|
||||
Qt_3_3,
|
||||
Qt_4_0,
|
||||
Qt_4_1,
|
||||
Qt_4_2,
|
||||
Qt_4_3,
|
||||
Qt_4_4,
|
||||
Qt_4_5,
|
||||
Qt_4_6,
|
||||
Qt_4_7,
|
||||
Qt_4_8,
|
||||
Qt_4_9,
|
||||
Qt_5_0,
|
||||
%If (Qt_5_1_0 -)
|
||||
Qt_5_1,
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
Qt_5_2,
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
Qt_5_3,
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
Qt_5_4,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
Qt_5_5,
|
||||
%End
|
||||
%If (Qt_5_6_0 -)
|
||||
Qt_5_6,
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
Qt_5_7,
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
Qt_5_8,
|
||||
%End
|
||||
%If (Qt_5_9_0 -)
|
||||
Qt_5_9,
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
Qt_5_10,
|
||||
%End
|
||||
%If (Qt_5_11_0 -)
|
||||
Qt_5_11,
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
Qt_5_12,
|
||||
%End
|
||||
%If (Qt_5_13_0 -)
|
||||
Qt_5_13,
|
||||
%End
|
||||
%If (Qt_5_14_0 -)
|
||||
Qt_5_14,
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
Qt_5_15,
|
||||
%End
|
||||
};
|
||||
|
||||
enum ByteOrder
|
||||
{
|
||||
BigEndian,
|
||||
LittleEndian,
|
||||
};
|
||||
|
||||
enum Status
|
||||
{
|
||||
Ok,
|
||||
ReadPastEnd,
|
||||
ReadCorruptData,
|
||||
WriteFailed,
|
||||
};
|
||||
|
||||
QDataStream();
|
||||
explicit QDataStream(QIODevice *);
|
||||
QDataStream(QByteArray * /Constrained/, QIODevice::OpenMode flags);
|
||||
QDataStream(const QByteArray & /Constrained/);
|
||||
~QDataStream();
|
||||
QIODevice *device() const;
|
||||
void setDevice(QIODevice *);
|
||||
bool atEnd() const;
|
||||
QDataStream::Status status() const;
|
||||
void setStatus(QDataStream::Status status);
|
||||
void resetStatus();
|
||||
QDataStream::ByteOrder byteOrder() const;
|
||||
void setByteOrder(QDataStream::ByteOrder);
|
||||
int version() const;
|
||||
void setVersion(int v);
|
||||
int skipRawData(int len) /ReleaseGIL/;
|
||||
// Extra methods to give explicit control over the simple data types being read and written.
|
||||
int readInt() /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp >> sipRes;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
qint8 readInt8() /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp >> sipRes;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
quint8 readUInt8() /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp >> sipRes;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
qint16 readInt16() /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp >> sipRes;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
quint16 readUInt16() /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp >> sipRes;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
qint32 readInt32() /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp >> sipRes;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
quint32 readUInt32() /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp >> sipRes;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
qint64 readInt64() /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp >> sipRes;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
quint64 readUInt64() /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp >> sipRes;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
bool readBool() /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp >> sipRes;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
float readFloat() /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp >> sipRes;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
double readDouble() /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp >> sipRes;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
SIP_PYOBJECT readString() /ReleaseGIL,TypeHint="Py_v3:bytes;str"/;
|
||||
%MethodCode
|
||||
char *s;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp >> s;
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
if (s)
|
||||
{
|
||||
sipRes = SIPBytes_FromString(s);
|
||||
delete[] s;
|
||||
}
|
||||
else
|
||||
{
|
||||
sipRes = Py_None;
|
||||
Py_INCREF(Py_None);
|
||||
}
|
||||
%End
|
||||
|
||||
void writeInt(int i) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp << a0;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void writeInt8(qint8 i) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp << a0;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void writeUInt8(quint8 i) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp << a0;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void writeInt16(qint16 i) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp << a0;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void writeUInt16(quint16 i) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp << a0;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void writeInt32(qint32 i) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp << a0;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void writeUInt32(quint32 i) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp << a0;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void writeInt64(qint64 i) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp << a0;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void writeUInt64(quint64 i) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp << a0;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void writeBool(bool i) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp << a0;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void writeFloat(float f) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp << a0;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void writeDouble(double f) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp << a0;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void writeString(const char *str /Encoding="None"/) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp << a0;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
// Extra methods to support v2 of the QString and QVariant APIs.
|
||||
QString readQString() /ReleaseGIL/;
|
||||
%MethodCode
|
||||
sipRes = new QString;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp >> *sipRes;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void writeQString(const QString &qstr) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp << *a0;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
QStringList readQStringList() /ReleaseGIL/;
|
||||
%MethodCode
|
||||
sipRes = new QStringList;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp >> *sipRes;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void writeQStringList(const QStringList &qstrlst) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp << *a0;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
QVariant readQVariant() /ReleaseGIL/;
|
||||
%MethodCode
|
||||
sipRes = new QVariant;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp >> *sipRes;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void writeQVariant(const QVariant &qvar) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp << *a0;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
QVariantList readQVariantList() /ReleaseGIL/;
|
||||
%MethodCode
|
||||
sipRes = new QVariantList;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp >> *sipRes;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void writeQVariantList(const QVariantList &qvarlst) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp << *a0;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
QVariantMap readQVariantMap() /ReleaseGIL/;
|
||||
%MethodCode
|
||||
sipRes = new QVariantMap;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp >> *sipRes;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void writeQVariantMap(const QVariantMap &qvarmap) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp << *a0;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
QVariantHash readQVariantHash() /ReleaseGIL/;
|
||||
%MethodCode
|
||||
sipRes = new QVariantHash;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp >> *sipRes;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void writeQVariantHash(const QVariantHash &qvarhash) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
*sipCpp << *a0;
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
SIP_PYOBJECT readBytes() /TypeHint="Py_v3:bytes;str",ReleaseGIL/;
|
||||
%MethodCode
|
||||
char *s;
|
||||
uint l;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp->readBytes(s, l);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
if ((sipRes = SIPBytes_FromStringAndSize(s, l)) == NULL)
|
||||
sipIsErr = 1;
|
||||
|
||||
if (s)
|
||||
delete[] s;
|
||||
%End
|
||||
|
||||
SIP_PYOBJECT readRawData(int len) /TypeHint="Py_v3:bytes;str",ReleaseGIL/;
|
||||
%MethodCode
|
||||
char *s = new char[a0];
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp->readRawData(s, a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
sipRes = SIPBytes_FromStringAndSize(s, a0);
|
||||
|
||||
if (!sipRes)
|
||||
sipIsErr = 1;
|
||||
|
||||
delete[] s;
|
||||
%End
|
||||
|
||||
QDataStream &writeBytes(const char * /Array/, uint len /ArraySize/) /ReleaseGIL/;
|
||||
int writeRawData(const char * /Array/, int len /ArraySize/) /ReleaseGIL/;
|
||||
|
||||
enum FloatingPointPrecision
|
||||
{
|
||||
SinglePrecision,
|
||||
DoublePrecision,
|
||||
};
|
||||
|
||||
QDataStream::FloatingPointPrecision floatingPointPrecision() const;
|
||||
void setFloatingPointPrecision(QDataStream::FloatingPointPrecision precision);
|
||||
%If (Qt_5_7_0 -)
|
||||
void startTransaction();
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
bool commitTransaction();
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
void rollbackTransaction();
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
void abortTransaction();
|
||||
%End
|
||||
|
||||
private:
|
||||
QDataStream(const QDataStream &);
|
||||
};
|
||||
636
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qdatetime.sip
Normal file
636
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qdatetime.sip
Normal file
@@ -0,0 +1,636 @@
|
||||
// qdatetime.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QDate /TypeHintIn="Union[QDate, datetime.date]"/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qdatetime.h>
|
||||
%End
|
||||
|
||||
%TypeCode
|
||||
#include <QHash>
|
||||
%End
|
||||
|
||||
%ConvertToTypeCode
|
||||
// Allow a Python date object whenever a QDate is expected.
|
||||
|
||||
if (sipIsErr == NULL)
|
||||
return (sipGetDate(sipPy, 0) ||
|
||||
sipCanConvertToType(sipPy, sipType_QDate, SIP_NO_CONVERTORS));
|
||||
|
||||
sipDateDef py_date;
|
||||
|
||||
if (sipGetDate(sipPy, &py_date))
|
||||
{
|
||||
*sipCppPtr = new QDate(py_date.pd_year,
|
||||
py_date.pd_month,
|
||||
py_date.pd_day);
|
||||
|
||||
return sipGetState(sipTransferObj);
|
||||
}
|
||||
|
||||
*sipCppPtr = reinterpret_cast<QDate *>(sipConvertToType(sipPy, sipType_QDate, sipTransferObj, SIP_NO_CONVERTORS, 0, sipIsErr));
|
||||
|
||||
return 0;
|
||||
%End
|
||||
|
||||
%PickleCode
|
||||
sipRes = Py_BuildValue((char *)"iii", sipCpp->year(), sipCpp->month(), sipCpp->day());
|
||||
%End
|
||||
|
||||
public:
|
||||
QDate();
|
||||
QDate(int y, int m, int d);
|
||||
%If (Qt_5_14_0 -)
|
||||
QDate(int y, int m, int d, QCalendar cal);
|
||||
%End
|
||||
SIP_PYOBJECT __repr__() const /TypeHint="str"/;
|
||||
%MethodCode
|
||||
if (sipCpp->isNull())
|
||||
{
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
sipRes = PyUnicode_FromString("PyQt5.QtCore.QDate()");
|
||||
#else
|
||||
sipRes = PyString_FromString("PyQt5.QtCore.QDate()");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
sipRes =
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
PyUnicode_FromFormat
|
||||
#else
|
||||
PyString_FromFormat
|
||||
#endif
|
||||
("PyQt5.QtCore.QDate(%i, %i, %i)", sipCpp->year(),
|
||||
sipCpp->month(), sipCpp->day());
|
||||
}
|
||||
%End
|
||||
|
||||
long __hash__() const;
|
||||
%MethodCode
|
||||
sipRes = qHash(sipCpp->toString(Qt::ISODate));
|
||||
%End
|
||||
|
||||
SIP_PYOBJECT toPyDate() const /TypeHint="datetime.date"/;
|
||||
%MethodCode
|
||||
// Convert to a Python date object.
|
||||
sipDateDef py_date;
|
||||
|
||||
py_date.pd_year = sipCpp->year();
|
||||
py_date.pd_month = sipCpp->month();
|
||||
py_date.pd_day = sipCpp->day();
|
||||
|
||||
sipRes = sipFromDate(&py_date);
|
||||
%End
|
||||
|
||||
bool isNull() const;
|
||||
int __bool__() const;
|
||||
%MethodCode
|
||||
sipRes = !sipCpp->isNull();
|
||||
%End
|
||||
|
||||
bool isValid() const;
|
||||
int year() const;
|
||||
%If (Qt_5_14_0 -)
|
||||
int year(QCalendar cal) const;
|
||||
%End
|
||||
int month() const;
|
||||
%If (Qt_5_14_0 -)
|
||||
int month(QCalendar cal) const;
|
||||
%End
|
||||
int day() const;
|
||||
%If (Qt_5_14_0 -)
|
||||
int day(QCalendar cal) const;
|
||||
%End
|
||||
int dayOfWeek() const;
|
||||
%If (Qt_5_14_0 -)
|
||||
int dayOfWeek(QCalendar cal) const;
|
||||
%End
|
||||
int dayOfYear() const;
|
||||
%If (Qt_5_14_0 -)
|
||||
int dayOfYear(QCalendar cal) const;
|
||||
%End
|
||||
int daysInMonth() const;
|
||||
%If (Qt_5_14_0 -)
|
||||
int daysInMonth(QCalendar cal) const;
|
||||
%End
|
||||
int daysInYear() const;
|
||||
%If (Qt_5_14_0 -)
|
||||
int daysInYear(QCalendar cal) const;
|
||||
%End
|
||||
int weekNumber(int *yearNumber = 0) const;
|
||||
static QString shortMonthName(int month, QDate::MonthNameType type = QDate::DateFormat);
|
||||
static QString shortDayName(int weekday, QDate::MonthNameType type = QDate::DateFormat);
|
||||
static QString longMonthName(int month, QDate::MonthNameType type = QDate::DateFormat);
|
||||
static QString longDayName(int weekday, QDate::MonthNameType type = QDate::DateFormat);
|
||||
QString toString(Qt::DateFormat format = Qt::TextDate) const;
|
||||
%If (Qt_5_14_0 -)
|
||||
QString toString(Qt::DateFormat f, QCalendar cal) const;
|
||||
%End
|
||||
QString toString(const QString &format) const;
|
||||
%If (Qt_5_14_0 -)
|
||||
QString toString(const QString &format, QCalendar cal) const;
|
||||
%End
|
||||
QDate addDays(qint64 days) const;
|
||||
QDate addMonths(int months) const;
|
||||
%If (Qt_5_14_0 -)
|
||||
QDate addMonths(int months, QCalendar cal) const;
|
||||
%End
|
||||
QDate addYears(int years) const;
|
||||
%If (Qt_5_14_0 -)
|
||||
QDate addYears(int years, QCalendar cal) const;
|
||||
%End
|
||||
qint64 daysTo(const QDate &) const;
|
||||
bool operator==(const QDate &other) const;
|
||||
bool operator!=(const QDate &other) const;
|
||||
bool operator<(const QDate &other) const;
|
||||
bool operator<=(const QDate &other) const;
|
||||
bool operator>(const QDate &other) const;
|
||||
bool operator>=(const QDate &other) const;
|
||||
static QDate currentDate();
|
||||
static QDate fromString(const QString &string, Qt::DateFormat format = Qt::TextDate);
|
||||
static QDate fromString(const QString &s, const QString &format);
|
||||
%If (Qt_5_14_0 -)
|
||||
static QDate fromString(const QString &s, const QString &format, QCalendar cal);
|
||||
%End
|
||||
static bool isValid(int y, int m, int d);
|
||||
static bool isLeapYear(int year);
|
||||
static QDate fromJulianDay(qint64 jd);
|
||||
qint64 toJulianDay() const;
|
||||
bool setDate(int year, int month, int date);
|
||||
%If (- Qt_5_7_0)
|
||||
%If (Qt_5_15_0 -)
|
||||
void getDate(int *year, int *month, int *day);
|
||||
%End
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
void getDate(int *year, int *month, int *day) const;
|
||||
%End
|
||||
|
||||
enum MonthNameType
|
||||
{
|
||||
DateFormat,
|
||||
StandaloneFormat,
|
||||
};
|
||||
|
||||
%If (Qt_5_14_0 -)
|
||||
QDateTime startOfDay(Qt::TimeSpec spec = Qt::LocalTime, int offsetSeconds = 0) const;
|
||||
%End
|
||||
%If (Qt_5_14_0 -)
|
||||
QDateTime endOfDay(Qt::TimeSpec spec = Qt::LocalTime, int offsetSeconds = 0) const;
|
||||
%End
|
||||
%If (Qt_5_14_0 -)
|
||||
QDateTime startOfDay(const QTimeZone &zone) const;
|
||||
%End
|
||||
%If (Qt_5_14_0 -)
|
||||
QDateTime endOfDay(const QTimeZone &zone) const;
|
||||
%End
|
||||
%If (Qt_5_14_0 -)
|
||||
bool setDate(int year, int month, int day, QCalendar cal);
|
||||
%End
|
||||
};
|
||||
|
||||
class QTime /TypeHintIn="Union[QTime, datetime.time]"/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qdatetime.h>
|
||||
%End
|
||||
|
||||
%TypeCode
|
||||
#include <QHash>
|
||||
%End
|
||||
|
||||
%ConvertToTypeCode
|
||||
// Allow a Python time object whenever a QTime is expected.
|
||||
|
||||
if (sipIsErr == NULL)
|
||||
return (sipGetTime(sipPy, 0) ||
|
||||
sipCanConvertToType(sipPy, sipType_QTime, SIP_NO_CONVERTORS));
|
||||
|
||||
sipTimeDef py_time;
|
||||
|
||||
if (sipGetTime(sipPy, &py_time))
|
||||
{
|
||||
*sipCppPtr = new QTime(py_time.pt_hour,
|
||||
py_time.pt_minute,
|
||||
py_time.pt_second,
|
||||
py_time.pt_microsecond / 1000);
|
||||
|
||||
return sipGetState(sipTransferObj);
|
||||
}
|
||||
|
||||
*sipCppPtr = reinterpret_cast<QTime *>(sipConvertToType(sipPy, sipType_QTime, sipTransferObj, SIP_NO_CONVERTORS, 0, sipIsErr));
|
||||
|
||||
return 0;
|
||||
%End
|
||||
|
||||
%PickleCode
|
||||
sipRes = Py_BuildValue((char *)"iiii", sipCpp->hour(), sipCpp->minute(), sipCpp->second(), sipCpp->msec());
|
||||
%End
|
||||
|
||||
public:
|
||||
QTime();
|
||||
QTime(int h, int m, int second = 0, int msec = 0);
|
||||
SIP_PYOBJECT __repr__() const /TypeHint="str"/;
|
||||
%MethodCode
|
||||
if (sipCpp->isNull())
|
||||
{
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
sipRes = PyUnicode_FromString("PyQt5.QtCore.QTime()");
|
||||
#else
|
||||
sipRes = PyString_FromString("PyQt5.QtCore.QTime()");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
sipRes = PyUnicode_FromFormat("PyQt5.QtCore.QTime(%i, %i", sipCpp->hour(),
|
||||
sipCpp->minute());
|
||||
|
||||
if (sipCpp->second() || sipCpp->msec())
|
||||
{
|
||||
qpycore_Unicode_ConcatAndDel(&sipRes,
|
||||
PyUnicode_FromFormat(", %i", sipCpp->second()));
|
||||
|
||||
if (sipCpp->msec())
|
||||
qpycore_Unicode_ConcatAndDel(&sipRes,
|
||||
PyUnicode_FromFormat(", %i", sipCpp->msec()));
|
||||
}
|
||||
|
||||
qpycore_Unicode_ConcatAndDel(&sipRes, PyUnicode_FromString(")"));
|
||||
#else
|
||||
sipRes = PyString_FromFormat("PyQt5.QtCore.QTime(%i, %i", sipCpp->hour(),
|
||||
sipCpp->minute());
|
||||
|
||||
if (sipCpp->second() || sipCpp->msec())
|
||||
{
|
||||
PyString_ConcatAndDel(&sipRes,
|
||||
PyString_FromFormat(", %i", sipCpp->second()));
|
||||
|
||||
if (sipCpp->msec())
|
||||
PyString_ConcatAndDel(&sipRes,
|
||||
PyString_FromFormat(", %i", sipCpp->msec()));
|
||||
}
|
||||
|
||||
PyString_ConcatAndDel(&sipRes, PyString_FromString(")"));
|
||||
#endif
|
||||
}
|
||||
%End
|
||||
|
||||
long __hash__() const;
|
||||
%MethodCode
|
||||
sipRes = qHash(sipCpp->toString(Qt::ISODate));
|
||||
%End
|
||||
|
||||
SIP_PYOBJECT toPyTime() const /TypeHint="datetime.time"/;
|
||||
%MethodCode
|
||||
// Convert to a Python time object.
|
||||
sipTimeDef py_time;
|
||||
|
||||
py_time.pt_hour = sipCpp->hour();
|
||||
py_time.pt_minute = sipCpp->minute();
|
||||
py_time.pt_second = sipCpp->second();
|
||||
py_time.pt_microsecond = sipCpp->msec() * 1000;
|
||||
|
||||
sipRes = sipFromTime(&py_time);
|
||||
%End
|
||||
|
||||
bool isNull() const;
|
||||
int __bool__() const;
|
||||
%MethodCode
|
||||
sipRes = !sipCpp->isNull();
|
||||
%End
|
||||
|
||||
bool isValid() const;
|
||||
int hour() const;
|
||||
int minute() const;
|
||||
int second() const;
|
||||
int msec() const;
|
||||
QString toString(Qt::DateFormat format = Qt::TextDate) const;
|
||||
QString toString(const QString &format) const;
|
||||
bool setHMS(int h, int m, int s, int msec = 0);
|
||||
QTime addSecs(int secs) const;
|
||||
int secsTo(const QTime &) const;
|
||||
QTime addMSecs(int ms) const;
|
||||
int msecsTo(const QTime &) const;
|
||||
bool operator==(const QTime &other) const;
|
||||
bool operator!=(const QTime &other) const;
|
||||
bool operator<(const QTime &other) const;
|
||||
bool operator<=(const QTime &other) const;
|
||||
bool operator>(const QTime &other) const;
|
||||
bool operator>=(const QTime &other) const;
|
||||
static QTime currentTime();
|
||||
static QTime fromString(const QString &string, Qt::DateFormat format = Qt::TextDate);
|
||||
static QTime fromString(const QString &s, const QString &format);
|
||||
static bool isValid(int h, int m, int s, int msec = 0);
|
||||
void start();
|
||||
int restart();
|
||||
int elapsed() const;
|
||||
%If (Qt_5_2_0 -)
|
||||
static QTime fromMSecsSinceStartOfDay(int msecs);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
int msecsSinceStartOfDay() const;
|
||||
%End
|
||||
};
|
||||
|
||||
class QDateTime /TypeHintIn="Union[QDateTime, datetime.datetime]"/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qdatetime.h>
|
||||
%End
|
||||
|
||||
%TypeCode
|
||||
#include <QHash>
|
||||
%End
|
||||
|
||||
%ConvertToTypeCode
|
||||
// Allow a Python datetime object whenever a QDateTime is expected.
|
||||
|
||||
if (sipIsErr == NULL)
|
||||
return (sipGetDateTime(sipPy, 0, 0) ||
|
||||
sipCanConvertToType(sipPy, sipType_QDateTime, SIP_NO_CONVERTORS));
|
||||
|
||||
sipDateDef py_date;
|
||||
sipTimeDef py_time;
|
||||
|
||||
if (sipGetDateTime(sipPy, &py_date, &py_time))
|
||||
{
|
||||
QDate qdate(py_date.pd_year,
|
||||
py_date.pd_month,
|
||||
py_date.pd_day);
|
||||
|
||||
QTime qtime(py_time.pt_hour,
|
||||
py_time.pt_minute,
|
||||
py_time.pt_second,
|
||||
py_time.pt_microsecond / 1000);
|
||||
|
||||
QDateTime *qdt = new QDateTime(qdate, qtime);
|
||||
|
||||
*sipCppPtr = qdt;
|
||||
|
||||
return sipGetState(sipTransferObj);
|
||||
}
|
||||
|
||||
*sipCppPtr = reinterpret_cast<QDateTime *>(sipConvertToType(sipPy, sipType_QDateTime, sipTransferObj, SIP_NO_CONVERTORS, 0, sipIsErr));
|
||||
|
||||
return 0;
|
||||
%End
|
||||
|
||||
%PickleCode
|
||||
QDate qd = sipCpp->date();
|
||||
QTime qt = sipCpp->time();
|
||||
|
||||
sipRes = Py_BuildValue((char *)"iiiiiiii", qd.year(), qd.month(), qd.day(),
|
||||
qt.hour(), qt.minute(), qt.second(), qt.msec(),
|
||||
(int)sipCpp->timeSpec());
|
||||
%End
|
||||
|
||||
public:
|
||||
QDateTime();
|
||||
QDateTime(const QDateTime &other);
|
||||
explicit QDateTime(const QDate &);
|
||||
QDateTime(const QDate &date, const QTime &time, Qt::TimeSpec timeSpec = Qt::LocalTime);
|
||||
QDateTime(int year, int month, int day, int hour, int minute, int second = 0, int msec = 0, int timeSpec = 0) /NoDerived/;
|
||||
%MethodCode
|
||||
// This ctor is mainly supplied to allow pickling.
|
||||
QDate qd(a0, a1, a2);
|
||||
QTime qt(a3, a4, a5, a6);
|
||||
|
||||
sipCpp = new QDateTime(qd, qt, (Qt::TimeSpec)a7);
|
||||
%End
|
||||
|
||||
~QDateTime();
|
||||
SIP_PYOBJECT __repr__() const /TypeHint="str"/;
|
||||
%MethodCode
|
||||
if (sipCpp->isNull())
|
||||
{
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
sipRes = PyUnicode_FromString("PyQt5.QtCore.QDateTime()");
|
||||
#else
|
||||
sipRes = PyString_FromString("PyQt5.QtCore.QDateTime()");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
QDate qd = sipCpp->date();
|
||||
QTime qt = sipCpp->time();
|
||||
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
sipRes = PyUnicode_FromFormat("PyQt5.QtCore.QDateTime(%i, %i, %i, %i, %i",
|
||||
qd.year(), qd.month(), qd.day(), qt.hour(), qt.minute());
|
||||
|
||||
if (qt.second() || qt.msec() || sipCpp->timeSpec() != Qt::LocalTime)
|
||||
{
|
||||
qpycore_Unicode_ConcatAndDel(&sipRes,
|
||||
PyUnicode_FromFormat(", %i", qt.second()));
|
||||
|
||||
if (qt.msec() || sipCpp->timeSpec() != Qt::LocalTime)
|
||||
{
|
||||
qpycore_Unicode_ConcatAndDel(&sipRes,
|
||||
PyUnicode_FromFormat(", %i", qt.msec()));
|
||||
|
||||
if (sipCpp->timeSpec() != Qt::LocalTime)
|
||||
qpycore_Unicode_ConcatAndDel(&sipRes,
|
||||
PyUnicode_FromFormat(", PyQt5.QtCore.Qt.TimeSpec(%i)",
|
||||
(int)sipCpp->timeSpec()));
|
||||
}
|
||||
}
|
||||
|
||||
qpycore_Unicode_ConcatAndDel(&sipRes, PyUnicode_FromString(")"));
|
||||
#else
|
||||
sipRes = PyString_FromFormat("PyQt5.QtCore.QDateTime(%i, %i, %i, %i, %i",
|
||||
qd.year(), qd.month(), qd.day(), qt.hour(), qt.minute());
|
||||
|
||||
if (qt.second() || qt.msec() || sipCpp->timeSpec() != Qt::LocalTime)
|
||||
{
|
||||
PyString_ConcatAndDel(&sipRes,
|
||||
PyString_FromFormat(", %i", qt.second()));
|
||||
|
||||
if (qt.msec() || sipCpp->timeSpec() != Qt::LocalTime)
|
||||
{
|
||||
PyString_ConcatAndDel(&sipRes,
|
||||
PyString_FromFormat(", %i", qt.msec()));
|
||||
|
||||
if (sipCpp->timeSpec() != Qt::LocalTime)
|
||||
PyString_ConcatAndDel(&sipRes,
|
||||
PyString_FromFormat(", PyQt5.QtCore.Qt.TimeSpec(%i)",
|
||||
(int)sipCpp->timeSpec()));
|
||||
}
|
||||
}
|
||||
|
||||
PyString_ConcatAndDel(&sipRes, PyString_FromString(")"));
|
||||
#endif
|
||||
}
|
||||
%End
|
||||
|
||||
long __hash__() const;
|
||||
%MethodCode
|
||||
sipRes = qHash(sipCpp->toString(Qt::ISODate));
|
||||
%End
|
||||
|
||||
SIP_PYOBJECT toPyDateTime() const /TypeHint="datetime.datetime"/;
|
||||
%MethodCode
|
||||
// Convert to a Python datetime object.
|
||||
sipDateDef py_date;
|
||||
QDate qd = sipCpp->date();
|
||||
|
||||
py_date.pd_year = qd.year();
|
||||
py_date.pd_month = qd.month();
|
||||
py_date.pd_day = qd.day();
|
||||
|
||||
sipTimeDef py_time;
|
||||
QTime qt = sipCpp->time();
|
||||
|
||||
py_time.pt_hour = qt.hour();
|
||||
py_time.pt_minute = qt.minute();
|
||||
py_time.pt_second = qt.second();
|
||||
py_time.pt_microsecond = qt.msec() * 1000;
|
||||
|
||||
sipRes = sipFromDateTime(&py_date, &py_time);
|
||||
%End
|
||||
|
||||
bool isNull() const;
|
||||
int __bool__() const;
|
||||
%MethodCode
|
||||
sipRes = !sipCpp->isNull();
|
||||
%End
|
||||
|
||||
bool isValid() const;
|
||||
QDate date() const;
|
||||
QTime time() const;
|
||||
Qt::TimeSpec timeSpec() const;
|
||||
uint toTime_t() const;
|
||||
void setDate(const QDate &date);
|
||||
void setTime(const QTime &time);
|
||||
void setTimeSpec(Qt::TimeSpec spec);
|
||||
void setTime_t(uint secsSince1Jan1970UTC);
|
||||
QString toString(Qt::DateFormat format = Qt::TextDate) const;
|
||||
QString toString(const QString &format) const;
|
||||
QDateTime addDays(qint64 days) const;
|
||||
QDateTime addMonths(int months) const;
|
||||
QDateTime addYears(int years) const;
|
||||
QDateTime addSecs(qint64 secs) const;
|
||||
QDateTime addMSecs(qint64 msecs) const;
|
||||
QDateTime toTimeSpec(Qt::TimeSpec spec) const;
|
||||
QDateTime toLocalTime() const;
|
||||
QDateTime toUTC() const;
|
||||
qint64 daysTo(const QDateTime &) const;
|
||||
qint64 secsTo(const QDateTime &) const;
|
||||
bool operator==(const QDateTime &other) const;
|
||||
bool operator!=(const QDateTime &other) const;
|
||||
bool operator<(const QDateTime &other) const;
|
||||
bool operator<=(const QDateTime &other) const;
|
||||
bool operator>(const QDateTime &other) const;
|
||||
bool operator>=(const QDateTime &other) const;
|
||||
static QDateTime currentDateTime();
|
||||
static QDateTime fromString(const QString &string, Qt::DateFormat format = Qt::TextDate);
|
||||
static QDateTime fromString(const QString &s, const QString &format);
|
||||
static QDateTime fromTime_t(uint secsSince1Jan1970UTC);
|
||||
qint64 toMSecsSinceEpoch() const;
|
||||
void setMSecsSinceEpoch(qint64 msecs);
|
||||
qint64 msecsTo(const QDateTime &) const;
|
||||
static QDateTime currentDateTimeUtc();
|
||||
static QDateTime fromMSecsSinceEpoch(qint64 msecs);
|
||||
static qint64 currentMSecsSinceEpoch();
|
||||
void swap(QDateTime &other /Constrained/);
|
||||
%If (Qt_5_2_0 -)
|
||||
QDateTime(const QDate &date, const QTime &time, Qt::TimeSpec spec, int offsetSeconds);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
QDateTime(const QDate &date, const QTime &time, const QTimeZone &timeZone);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
int offsetFromUtc() const;
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
QTimeZone timeZone() const;
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
QString timeZoneAbbreviation() const;
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
bool isDaylightTime() const;
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
void setOffsetFromUtc(int offsetSeconds);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
void setTimeZone(const QTimeZone &toZone);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
QDateTime toOffsetFromUtc(int offsetSeconds) const;
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
QDateTime toTimeZone(const QTimeZone &toZone) const;
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
static QDateTime fromTime_t(uint secsSince1Jan1970UTC, Qt::TimeSpec spec, int offsetSeconds = 0);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
static QDateTime fromTime_t(uint secsSince1Jan1970UTC, const QTimeZone &timeZone);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
static QDateTime fromMSecsSinceEpoch(qint64 msecs, Qt::TimeSpec spec, int offsetSeconds = 0);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
static QDateTime fromMSecsSinceEpoch(qint64 msecs, const QTimeZone &timeZone);
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
qint64 toSecsSinceEpoch() const;
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
void setSecsSinceEpoch(qint64 secs);
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
static QDateTime fromSecsSinceEpoch(qint64 secs, Qt::TimeSpec spec = Qt::LocalTime, int offsetSeconds = 0);
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
static QDateTime fromSecsSinceEpoch(qint64 secs, const QTimeZone &timeZone);
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
static qint64 currentSecsSinceEpoch();
|
||||
%End
|
||||
%If (Qt_5_14_0 -)
|
||||
static QDateTime fromString(const QString &s, const QString &format, QCalendar cal);
|
||||
%End
|
||||
%If (Qt_5_14_0 -)
|
||||
|
||||
enum class YearRange
|
||||
{
|
||||
First,
|
||||
Last,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
QString toString(const QString &format, QCalendar cal) const;
|
||||
%End
|
||||
};
|
||||
|
||||
QDataStream &operator<<(QDataStream &, const QDate & /Constrained/) /ReleaseGIL/;
|
||||
QDataStream &operator>>(QDataStream &, QDate & /Constrained/) /ReleaseGIL/;
|
||||
QDataStream &operator<<(QDataStream &, const QTime & /Constrained/) /ReleaseGIL/;
|
||||
QDataStream &operator>>(QDataStream &, QTime & /Constrained/) /ReleaseGIL/;
|
||||
QDataStream &operator<<(QDataStream &, const QDateTime & /Constrained/) /ReleaseGIL/;
|
||||
QDataStream &operator>>(QDataStream &, QDateTime & /Constrained/) /ReleaseGIL/;
|
||||
@@ -0,0 +1,89 @@
|
||||
// qdeadlinetimer.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_8_0 -)
|
||||
|
||||
class QDeadlineTimer
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qdeadlinetimer.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum ForeverConstant
|
||||
{
|
||||
Forever,
|
||||
};
|
||||
|
||||
QDeadlineTimer(Qt::TimerType type /Constrained/ = Qt::CoarseTimer);
|
||||
QDeadlineTimer(QDeadlineTimer::ForeverConstant /Constrained/, Qt::TimerType type /Constrained/ = Qt::CoarseTimer);
|
||||
QDeadlineTimer(qint64 msecs, Qt::TimerType type /Constrained/ = Qt::CoarseTimer);
|
||||
void swap(QDeadlineTimer &other /Constrained/);
|
||||
bool isForever() const;
|
||||
bool hasExpired() const;
|
||||
Qt::TimerType timerType() const;
|
||||
void setTimerType(Qt::TimerType type);
|
||||
qint64 remainingTime() const;
|
||||
qint64 remainingTimeNSecs() const;
|
||||
void setRemainingTime(qint64 msecs, Qt::TimerType type = Qt::CoarseTimer);
|
||||
void setPreciseRemainingTime(qint64 secs, qint64 nsecs = 0, Qt::TimerType type = Qt::CoarseTimer);
|
||||
qint64 deadline() const;
|
||||
qint64 deadlineNSecs() const;
|
||||
void setDeadline(qint64 msecs, Qt::TimerType type = Qt::CoarseTimer);
|
||||
void setPreciseDeadline(qint64 secs, qint64 nsecs = 0, Qt::TimerType type = Qt::CoarseTimer);
|
||||
static QDeadlineTimer addNSecs(QDeadlineTimer dt, qint64 nsecs);
|
||||
static QDeadlineTimer current(Qt::TimerType type = Qt::CoarseTimer);
|
||||
QDeadlineTimer &operator+=(qint64 msecs);
|
||||
QDeadlineTimer &operator-=(qint64 msecs);
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
bool operator==(QDeadlineTimer d1, QDeadlineTimer d2);
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
bool operator!=(QDeadlineTimer d1, QDeadlineTimer d2);
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
bool operator<(QDeadlineTimer d1, QDeadlineTimer d2);
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
bool operator<=(QDeadlineTimer d1, QDeadlineTimer d2);
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
bool operator>(QDeadlineTimer d1, QDeadlineTimer d2);
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
bool operator>=(QDeadlineTimer d1, QDeadlineTimer d2);
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
QDeadlineTimer operator+(QDeadlineTimer dt, qint64 msecs);
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
QDeadlineTimer operator+(qint64 msecs, QDeadlineTimer dt);
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
QDeadlineTimer operator-(QDeadlineTimer dt, qint64 msecs);
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
qint64 operator-(QDeadlineTimer dt1, QDeadlineTimer dt2);
|
||||
%End
|
||||
182
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qdir.sip
Normal file
182
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qdir.sip
Normal file
@@ -0,0 +1,182 @@
|
||||
// qdir.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QDir
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qdir.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Filter
|
||||
{
|
||||
Dirs,
|
||||
Files,
|
||||
Drives,
|
||||
NoSymLinks,
|
||||
AllEntries,
|
||||
TypeMask,
|
||||
Readable,
|
||||
Writable,
|
||||
Executable,
|
||||
PermissionMask,
|
||||
Modified,
|
||||
Hidden,
|
||||
System,
|
||||
AccessMask,
|
||||
AllDirs,
|
||||
CaseSensitive,
|
||||
NoDotAndDotDot,
|
||||
NoFilter,
|
||||
NoDot,
|
||||
NoDotDot,
|
||||
};
|
||||
|
||||
typedef QFlags<QDir::Filter> Filters;
|
||||
|
||||
enum SortFlag
|
||||
{
|
||||
Name,
|
||||
Time,
|
||||
Size,
|
||||
Unsorted,
|
||||
SortByMask,
|
||||
DirsFirst,
|
||||
Reversed,
|
||||
IgnoreCase,
|
||||
DirsLast,
|
||||
LocaleAware,
|
||||
Type,
|
||||
NoSort,
|
||||
};
|
||||
|
||||
typedef QFlags<QDir::SortFlag> SortFlags;
|
||||
QDir(const QDir &);
|
||||
QDir(const QString &path = QString());
|
||||
QDir(const QString &path, const QString &nameFilter, QFlags<QDir::SortFlag> sort /TypeHintValue="QDir.Name|QDir.IgnoreCase"/ = QDir::SortFlags(QDir::Name|QDir::IgnoreCase), QFlags<QDir::Filter> filters = AllEntries);
|
||||
~QDir();
|
||||
void setPath(const QString &path);
|
||||
QString path() const;
|
||||
QString absolutePath() const;
|
||||
QString canonicalPath() const;
|
||||
QString dirName() const;
|
||||
QString filePath(const QString &fileName) const;
|
||||
QString absoluteFilePath(const QString &fileName) const;
|
||||
QString relativeFilePath(const QString &fileName) const;
|
||||
bool cd(const QString &dirName);
|
||||
bool cdUp();
|
||||
QStringList nameFilters() const;
|
||||
void setNameFilters(const QStringList &nameFilters);
|
||||
QDir::Filters filter() const;
|
||||
void setFilter(QDir::Filters filter);
|
||||
QDir::SortFlags sorting() const;
|
||||
void setSorting(QDir::SortFlags sort);
|
||||
uint count() const /__len__/;
|
||||
QString operator[](int) const;
|
||||
%MethodCode
|
||||
Py_ssize_t idx = sipConvertFromSequenceIndex(a0, sipCpp->count());
|
||||
|
||||
if (idx < 0)
|
||||
sipIsErr = 1;
|
||||
else
|
||||
sipRes = new QString(sipCpp->operator[]((int)idx));
|
||||
%End
|
||||
|
||||
QStringList operator[](SIP_PYSLICE) const;
|
||||
%MethodCode
|
||||
Py_ssize_t start, stop, step, slicelength;
|
||||
|
||||
if (sipConvertFromSliceObject(a0, sipCpp->count(), &start, &stop, &step, &slicelength) < 0)
|
||||
{
|
||||
sipIsErr = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
sipRes = new QStringList();
|
||||
|
||||
for (Py_ssize_t i = 0; i < slicelength; ++i)
|
||||
{
|
||||
(*sipRes) += (*sipCpp)[start];
|
||||
start += step;
|
||||
}
|
||||
}
|
||||
%End
|
||||
|
||||
int __contains__(const QString &) const;
|
||||
%MethodCode
|
||||
sipRes = bool(sipCpp->entryList().contains(*a0));
|
||||
%End
|
||||
|
||||
static QStringList nameFiltersFromString(const QString &nameFilter);
|
||||
QStringList entryList(QDir::Filters filters = QDir::NoFilter, QDir::SortFlags sort = QDir::SortFlag::NoSort) const;
|
||||
QStringList entryList(const QStringList &nameFilters, QDir::Filters filters = QDir::NoFilter, QDir::SortFlags sort = QDir::SortFlag::NoSort) const;
|
||||
QFileInfoList entryInfoList(QDir::Filters filters = QDir::NoFilter, QDir::SortFlags sort = QDir::SortFlag::NoSort) const;
|
||||
QFileInfoList entryInfoList(const QStringList &nameFilters, QDir::Filters filters = QDir::NoFilter, QDir::SortFlags sort = QDir::SortFlag::NoSort) const;
|
||||
bool mkdir(const QString &dirName) const;
|
||||
bool rmdir(const QString &dirName) const;
|
||||
bool mkpath(const QString &dirPath) const;
|
||||
bool rmpath(const QString &dirPath) const;
|
||||
bool isReadable() const;
|
||||
bool exists() const;
|
||||
bool isRoot() const;
|
||||
static bool isRelativePath(const QString &path);
|
||||
static bool isAbsolutePath(const QString &path);
|
||||
bool isRelative() const;
|
||||
bool isAbsolute() const;
|
||||
bool makeAbsolute();
|
||||
bool operator==(const QDir &dir) const;
|
||||
bool operator!=(const QDir &dir) const;
|
||||
bool remove(const QString &fileName);
|
||||
bool rename(const QString &oldName, const QString &newName);
|
||||
bool exists(const QString &name) const;
|
||||
void refresh() const;
|
||||
static QFileInfoList drives();
|
||||
static QChar separator();
|
||||
static bool setCurrent(const QString &path);
|
||||
static QDir current();
|
||||
static QString currentPath();
|
||||
static QDir home();
|
||||
static QString homePath();
|
||||
static QDir root();
|
||||
static QString rootPath();
|
||||
static QDir temp();
|
||||
static QString tempPath();
|
||||
static bool match(const QStringList &filters, const QString &fileName);
|
||||
static bool match(const QString &filter, const QString &fileName);
|
||||
static QString cleanPath(const QString &path);
|
||||
static QString toNativeSeparators(const QString &pathName);
|
||||
static QString fromNativeSeparators(const QString &pathName);
|
||||
static void setSearchPaths(const QString &prefix, const QStringList &searchPaths);
|
||||
static void addSearchPath(const QString &prefix, const QString &path);
|
||||
static QStringList searchPaths(const QString &prefix);
|
||||
bool removeRecursively();
|
||||
void swap(QDir &other /Constrained/);
|
||||
%If (Qt_5_6_0 -)
|
||||
static QChar listSeparator();
|
||||
%End
|
||||
%If (Qt_5_9_0 -)
|
||||
bool isEmpty(QDir::Filters filters = QDir::AllEntries | QDir::NoDotAndDotDot) const;
|
||||
%End
|
||||
};
|
||||
|
||||
QFlags<QDir::Filter> operator|(QDir::Filter f1, QFlags<QDir::Filter> f2);
|
||||
QFlags<QDir::SortFlag> operator|(QDir::SortFlag f1, QFlags<QDir::SortFlag> f2);
|
||||
@@ -0,0 +1,54 @@
|
||||
// qdiriterator.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QDirIterator
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qdiriterator.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum IteratorFlag
|
||||
{
|
||||
NoIteratorFlags,
|
||||
FollowSymlinks,
|
||||
Subdirectories,
|
||||
};
|
||||
|
||||
typedef QFlags<QDirIterator::IteratorFlag> IteratorFlags;
|
||||
QDirIterator(const QDir &dir, QFlags<QDirIterator::IteratorFlag> flags = NoIteratorFlags);
|
||||
QDirIterator(const QString &path, QFlags<QDirIterator::IteratorFlag> flags = NoIteratorFlags);
|
||||
QDirIterator(const QString &path, QFlags<QDir::Filter> filters, QFlags<QDirIterator::IteratorFlag> flags = NoIteratorFlags);
|
||||
QDirIterator(const QString &path, const QStringList &nameFilters, QFlags<QDir::Filter> filters = QDir::NoFilter, QFlags<QDirIterator::IteratorFlag> flags = NoIteratorFlags);
|
||||
~QDirIterator();
|
||||
QString next();
|
||||
bool hasNext() const;
|
||||
QString fileName() const;
|
||||
QString filePath() const;
|
||||
QFileInfo fileInfo() const;
|
||||
QString path() const;
|
||||
|
||||
private:
|
||||
QDirIterator(const QDirIterator &);
|
||||
};
|
||||
|
||||
QFlags<QDirIterator::IteratorFlag> operator|(QDirIterator::IteratorFlag f1, QFlags<QDirIterator::IteratorFlag> f2);
|
||||
@@ -0,0 +1,285 @@
|
||||
// qeasingcurve.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QEasingCurve /TypeHintIn="Union[QEasingCurve, QEasingCurve.Type]"/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qeasingcurve.h>
|
||||
%End
|
||||
|
||||
%TypeCode
|
||||
// The EasingFunction callback doesn't provide a context so we support a fixed
|
||||
// number of different functions.
|
||||
|
||||
const int ec_nr_custom_types = 10;
|
||||
|
||||
struct ec_custom_type {
|
||||
PyObject *py_func;
|
||||
QEasingCurve::EasingFunction func;
|
||||
};
|
||||
|
||||
static qreal ec_call(int ec, qreal v);
|
||||
|
||||
static qreal ec_func_0(qreal v)
|
||||
{
|
||||
return ec_call(0, v);
|
||||
}
|
||||
|
||||
static qreal ec_func_1(qreal v)
|
||||
{
|
||||
return ec_call(1, v);
|
||||
}
|
||||
|
||||
static qreal ec_func_2(qreal v)
|
||||
{
|
||||
return ec_call(2, v);
|
||||
}
|
||||
|
||||
static qreal ec_func_3(qreal v)
|
||||
{
|
||||
return ec_call(3, v);
|
||||
}
|
||||
|
||||
static qreal ec_func_4(qreal v)
|
||||
{
|
||||
return ec_call(4, v);
|
||||
}
|
||||
|
||||
static qreal ec_func_5(qreal v)
|
||||
{
|
||||
return ec_call(5, v);
|
||||
}
|
||||
|
||||
static qreal ec_func_6(qreal v)
|
||||
{
|
||||
return ec_call(6, v);
|
||||
}
|
||||
|
||||
static qreal ec_func_7(qreal v)
|
||||
{
|
||||
return ec_call(7, v);
|
||||
}
|
||||
|
||||
static qreal ec_func_8(qreal v)
|
||||
{
|
||||
return ec_call(8, v);
|
||||
}
|
||||
|
||||
static qreal ec_func_9(qreal v)
|
||||
{
|
||||
return ec_call(9, v);
|
||||
}
|
||||
|
||||
static ec_custom_type ec_custom_types[ec_nr_custom_types] = {
|
||||
{0, ec_func_0},
|
||||
{0, ec_func_1},
|
||||
{0, ec_func_2},
|
||||
{0, ec_func_3},
|
||||
{0, ec_func_4},
|
||||
{0, ec_func_5},
|
||||
{0, ec_func_6},
|
||||
{0, ec_func_7},
|
||||
{0, ec_func_8},
|
||||
{0, ec_func_9},
|
||||
};
|
||||
|
||||
static qreal ec_call(int ec, qreal v)
|
||||
{
|
||||
PyObject *res_obj;
|
||||
qreal res = 0.0;
|
||||
|
||||
SIP_BLOCK_THREADS
|
||||
|
||||
res_obj = PyObject_CallFunction(ec_custom_types[ec].py_func, (char *)"(d)", (double)v);
|
||||
|
||||
if (res_obj)
|
||||
{
|
||||
PyErr_Clear();
|
||||
|
||||
res = PyFloat_AsDouble(res_obj);
|
||||
Py_DECREF(res_obj);
|
||||
|
||||
if (PyErr_Occurred())
|
||||
res_obj = 0;
|
||||
}
|
||||
|
||||
if (!res_obj)
|
||||
pyqt5_err_print();
|
||||
|
||||
SIP_UNBLOCK_THREADS
|
||||
|
||||
return res;
|
||||
}
|
||||
%End
|
||||
|
||||
%ConvertToTypeCode
|
||||
// Allow a QEasingCurve::Type whenever a QEasingCurve is expected.
|
||||
|
||||
if (sipIsErr == NULL)
|
||||
{
|
||||
if (sipCanConvertToType(sipPy, sipType_QEasingCurve, SIP_NO_CONVERTORS))
|
||||
return 1;
|
||||
|
||||
if (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_QEasingCurve_Type)))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (sipCanConvertToType(sipPy, sipType_QEasingCurve, SIP_NO_CONVERTORS))
|
||||
{
|
||||
*sipCppPtr = reinterpret_cast<QEasingCurve *>(sipConvertToType(sipPy, sipType_QEasingCurve, sipTransferObj, SIP_NO_CONVERTORS, 0, sipIsErr));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
*sipCppPtr = new QEasingCurve((QEasingCurve::Type)SIPLong_AsLong(sipPy));
|
||||
|
||||
return sipGetState(sipTransferObj);
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Type
|
||||
{
|
||||
Linear,
|
||||
InQuad,
|
||||
OutQuad,
|
||||
InOutQuad,
|
||||
OutInQuad,
|
||||
InCubic,
|
||||
OutCubic,
|
||||
InOutCubic,
|
||||
OutInCubic,
|
||||
InQuart,
|
||||
OutQuart,
|
||||
InOutQuart,
|
||||
OutInQuart,
|
||||
InQuint,
|
||||
OutQuint,
|
||||
InOutQuint,
|
||||
OutInQuint,
|
||||
InSine,
|
||||
OutSine,
|
||||
InOutSine,
|
||||
OutInSine,
|
||||
InExpo,
|
||||
OutExpo,
|
||||
InOutExpo,
|
||||
OutInExpo,
|
||||
InCirc,
|
||||
OutCirc,
|
||||
InOutCirc,
|
||||
OutInCirc,
|
||||
InElastic,
|
||||
OutElastic,
|
||||
InOutElastic,
|
||||
OutInElastic,
|
||||
InBack,
|
||||
OutBack,
|
||||
InOutBack,
|
||||
OutInBack,
|
||||
InBounce,
|
||||
OutBounce,
|
||||
InOutBounce,
|
||||
OutInBounce,
|
||||
InCurve,
|
||||
OutCurve,
|
||||
SineCurve,
|
||||
CosineCurve,
|
||||
BezierSpline,
|
||||
TCBSpline,
|
||||
Custom,
|
||||
};
|
||||
|
||||
QEasingCurve(QEasingCurve::Type type = QEasingCurve::Linear);
|
||||
QEasingCurve(const QEasingCurve &other);
|
||||
~QEasingCurve();
|
||||
bool operator==(const QEasingCurve &other) const;
|
||||
bool operator!=(const QEasingCurve &other) const;
|
||||
qreal amplitude() const;
|
||||
void setAmplitude(qreal amplitude);
|
||||
qreal period() const;
|
||||
void setPeriod(qreal period);
|
||||
qreal overshoot() const;
|
||||
void setOvershoot(qreal overshoot);
|
||||
QEasingCurve::Type type() const;
|
||||
void setType(QEasingCurve::Type type);
|
||||
void setCustomType(SIP_PYCALLABLE func /TypeHint="Callable[[float], float]"/);
|
||||
%MethodCode
|
||||
int i;
|
||||
ec_custom_type *ct;
|
||||
|
||||
for (i = 0; i < ec_nr_custom_types; ++i)
|
||||
{
|
||||
ct = &ec_custom_types[i];
|
||||
|
||||
if (!ct->py_func || ct->py_func == a0)
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == ec_nr_custom_types)
|
||||
{
|
||||
PyErr_Format(PyExc_ValueError, "a maximum of %d different easing functions are supported", ec_nr_custom_types);
|
||||
sipError = sipErrorFail;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!ct->py_func)
|
||||
{
|
||||
ct->py_func = a0;
|
||||
Py_INCREF(a0);
|
||||
}
|
||||
|
||||
sipCpp->setCustomType(ct->func);
|
||||
}
|
||||
%End
|
||||
|
||||
SIP_PYCALLABLE customType() const /TypeHint="Callable[[float], float]"/;
|
||||
%MethodCode
|
||||
QEasingCurve::EasingFunction func = sipCpp->customType();
|
||||
|
||||
sipRes = Py_None;
|
||||
|
||||
if (func)
|
||||
{
|
||||
for (int i = 0; i < ec_nr_custom_types; ++i)
|
||||
{
|
||||
if (ec_custom_types[i].func == func)
|
||||
{
|
||||
sipRes = ec_custom_types[i].py_func;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Py_INCREF(sipRes);
|
||||
%End
|
||||
|
||||
qreal valueForProgress(qreal progress) const;
|
||||
void swap(QEasingCurve &other /Constrained/);
|
||||
void addCubicBezierSegment(const QPointF &c1, const QPointF &c2, const QPointF &endPoint);
|
||||
void addTCBSegment(const QPointF &nextPoint, qreal t, qreal c, qreal b);
|
||||
QVector<QPointF> toCubicSpline() const;
|
||||
};
|
||||
|
||||
QDataStream &operator<<(QDataStream &, const QEasingCurve & /Constrained/) /ReleaseGIL/;
|
||||
QDataStream &operator>>(QDataStream &, QEasingCurve & /Constrained/) /ReleaseGIL/;
|
||||
@@ -0,0 +1,59 @@
|
||||
// qelapsedtimer.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QElapsedTimer
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qelapsedtimer.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
%If (Qt_5_4_0 -)
|
||||
QElapsedTimer();
|
||||
%End
|
||||
|
||||
enum ClockType
|
||||
{
|
||||
SystemTime,
|
||||
MonotonicClock,
|
||||
TickCounter,
|
||||
MachAbsoluteTime,
|
||||
PerformanceCounter,
|
||||
};
|
||||
|
||||
static QElapsedTimer::ClockType clockType();
|
||||
static bool isMonotonic();
|
||||
void start();
|
||||
qint64 restart();
|
||||
void invalidate();
|
||||
bool isValid() const;
|
||||
qint64 elapsed() const;
|
||||
bool hasExpired(qint64 timeout) const;
|
||||
qint64 msecsSinceReference() const;
|
||||
qint64 msecsTo(const QElapsedTimer &other) const;
|
||||
qint64 secsTo(const QElapsedTimer &other) const;
|
||||
bool operator==(const QElapsedTimer &other) const;
|
||||
bool operator!=(const QElapsedTimer &other) const;
|
||||
qint64 nsecsElapsed() const;
|
||||
};
|
||||
|
||||
bool operator<(const QElapsedTimer &v1, const QElapsedTimer &v2);
|
||||
@@ -0,0 +1,76 @@
|
||||
// qeventloop.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QEventLoop : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qeventloop.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QEventLoop(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QEventLoop();
|
||||
|
||||
enum ProcessEventsFlag
|
||||
{
|
||||
AllEvents,
|
||||
ExcludeUserInputEvents,
|
||||
ExcludeSocketNotifiers,
|
||||
WaitForMoreEvents,
|
||||
X11ExcludeTimers,
|
||||
};
|
||||
|
||||
typedef QFlags<QEventLoop::ProcessEventsFlag> ProcessEventsFlags;
|
||||
bool processEvents(QEventLoop::ProcessEventsFlags flags = QEventLoop::AllEvents) /ReleaseGIL/;
|
||||
void processEvents(QEventLoop::ProcessEventsFlags flags, int maximumTime) /ReleaseGIL/;
|
||||
int exec(QFlags<QEventLoop::ProcessEventsFlag> flags = AllEvents) /PostHook=__pyQtPostEventLoopHook__,PreHook=__pyQtPreEventLoopHook__,PyName=exec_,ReleaseGIL/;
|
||||
%If (Py_v3)
|
||||
int exec(QFlags<QEventLoop::ProcessEventsFlag> flags = AllEvents) /PostHook=__pyQtPostEventLoopHook__,PreHook=__pyQtPreEventLoopHook__,ReleaseGIL/;
|
||||
%End
|
||||
void exit(int returnCode = 0);
|
||||
bool isRunning() const;
|
||||
void wakeUp();
|
||||
|
||||
public slots:
|
||||
void quit();
|
||||
|
||||
public:
|
||||
virtual bool event(QEvent *event);
|
||||
};
|
||||
|
||||
QFlags<QEventLoop::ProcessEventsFlag> operator|(QEventLoop::ProcessEventsFlag f1, QFlags<QEventLoop::ProcessEventsFlag> f2);
|
||||
|
||||
class QEventLoopLocker
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qeventloop.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QEventLoopLocker() /ReleaseGIL/;
|
||||
explicit QEventLoopLocker(QEventLoop *loop) /ReleaseGIL/;
|
||||
explicit QEventLoopLocker(QThread *thread) /ReleaseGIL/;
|
||||
~QEventLoopLocker();
|
||||
|
||||
private:
|
||||
QEventLoopLocker(const QEventLoopLocker &);
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
// qeventtransition.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QEventTransition : public QAbstractTransition
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qeventtransition.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QEventTransition(QState *sourceState /TransferThis/ = 0);
|
||||
QEventTransition(QObject *object /KeepReference=10/, QEvent::Type type, QState *sourceState /TransferThis/ = 0);
|
||||
virtual ~QEventTransition();
|
||||
QObject *eventSource() const;
|
||||
void setEventSource(QObject *object /KeepReference=10/);
|
||||
QEvent::Type eventType() const;
|
||||
void setEventType(QEvent::Type type);
|
||||
|
||||
protected:
|
||||
virtual bool eventTest(QEvent *event);
|
||||
virtual void onTransition(QEvent *event);
|
||||
virtual bool event(QEvent *e);
|
||||
};
|
||||
67
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qfile.sip
Normal file
67
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qfile.sip
Normal file
@@ -0,0 +1,67 @@
|
||||
// qfile.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QFile : public QFileDevice
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qfile.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QFile();
|
||||
QFile(const QString &name);
|
||||
explicit QFile(QObject *parent /TransferThis/);
|
||||
QFile(const QString &name, QObject *parent /TransferThis/);
|
||||
virtual ~QFile();
|
||||
virtual QString fileName() const;
|
||||
void setFileName(const QString &name);
|
||||
static QByteArray encodeName(const QString &fileName);
|
||||
static QString decodeName(const QByteArray &localFileName);
|
||||
static QString decodeName(const char *localFileName /Encoding="ASCII"/);
|
||||
bool exists() const;
|
||||
static bool exists(const QString &fileName);
|
||||
QString symLinkTarget() const;
|
||||
static QString symLinkTarget(const QString &fileName);
|
||||
bool remove() /ReleaseGIL/;
|
||||
static bool remove(const QString &fileName) /ReleaseGIL/;
|
||||
bool rename(const QString &newName) /ReleaseGIL/;
|
||||
static bool rename(const QString &oldName, const QString &newName) /ReleaseGIL/;
|
||||
bool link(const QString &newName) /ReleaseGIL/;
|
||||
static bool link(const QString &oldname, const QString &newName) /ReleaseGIL/;
|
||||
bool copy(const QString &newName) /ReleaseGIL/;
|
||||
static bool copy(const QString &fileName, const QString &newName) /ReleaseGIL/;
|
||||
virtual bool open(QIODevice::OpenMode flags) /ReleaseGIL/;
|
||||
bool open(int fd, QIODevice::OpenMode ioFlags, QFileDevice::FileHandleFlags handleFlags = QFileDevice::FileHandleFlag::DontCloseHandle) /ReleaseGIL/;
|
||||
virtual qint64 size() const;
|
||||
virtual bool resize(qint64 sz);
|
||||
static bool resize(const QString &filename, qint64 sz);
|
||||
virtual QFileDevice::Permissions permissions() const;
|
||||
static QFileDevice::Permissions permissions(const QString &filename);
|
||||
virtual bool setPermissions(QFileDevice::Permissions permissionSpec);
|
||||
static bool setPermissions(const QString &filename, QFileDevice::Permissions permissionSpec);
|
||||
%If (Qt_5_15_0 -)
|
||||
bool moveToTrash();
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
static bool moveToTrash(const QString &fileName, QString *pathInTrash /Out/ = 0);
|
||||
%End
|
||||
};
|
||||
199
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qfiledevice.sip
Normal file
199
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qfiledevice.sip
Normal file
@@ -0,0 +1,199 @@
|
||||
// qfiledevice.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QFileDevice : public QIODevice /NoDefaultCtors/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qfiledevice.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum FileError
|
||||
{
|
||||
NoError,
|
||||
ReadError,
|
||||
WriteError,
|
||||
FatalError,
|
||||
ResourceError,
|
||||
OpenError,
|
||||
AbortError,
|
||||
TimeOutError,
|
||||
UnspecifiedError,
|
||||
RemoveError,
|
||||
RenameError,
|
||||
PositionError,
|
||||
ResizeError,
|
||||
PermissionsError,
|
||||
CopyError,
|
||||
};
|
||||
|
||||
enum Permission
|
||||
{
|
||||
ReadOwner,
|
||||
WriteOwner,
|
||||
ExeOwner,
|
||||
ReadUser,
|
||||
WriteUser,
|
||||
ExeUser,
|
||||
ReadGroup,
|
||||
WriteGroup,
|
||||
ExeGroup,
|
||||
ReadOther,
|
||||
WriteOther,
|
||||
ExeOther,
|
||||
};
|
||||
|
||||
typedef QFlags<QFileDevice::Permission> Permissions;
|
||||
|
||||
enum FileHandleFlag
|
||||
{
|
||||
AutoCloseHandle,
|
||||
DontCloseHandle,
|
||||
};
|
||||
|
||||
typedef QFlags<QFileDevice::FileHandleFlag> FileHandleFlags;
|
||||
virtual ~QFileDevice();
|
||||
QFileDevice::FileError error() const;
|
||||
void unsetError();
|
||||
virtual void close() /ReleaseGIL/;
|
||||
virtual bool isSequential() const;
|
||||
int handle() const;
|
||||
virtual QString fileName() const;
|
||||
virtual qint64 pos() const;
|
||||
virtual bool seek(qint64 offset) /ReleaseGIL/;
|
||||
virtual bool atEnd() const;
|
||||
bool flush() /ReleaseGIL/;
|
||||
virtual qint64 size() const;
|
||||
virtual bool resize(qint64 sz);
|
||||
virtual QFileDevice::Permissions permissions() const;
|
||||
virtual bool setPermissions(QFileDevice::Permissions permissionSpec);
|
||||
|
||||
enum MemoryMapFlags
|
||||
{
|
||||
NoOptions,
|
||||
%If (Qt_5_4_0 -)
|
||||
MapPrivateOption,
|
||||
%End
|
||||
};
|
||||
|
||||
void *map(qint64 offset, qint64 size /ResultSize/, QFileDevice::MemoryMapFlags flags = QFileDevice::NoOptions) [uchar * (qint64 offset, qint64 size, QFileDevice::MemoryMapFlags flags = QFileDevice::NoOptions)];
|
||||
bool unmap(void *address) [bool (uchar *address)];
|
||||
|
||||
protected:
|
||||
virtual SIP_PYOBJECT readData(qint64 maxlen) /TypeHint="Py_v3:bytes;str",ReleaseGIL/ [qint64 (char *data, qint64 maxlen)];
|
||||
%MethodCode
|
||||
// Return the data read or None if there was an error.
|
||||
if (a0 < 0)
|
||||
{
|
||||
PyErr_SetString(PyExc_ValueError, "maximum length of data to be read cannot be negative");
|
||||
sipIsErr = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
char *s = new char[a0];
|
||||
qint64 len;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
#if defined(SIP_PROTECTED_IS_PUBLIC)
|
||||
len = sipSelfWasArg ? sipCpp->QFileDevice::readData(s, a0) : sipCpp->readData(s, a0);
|
||||
#else
|
||||
len = sipCpp->sipProtectVirt_readData(sipSelfWasArg, s, a0);
|
||||
#endif
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
if (len < 0)
|
||||
{
|
||||
Py_INCREF(Py_None);
|
||||
sipRes = Py_None;
|
||||
}
|
||||
else
|
||||
{
|
||||
sipRes = SIPBytes_FromStringAndSize(s, len);
|
||||
|
||||
if (!sipRes)
|
||||
sipIsErr = 1;
|
||||
}
|
||||
|
||||
delete[] s;
|
||||
}
|
||||
%End
|
||||
|
||||
virtual qint64 writeData(const char *data /Array/, qint64 len /ArraySize/) /ReleaseGIL/;
|
||||
virtual SIP_PYOBJECT readLineData(qint64 maxlen) /TypeHint="Py_v3:bytes;str",ReleaseGIL/ [qint64 (char *data, qint64 maxlen)];
|
||||
%MethodCode
|
||||
// Return the data read or None if there was an error.
|
||||
if (a0 < 0)
|
||||
{
|
||||
PyErr_SetString(PyExc_ValueError, "maximum length of data to be read cannot be negative");
|
||||
sipIsErr = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
char *s = new char[a0];
|
||||
qint64 len;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
#if defined(SIP_PROTECTED_IS_PUBLIC)
|
||||
len = sipSelfWasArg ? sipCpp->QFileDevice::readLineData(s, a0) : sipCpp->readLineData(s, a0);
|
||||
#else
|
||||
len = sipCpp->sipProtectVirt_readLineData(sipSelfWasArg, s, a0);
|
||||
#endif
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
if (len < 0)
|
||||
{
|
||||
Py_INCREF(Py_None);
|
||||
sipRes = Py_None;
|
||||
}
|
||||
else
|
||||
{
|
||||
sipRes = SIPBytes_FromStringAndSize(s, len);
|
||||
|
||||
if (!sipRes)
|
||||
sipIsErr = 1;
|
||||
}
|
||||
|
||||
delete[] s;
|
||||
}
|
||||
%End
|
||||
|
||||
public:
|
||||
%If (Qt_5_10_0 -)
|
||||
|
||||
enum FileTime
|
||||
{
|
||||
FileAccessTime,
|
||||
FileBirthTime,
|
||||
FileMetadataChangeTime,
|
||||
FileModificationTime,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
QDateTime fileTime(QFileDevice::FileTime time) const;
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
bool setFileTime(const QDateTime &newDate, QFileDevice::FileTime fileTime);
|
||||
%End
|
||||
};
|
||||
|
||||
QFlags<QFileDevice::Permission> operator|(QFileDevice::Permission f1, QFlags<QFileDevice::Permission> f2);
|
||||
112
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qfileinfo.sip
Normal file
112
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qfileinfo.sip
Normal file
@@ -0,0 +1,112 @@
|
||||
// qfileinfo.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QFileInfo
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qfileinfo.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QFileInfo();
|
||||
QFileInfo(const QString &file);
|
||||
QFileInfo(const QFile &file);
|
||||
QFileInfo(const QDir &dir, const QString &file);
|
||||
QFileInfo(const QFileInfo &fileinfo);
|
||||
~QFileInfo();
|
||||
bool operator==(const QFileInfo &fileinfo) const;
|
||||
bool operator!=(const QFileInfo &fileinfo) const;
|
||||
void setFile(const QString &file);
|
||||
void setFile(const QFile &file);
|
||||
void setFile(const QDir &dir, const QString &file);
|
||||
bool exists() const;
|
||||
void refresh();
|
||||
QString filePath() const;
|
||||
SIP_PYOBJECT __fspath__();
|
||||
%MethodCode
|
||||
sipRes = qpycore_PyObject_FromQString(QDir::toNativeSeparators(sipCpp->filePath()));
|
||||
%End
|
||||
|
||||
QString absoluteFilePath() const;
|
||||
QString canonicalFilePath() const;
|
||||
QString fileName() const;
|
||||
QString baseName() const;
|
||||
QString completeBaseName() const;
|
||||
QString suffix() const;
|
||||
QString completeSuffix() const;
|
||||
QString path() const;
|
||||
QString absolutePath() const;
|
||||
QString canonicalPath() const;
|
||||
QDir dir() const;
|
||||
QDir absoluteDir() const;
|
||||
bool isReadable() const;
|
||||
bool isWritable() const;
|
||||
bool isExecutable() const;
|
||||
bool isHidden() const;
|
||||
bool isRelative() const;
|
||||
bool isAbsolute() const;
|
||||
bool makeAbsolute();
|
||||
bool isFile() const;
|
||||
bool isDir() const;
|
||||
bool isSymLink() const;
|
||||
bool isRoot() const;
|
||||
QString owner() const;
|
||||
uint ownerId() const;
|
||||
QString group() const;
|
||||
uint groupId() const;
|
||||
bool permission(QFileDevice::Permissions permissions) const;
|
||||
QFileDevice::Permissions permissions() const;
|
||||
qint64 size() const;
|
||||
QDateTime created() const;
|
||||
QDateTime lastModified() const;
|
||||
QDateTime lastRead() const;
|
||||
bool caching() const;
|
||||
void setCaching(bool on);
|
||||
QString symLinkTarget() const;
|
||||
QString bundleName() const;
|
||||
bool isBundle() const;
|
||||
bool isNativePath() const;
|
||||
void swap(QFileInfo &other /Constrained/);
|
||||
%If (Qt_5_2_0 -)
|
||||
static bool exists(const QString &file);
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
QDateTime birthTime() const;
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
QDateTime metadataChangeTime() const;
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
QDateTime fileTime(QFileDevice::FileTime time) const;
|
||||
%End
|
||||
%If (Qt_5_14_0 -)
|
||||
bool isSymbolicLink() const;
|
||||
%End
|
||||
%If (Qt_5_14_0 -)
|
||||
bool isShortcut() const;
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
bool isJunction() const;
|
||||
%End
|
||||
};
|
||||
|
||||
typedef QList<QFileInfo> QFileInfoList;
|
||||
@@ -0,0 +1,41 @@
|
||||
// qfileselector.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
class QFileSelector : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qfileselector.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QFileSelector(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QFileSelector();
|
||||
QString select(const QString &filePath) const;
|
||||
QUrl select(const QUrl &filePath) const;
|
||||
QStringList extraSelectors() const;
|
||||
void setExtraSelectors(const QStringList &list);
|
||||
QStringList allSelectors() const;
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,43 @@
|
||||
// qfilesystemwatcher.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QFileSystemWatcher : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qfilesystemwatcher.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QFileSystemWatcher(QObject *parent /TransferThis/ = 0);
|
||||
QFileSystemWatcher(const QStringList &paths, QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QFileSystemWatcher();
|
||||
bool addPath(const QString &file);
|
||||
QStringList addPaths(const QStringList &files);
|
||||
QStringList directories() const;
|
||||
QStringList files() const;
|
||||
bool removePath(const QString &file);
|
||||
QStringList removePaths(const QStringList &files);
|
||||
|
||||
signals:
|
||||
void directoryChanged(const QString &path);
|
||||
void fileChanged(const QString &path);
|
||||
};
|
||||
@@ -0,0 +1,37 @@
|
||||
// qfinalstate.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QFinalState : public QAbstractState
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qfinalstate.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QFinalState(QState *parent /TransferThis/ = 0);
|
||||
virtual ~QFinalState();
|
||||
|
||||
protected:
|
||||
virtual void onEntry(QEvent *event);
|
||||
virtual void onExit(QEvent *event);
|
||||
virtual bool event(QEvent *e);
|
||||
};
|
||||
239
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qglobal.sip
Normal file
239
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qglobal.sip
Normal file
@@ -0,0 +1,239 @@
|
||||
// qglobal.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%ModuleCode
|
||||
#include <qglobal.h>
|
||||
%End
|
||||
|
||||
// PyQt version information.
|
||||
int PYQT_VERSION;
|
||||
const char *PYQT_VERSION_STR;
|
||||
|
||||
%ModuleCode
|
||||
static int PYQT_VERSION = 0x050f0b;
|
||||
static const char *PYQT_VERSION_STR = "5.15.11";
|
||||
%End
|
||||
const int QT_VERSION;
|
||||
const char *QT_VERSION_STR;
|
||||
typedef signed char qint8 /PyInt/;
|
||||
typedef unsigned char quint8 /PyInt/;
|
||||
typedef short qint16;
|
||||
typedef unsigned short quint16;
|
||||
typedef int qint32;
|
||||
typedef unsigned int quint32;
|
||||
typedef long long qint64;
|
||||
typedef unsigned long long quint64;
|
||||
typedef qint64 qlonglong;
|
||||
typedef quint64 qulonglong;
|
||||
%If (PyQt_qreal_double)
|
||||
typedef double qreal;
|
||||
%End
|
||||
%If (!PyQt_qreal_double)
|
||||
typedef float qreal;
|
||||
%End
|
||||
typedef unsigned char uchar;
|
||||
typedef unsigned short ushort;
|
||||
typedef unsigned int uint;
|
||||
typedef unsigned long ulong;
|
||||
double qAbs(const double &t);
|
||||
int qRound(qreal d);
|
||||
qint64 qRound64(qreal d);
|
||||
const char *qVersion();
|
||||
bool qSharedBuild();
|
||||
// Template definition for QFlags.
|
||||
template<ENUM>
|
||||
class QFlags /NoDefaultCtors, PyQtFlagsEnums="ENUM", TypeHintIn="Union[QFlags, ENUM]"/
|
||||
{
|
||||
public:
|
||||
// QFlags is supposed to be a more type safe version of an int (even though
|
||||
// Qt has cases where it expects multiple flag types to be or-ed together).
|
||||
// Because of the C++ int() operator and because type(ENUM) is a sub-type
|
||||
// of int, most of this is lost. Therefore we only implement logical
|
||||
// operators that take int arguments.
|
||||
QFlags();
|
||||
QFlags(int f /TypeHint="QFlags"/);
|
||||
|
||||
// This will never be called because the above ctor will be invoked first.
|
||||
// However it's required for sip to generate assignment helpers.
|
||||
QFlags(const QFlags &) /NoTypeHint/;
|
||||
|
||||
operator int() const;
|
||||
|
||||
// This is required for Python v3.8 and later.
|
||||
int __index__() const;
|
||||
%MethodCode
|
||||
sipRes = sipCpp->operator QFlags::Int();
|
||||
%End
|
||||
|
||||
QFlags operator~() const;
|
||||
|
||||
QFlags operator&(int f /TypeHint="QFlags"/) const;
|
||||
QFlags &operator&=(int f /TypeHint="QFlags"/);
|
||||
|
||||
QFlags operator|(int f /TypeHint="QFlags"/) const;
|
||||
QFlags &operator|=(int f /TypeHint="QFlags"/);
|
||||
%MethodCode
|
||||
*sipCpp = QFlags(*sipCpp | a0);
|
||||
%End
|
||||
|
||||
QFlags operator^(int f /TypeHint="QFlags"/) const;
|
||||
QFlags &operator^=(int f /TypeHint="QFlags"/);
|
||||
%MethodCode
|
||||
*sipCpp = QFlags(*sipCpp ^ a0);
|
||||
%End
|
||||
|
||||
// These are necessary to prevent Python comparing object IDs.
|
||||
bool operator==(const QFlags &f) const;
|
||||
%MethodCode
|
||||
sipRes = (sipCpp->operator QFlags::Int() == a0->operator QFlags::Int());
|
||||
%End
|
||||
|
||||
bool operator!=(const QFlags &f) const;
|
||||
%MethodCode
|
||||
sipRes = (sipCpp->operator QFlags::Int() != a0->operator QFlags::Int());
|
||||
%End
|
||||
|
||||
int __bool__() const;
|
||||
%MethodCode
|
||||
sipRes = (sipCpp->operator QFlags::Int() != 0);
|
||||
%End
|
||||
|
||||
long __hash__() const;
|
||||
%MethodCode
|
||||
sipRes = sipCpp->operator QFlags::Int();
|
||||
%End
|
||||
|
||||
|
||||
%ConvertToTypeCode
|
||||
// Allow an instance of the base enum whenever a QFlags is expected.
|
||||
|
||||
if (sipIsErr == NULL)
|
||||
return (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_ENUM)) ||
|
||||
sipCanConvertToType(sipPy, sipType_QFlags, SIP_NO_CONVERTORS));
|
||||
|
||||
if (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_ENUM)))
|
||||
{
|
||||
*sipCppPtr = new QFlags(int(SIPLong_AsLong(sipPy)));
|
||||
|
||||
return sipGetState(sipTransferObj);
|
||||
}
|
||||
|
||||
*sipCppPtr = reinterpret_cast<QFlags *>(sipConvertToType(sipPy, sipType_QFlags, sipTransferObj, SIP_NO_CONVERTORS, 0, sipIsErr));
|
||||
|
||||
return 0;
|
||||
%End
|
||||
};
|
||||
// Hook's into Qt's resource system.
|
||||
%ModuleCode
|
||||
QT_BEGIN_NAMESPACE
|
||||
extern bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
|
||||
extern bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
|
||||
QT_END_NAMESPACE
|
||||
%End
|
||||
|
||||
bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
|
||||
bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
|
||||
bool qFuzzyCompare(double p1, double p2);
|
||||
bool qIsNull(double d);
|
||||
void qsrand(uint seed);
|
||||
int qrand();
|
||||
typedef void *QFunctionPointer;
|
||||
// Mapped type for qintptr.
|
||||
// Map qintptr onto sip.voidptr. This means either an address (on Windows) or
|
||||
// an integer file descriptor (on everything else) can be used.
|
||||
%MappedType qintptr /TypeHint="PyQt5.sip.voidptr"/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <QtGlobal>
|
||||
%End
|
||||
|
||||
%ConvertToTypeCode
|
||||
qintptr ptr = (qintptr)sipConvertToVoidPtr(sipPy);
|
||||
|
||||
if (!sipIsErr)
|
||||
return !PyErr_Occurred();
|
||||
|
||||
// Mapped types deal with pointers, so create one on the heap.
|
||||
qintptr *heap = new qintptr;
|
||||
*heap = ptr;
|
||||
|
||||
*sipCppPtr = heap;
|
||||
|
||||
// Make sure the pointer doesn't leak.
|
||||
return SIP_TEMPORARY;
|
||||
%End
|
||||
|
||||
%ConvertFromTypeCode
|
||||
return sipConvertFromVoidPtr((void *)*sipCpp);
|
||||
%End
|
||||
};
|
||||
// Mapped type for quintptr.
|
||||
// Map quintptr onto sip.voidptr. This means either an address (on Windows) or
|
||||
// an integer file descriptor (on everything else) can be used.
|
||||
%MappedType quintptr /TypeHint="PyQt5.sip.voidptr"/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <QtGlobal>
|
||||
%End
|
||||
|
||||
%ConvertToTypeCode
|
||||
quintptr ptr = (quintptr)sipConvertToVoidPtr(sipPy);
|
||||
|
||||
if (!sipIsErr)
|
||||
return !PyErr_Occurred();
|
||||
|
||||
// Mapped types deal with pointers, so create one on the heap.
|
||||
quintptr *heap = new quintptr;
|
||||
*heap = ptr;
|
||||
|
||||
*sipCppPtr = heap;
|
||||
|
||||
// Make sure the pointer doesn't leak.
|
||||
return SIP_TEMPORARY;
|
||||
%End
|
||||
|
||||
%ConvertFromTypeCode
|
||||
return sipConvertFromVoidPtr((void *)*sipCpp);
|
||||
%End
|
||||
};
|
||||
// Implementations of pyqt[Set]PickleProtocol().
|
||||
void pyqtSetPickleProtocol(SIP_PYOBJECT /TypeHint="Optional[int]"/);
|
||||
%MethodCode
|
||||
Py_XDECREF(qpycore_pickle_protocol);
|
||||
qpycore_pickle_protocol = a0;
|
||||
Py_INCREF(qpycore_pickle_protocol);
|
||||
%End
|
||||
|
||||
SIP_PYOBJECT pyqtPickleProtocol() /TypeHint="Optional[int]"/;
|
||||
%MethodCode
|
||||
sipRes = qpycore_pickle_protocol;
|
||||
if (!sipRes)
|
||||
sipRes = Py_None;
|
||||
|
||||
Py_INCREF(sipRes);
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
QString qEnvironmentVariable(const char *varName);
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
QString qEnvironmentVariable(const char *varName, const QString &defaultValue);
|
||||
%End
|
||||
@@ -0,0 +1,69 @@
|
||||
// qhistorystate.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QHistoryState : public QAbstractState
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qhistorystate.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum HistoryType
|
||||
{
|
||||
ShallowHistory,
|
||||
DeepHistory,
|
||||
};
|
||||
|
||||
QHistoryState(QState *parent /TransferThis/ = 0);
|
||||
QHistoryState(QHistoryState::HistoryType type, QState *parent /TransferThis/ = 0);
|
||||
virtual ~QHistoryState();
|
||||
QAbstractState *defaultState() const;
|
||||
void setDefaultState(QAbstractState *state /KeepReference=0/);
|
||||
QHistoryState::HistoryType historyType() const;
|
||||
void setHistoryType(QHistoryState::HistoryType type);
|
||||
|
||||
protected:
|
||||
virtual void onEntry(QEvent *event);
|
||||
virtual void onExit(QEvent *event);
|
||||
virtual bool event(QEvent *e);
|
||||
|
||||
signals:
|
||||
%If (Qt_5_4_0 -)
|
||||
void defaultStateChanged();
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
void historyTypeChanged();
|
||||
%End
|
||||
|
||||
public:
|
||||
%If (Qt_5_6_0 -)
|
||||
QAbstractTransition *defaultTransition() const;
|
||||
%End
|
||||
%If (Qt_5_6_0 -)
|
||||
void setDefaultTransition(QAbstractTransition *transition /KeepReference=1/);
|
||||
%End
|
||||
|
||||
signals:
|
||||
%If (Qt_5_6_0 -)
|
||||
void defaultTransitionChanged();
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,60 @@
|
||||
// qidentityproxymodel.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QIdentityProxyModel : public QAbstractProxyModel
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qidentityproxymodel.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QIdentityProxyModel(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QIdentityProxyModel();
|
||||
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
virtual QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
|
||||
virtual QModelIndex mapFromSource(const QModelIndex &sourceIndex) const;
|
||||
virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const;
|
||||
virtual QModelIndex parent(const QModelIndex &child) const;
|
||||
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
|
||||
virtual QItemSelection mapSelectionFromSource(const QItemSelection &selection) const;
|
||||
virtual QItemSelection mapSelectionToSource(const QItemSelection &selection) const;
|
||||
virtual QModelIndexList match(const QModelIndex &start, int role, const QVariant &value, int hits = 1, Qt::MatchFlags flags = Qt::MatchStartsWith|Qt::MatchWrap) const;
|
||||
virtual void setSourceModel(QAbstractItemModel *sourceModel /KeepReference/);
|
||||
virtual bool insertColumns(int column, int count, const QModelIndex &parent = QModelIndex());
|
||||
virtual bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex());
|
||||
virtual bool removeColumns(int column, int count, const QModelIndex &parent = QModelIndex());
|
||||
virtual bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
|
||||
%If (Qt_5_5_0 -)
|
||||
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||
%End
|
||||
%If (- Qt_5_5_0)
|
||||
virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const;
|
||||
%End
|
||||
virtual QModelIndex sibling(int row, int column, const QModelIndex &idx) const;
|
||||
%If (Qt_5_15_0 -)
|
||||
virtual bool moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild);
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
virtual bool moveColumns(const QModelIndex &sourceParent, int sourceColumn, int count, const QModelIndex &destinationParent, int destinationChild);
|
||||
%End
|
||||
};
|
||||
347
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qiodevice.sip
Normal file
347
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qiodevice.sip
Normal file
@@ -0,0 +1,347 @@
|
||||
// qiodevice.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QIODevice : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qiodevice.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum OpenModeFlag
|
||||
{
|
||||
NotOpen,
|
||||
ReadOnly,
|
||||
WriteOnly,
|
||||
ReadWrite,
|
||||
Append,
|
||||
Truncate,
|
||||
Text,
|
||||
Unbuffered,
|
||||
%If (Qt_5_11_0 -)
|
||||
NewOnly,
|
||||
%End
|
||||
%If (Qt_5_11_0 -)
|
||||
ExistingOnly,
|
||||
%End
|
||||
};
|
||||
|
||||
typedef QFlags<QIODevice::OpenModeFlag> OpenMode;
|
||||
QIODevice();
|
||||
explicit QIODevice(QObject *parent /TransferThis/);
|
||||
virtual ~QIODevice();
|
||||
QIODevice::OpenMode openMode() const;
|
||||
void setTextModeEnabled(bool enabled);
|
||||
bool isTextModeEnabled() const;
|
||||
bool isOpen() const;
|
||||
bool isReadable() const;
|
||||
bool isWritable() const;
|
||||
virtual bool isSequential() const;
|
||||
virtual bool open(QIODevice::OpenMode mode) /ReleaseGIL/;
|
||||
virtual void close() /ReleaseGIL/;
|
||||
virtual qint64 pos() const;
|
||||
virtual qint64 size() const;
|
||||
virtual bool seek(qint64 pos) /ReleaseGIL/;
|
||||
virtual bool atEnd() const;
|
||||
virtual bool reset();
|
||||
virtual qint64 bytesAvailable() const;
|
||||
virtual qint64 bytesToWrite() const;
|
||||
SIP_PYOBJECT read(qint64 maxlen) /TypeHint="Py_v3:bytes;str",ReleaseGIL/;
|
||||
%MethodCode
|
||||
// Return the data read or None if there was an error.
|
||||
if (a0 < 0)
|
||||
{
|
||||
PyErr_SetString(PyExc_ValueError, "maximum length of data to be read cannot be negative");
|
||||
sipIsErr = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
char *s = new char[a0];
|
||||
qint64 len;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
len = sipCpp->read(s, a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
if (len < 0)
|
||||
{
|
||||
Py_INCREF(Py_None);
|
||||
sipRes = Py_None;
|
||||
}
|
||||
else
|
||||
{
|
||||
sipRes = SIPBytes_FromStringAndSize(s, len);
|
||||
|
||||
if (!sipRes)
|
||||
sipIsErr = 1;
|
||||
}
|
||||
|
||||
delete[] s;
|
||||
}
|
||||
%End
|
||||
|
||||
QByteArray readAll() /ReleaseGIL/;
|
||||
SIP_PYOBJECT readLine(qint64 maxlen=0) /TypeHint="Py_v3:bytes;str",ReleaseGIL/;
|
||||
%MethodCode
|
||||
// The two C++ overloads would have the same Python signature so we get most of
|
||||
// the combined functionality by treating an argument of 0 (the default) as
|
||||
// meaning return a QByteArray of any length. Otherwise it is treated as a
|
||||
// maximum buffer size and a Python string is returned.
|
||||
if (a0 < 0)
|
||||
{
|
||||
PyErr_SetString(PyExc_ValueError, "maximum length of data to be read cannot be negative");
|
||||
sipIsErr = 1;
|
||||
}
|
||||
else if (a0 == 0)
|
||||
{
|
||||
QByteArray *ba;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
ba = new QByteArray(sipCpp->readLine(a0));
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
sipRes = sipBuildResult(&sipIsErr, "N", ba, sipType_QByteArray, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
char *s = new char[a0];
|
||||
qint64 len;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
len = sipCpp->readLine(s, a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
if (len < 0)
|
||||
{
|
||||
Py_INCREF(Py_None);
|
||||
sipRes = Py_None;
|
||||
}
|
||||
else
|
||||
{
|
||||
sipRes = SIPBytes_FromStringAndSize(s, len);
|
||||
|
||||
if (!sipRes)
|
||||
sipIsErr = 1;
|
||||
}
|
||||
|
||||
delete[] s;
|
||||
}
|
||||
%End
|
||||
|
||||
virtual bool canReadLine() const;
|
||||
QByteArray peek(qint64 maxlen) /ReleaseGIL/;
|
||||
qint64 write(const QByteArray &data) /ReleaseGIL/;
|
||||
virtual bool waitForReadyRead(int msecs) /ReleaseGIL/;
|
||||
virtual bool waitForBytesWritten(int msecs) /ReleaseGIL/;
|
||||
void ungetChar(char c);
|
||||
bool putChar(char c);
|
||||
bool getChar(char *c /Encoding="None",Out/);
|
||||
QString errorString() const;
|
||||
|
||||
signals:
|
||||
void readyRead();
|
||||
void bytesWritten(qint64 bytes);
|
||||
void aboutToClose();
|
||||
void readChannelFinished();
|
||||
|
||||
protected:
|
||||
virtual SIP_PYOBJECT readData(qint64 maxlen) = 0 /TypeHint="Py_v3:bytes;str",ReleaseGIL/ [qint64 (char *data, qint64 maxlen)];
|
||||
%MethodCode
|
||||
// Return the data read or None if there was an error.
|
||||
if (a0 < 0)
|
||||
{
|
||||
PyErr_SetString(PyExc_ValueError, "maximum length of data to be read cannot be negative");
|
||||
sipIsErr = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
char *s = new char[a0];
|
||||
qint64 len;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
#if defined(SIP_PROTECTED_IS_PUBLIC)
|
||||
len = sipCpp->readData(s, a0);
|
||||
#else
|
||||
len = sipCpp->sipProtect_readData(s, a0);
|
||||
#endif
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
if (len < 0)
|
||||
{
|
||||
Py_INCREF(Py_None);
|
||||
sipRes = Py_None;
|
||||
}
|
||||
else
|
||||
{
|
||||
sipRes = SIPBytes_FromStringAndSize(s, len);
|
||||
|
||||
if (!sipRes)
|
||||
sipIsErr = 1;
|
||||
}
|
||||
|
||||
delete[] s;
|
||||
}
|
||||
%End
|
||||
|
||||
%VirtualCatcherCode
|
||||
PyObject *result = sipCallMethod(&sipIsErr, sipMethod, "n", a1);
|
||||
|
||||
if (result != NULL)
|
||||
{
|
||||
PyObject *buf;
|
||||
|
||||
sipParseResult(&sipIsErr, sipMethod, result, "O", &buf);
|
||||
|
||||
if (buf == Py_None)
|
||||
sipRes = -1L;
|
||||
else if (!SIPBytes_Check(buf))
|
||||
{
|
||||
sipBadCatcherResult(sipMethod);
|
||||
sipIsErr = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy(a0, SIPBytes_AsString(buf), SIPBytes_Size(buf));
|
||||
sipRes = SIPBytes_Size(buf);
|
||||
}
|
||||
|
||||
Py_DECREF(buf);
|
||||
Py_DECREF(result);
|
||||
}
|
||||
%End
|
||||
|
||||
virtual SIP_PYOBJECT readLineData(qint64 maxlen) /TypeHint="Py_v3:bytes;str",ReleaseGIL/ [qint64 (char *data, qint64 maxlen)];
|
||||
%MethodCode
|
||||
// Return the data read or None if there was an error.
|
||||
if (a0 < 0)
|
||||
{
|
||||
PyErr_SetString(PyExc_ValueError, "maximum length of data to be read cannot be negative");
|
||||
sipIsErr = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
char *s = new char[a0];
|
||||
qint64 len;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
#if defined(SIP_PROTECTED_IS_PUBLIC)
|
||||
len = sipSelfWasArg ? sipCpp->QIODevice::readLineData(s, a0) : sipCpp->readLineData(s, a0);
|
||||
#else
|
||||
len = sipCpp->sipProtectVirt_readLineData(sipSelfWasArg, s, a0);
|
||||
#endif
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
if (len < 0)
|
||||
{
|
||||
Py_INCREF(Py_None);
|
||||
sipRes = Py_None;
|
||||
}
|
||||
else
|
||||
{
|
||||
sipRes = SIPBytes_FromStringAndSize(s, len);
|
||||
|
||||
if (!sipRes)
|
||||
sipIsErr = 1;
|
||||
}
|
||||
|
||||
delete[] s;
|
||||
}
|
||||
%End
|
||||
|
||||
%VirtualCatcherCode
|
||||
PyObject *result = sipCallMethod(&sipIsErr, sipMethod, "n", a1);
|
||||
|
||||
if (result != NULL)
|
||||
{
|
||||
PyObject *buf;
|
||||
|
||||
sipParseResult(&sipIsErr, sipMethod, result, "O", &buf);
|
||||
|
||||
if (buf == Py_None)
|
||||
sipRes = -1L;
|
||||
else if (!SIPBytes_Check(buf))
|
||||
{
|
||||
sipBadCatcherResult(sipMethod);
|
||||
sipIsErr = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy(a0, SIPBytes_AsString(buf), SIPBytes_Size(buf));
|
||||
sipRes = SIPBytes_Size(buf);
|
||||
}
|
||||
|
||||
Py_DECREF(buf);
|
||||
Py_DECREF(result);
|
||||
}
|
||||
%End
|
||||
|
||||
virtual qint64 writeData(const char *data /Array/, qint64 len /ArraySize/) = 0;
|
||||
void setOpenMode(QIODevice::OpenMode openMode);
|
||||
void setErrorString(const QString &errorString);
|
||||
|
||||
public:
|
||||
%If (Qt_5_7_0 -)
|
||||
int readChannelCount() const;
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
int writeChannelCount() const;
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
int currentReadChannel() const;
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
void setCurrentReadChannel(int channel);
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
int currentWriteChannel() const;
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
void setCurrentWriteChannel(int channel);
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
void startTransaction();
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
void commitTransaction();
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
void rollbackTransaction();
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
bool isTransactionStarted() const;
|
||||
%End
|
||||
|
||||
signals:
|
||||
%If (Qt_5_7_0 -)
|
||||
void channelReadyRead(int channel);
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
void channelBytesWritten(int channel, qint64 bytes);
|
||||
%End
|
||||
|
||||
public:
|
||||
%If (Qt_5_10_0 -)
|
||||
qint64 skip(qint64 maxSize);
|
||||
%End
|
||||
};
|
||||
|
||||
QFlags<QIODevice::OpenModeFlag> operator|(QIODevice::OpenModeFlag f1, QFlags<QIODevice::OpenModeFlag> f2);
|
||||
@@ -0,0 +1,311 @@
|
||||
// qitemselectionmodel.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QItemSelectionRange
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qitemselectionmodel.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QItemSelectionRange();
|
||||
QItemSelectionRange(const QItemSelectionRange &other);
|
||||
QItemSelectionRange(const QModelIndex &atopLeft, const QModelIndex &abottomRight);
|
||||
explicit QItemSelectionRange(const QModelIndex &index);
|
||||
int top() const;
|
||||
int left() const;
|
||||
int bottom() const;
|
||||
int right() const;
|
||||
int width() const;
|
||||
int height() const;
|
||||
const QPersistentModelIndex &topLeft() const;
|
||||
const QPersistentModelIndex &bottomRight() const;
|
||||
QModelIndex parent() const;
|
||||
const QAbstractItemModel *model() const;
|
||||
bool contains(const QModelIndex &index) const;
|
||||
bool contains(int row, int column, const QModelIndex &parentIndex) const;
|
||||
bool intersects(const QItemSelectionRange &other) const;
|
||||
bool operator==(const QItemSelectionRange &other) const;
|
||||
bool operator!=(const QItemSelectionRange &other) const;
|
||||
bool isValid() const;
|
||||
QModelIndexList indexes() const;
|
||||
QItemSelectionRange intersected(const QItemSelectionRange &other) const;
|
||||
long __hash__() const;
|
||||
%MethodCode
|
||||
sipRes = qHash(*sipCpp);
|
||||
%End
|
||||
|
||||
bool isEmpty() const;
|
||||
bool operator<(const QItemSelectionRange &other) const;
|
||||
%If (Qt_5_6_0 -)
|
||||
void swap(QItemSelectionRange &other /Constrained/);
|
||||
%End
|
||||
};
|
||||
|
||||
class QItemSelectionModel : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qitemselectionmodel.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum SelectionFlag
|
||||
{
|
||||
NoUpdate,
|
||||
Clear,
|
||||
Select,
|
||||
Deselect,
|
||||
Toggle,
|
||||
Current,
|
||||
Rows,
|
||||
Columns,
|
||||
SelectCurrent,
|
||||
ToggleCurrent,
|
||||
ClearAndSelect,
|
||||
};
|
||||
|
||||
typedef QFlags<QItemSelectionModel::SelectionFlag> SelectionFlags;
|
||||
%If (Qt_5_5_0 -)
|
||||
explicit QItemSelectionModel(QAbstractItemModel *model /TransferThis/ = 0);
|
||||
%End
|
||||
%If (- Qt_5_5_0)
|
||||
explicit QItemSelectionModel(QAbstractItemModel *model /TransferThis/);
|
||||
%End
|
||||
QItemSelectionModel(QAbstractItemModel *model, QObject *parent /TransferThis/);
|
||||
virtual ~QItemSelectionModel();
|
||||
QModelIndex currentIndex() const;
|
||||
bool isSelected(const QModelIndex &index) const;
|
||||
%If (- Qt_5_15_0)
|
||||
bool isRowSelected(int row, const QModelIndex &parent) const;
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
bool isRowSelected(int row, const QModelIndex &parent = QModelIndex()) const;
|
||||
%End
|
||||
%If (- Qt_5_15_0)
|
||||
bool isColumnSelected(int column, const QModelIndex &parent) const;
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
bool isColumnSelected(int column, const QModelIndex &parent = QModelIndex()) const;
|
||||
%End
|
||||
%If (- Qt_5_15_0)
|
||||
bool rowIntersectsSelection(int row, const QModelIndex &parent) const;
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
bool rowIntersectsSelection(int row, const QModelIndex &parent = QModelIndex()) const;
|
||||
%End
|
||||
%If (- Qt_5_15_0)
|
||||
bool columnIntersectsSelection(int column, const QModelIndex &parent) const;
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
bool columnIntersectsSelection(int column, const QModelIndex &parent = QModelIndex()) const;
|
||||
%End
|
||||
QModelIndexList selectedIndexes() const;
|
||||
const QItemSelection selection() const;
|
||||
%If (Qt_5_5_0 -)
|
||||
QAbstractItemModel *model();
|
||||
%End
|
||||
%If (- Qt_5_5_0)
|
||||
%If (Qt_5_15_1 -)
|
||||
const QAbstractItemModel *model() const;
|
||||
%End
|
||||
%End
|
||||
|
||||
public slots:
|
||||
virtual void clear();
|
||||
void clearSelection();
|
||||
virtual void reset();
|
||||
virtual void select(const QModelIndex &index, QItemSelectionModel::SelectionFlags command);
|
||||
virtual void select(const QItemSelection &selection, QItemSelectionModel::SelectionFlags command);
|
||||
virtual void setCurrentIndex(const QModelIndex &index, QItemSelectionModel::SelectionFlags command);
|
||||
virtual void clearCurrentIndex();
|
||||
|
||||
signals:
|
||||
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
||||
void currentChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
||||
void currentRowChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
||||
void currentColumnChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
||||
|
||||
protected:
|
||||
void emitSelectionChanged(const QItemSelection &newSelection, const QItemSelection &oldSelection);
|
||||
|
||||
public:
|
||||
bool hasSelection() const;
|
||||
QModelIndexList selectedRows(int column = 0) const;
|
||||
QModelIndexList selectedColumns(int row = 0) const;
|
||||
%If (Qt_5_5_0 -)
|
||||
void setModel(QAbstractItemModel *model);
|
||||
%End
|
||||
|
||||
signals:
|
||||
%If (Qt_5_5_0 -)
|
||||
void modelChanged(QAbstractItemModel *model);
|
||||
%End
|
||||
};
|
||||
|
||||
QFlags<QItemSelectionModel::SelectionFlag> operator|(QItemSelectionModel::SelectionFlag f1, QFlags<QItemSelectionModel::SelectionFlag> f2);
|
||||
|
||||
class QItemSelection
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qitemselectionmodel.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QItemSelection();
|
||||
QItemSelection(const QModelIndex &topLeft, const QModelIndex &bottomRight);
|
||||
void select(const QModelIndex &topLeft, const QModelIndex &bottomRight);
|
||||
bool contains(const QModelIndex &index) const;
|
||||
int __contains__(const QModelIndex &index);
|
||||
%MethodCode
|
||||
// It looks like you can't assign QBool to int.
|
||||
sipRes = bool(sipCpp->contains(*a0));
|
||||
%End
|
||||
|
||||
QModelIndexList indexes() const;
|
||||
void merge(const QItemSelection &other, QItemSelectionModel::SelectionFlags command);
|
||||
static void split(const QItemSelectionRange &range, const QItemSelectionRange &other, QItemSelection *result);
|
||||
void __setitem__(int i, const QItemSelectionRange &range);
|
||||
%MethodCode
|
||||
int len;
|
||||
|
||||
len = sipCpp->count();
|
||||
|
||||
if ((a0 = (int)sipConvertFromSequenceIndex(a0, len)) < 0)
|
||||
sipIsErr = 1;
|
||||
else
|
||||
(*sipCpp)[a0] = *a1;
|
||||
%End
|
||||
|
||||
void __setitem__(SIP_PYSLICE slice, const QItemSelection &list);
|
||||
%MethodCode
|
||||
Py_ssize_t start, stop, step, slicelength;
|
||||
|
||||
if (sipConvertFromSliceObject(a0, sipCpp->count(), &start, &stop, &step, &slicelength) < 0)
|
||||
{
|
||||
sipIsErr = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
int vlen = a1->count();
|
||||
|
||||
if (vlen != slicelength)
|
||||
{
|
||||
sipBadLengthForSlice(vlen, slicelength);
|
||||
sipIsErr = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
QItemSelection::const_iterator it = a1->begin();
|
||||
|
||||
for (Py_ssize_t i = 0; i < slicelength; ++i)
|
||||
{
|
||||
(*sipCpp)[start] = *it;
|
||||
start += step;
|
||||
++it;
|
||||
}
|
||||
}
|
||||
}
|
||||
%End
|
||||
|
||||
void __delitem__(int i);
|
||||
%MethodCode
|
||||
if ((a0 = (int)sipConvertFromSequenceIndex(a0, sipCpp->count())) < 0)
|
||||
sipIsErr = 1;
|
||||
else
|
||||
sipCpp->removeAt(a0);
|
||||
%End
|
||||
|
||||
void __delitem__(SIP_PYSLICE slice);
|
||||
%MethodCode
|
||||
Py_ssize_t start, stop, step, slicelength;
|
||||
|
||||
if (sipConvertFromSliceObject(a0, sipCpp->count(), &start, &stop, &step, &slicelength) < 0)
|
||||
{
|
||||
sipIsErr = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (Py_ssize_t i = 0; i < slicelength; ++i)
|
||||
{
|
||||
sipCpp->removeAt(start);
|
||||
start += step - 1;
|
||||
}
|
||||
}
|
||||
%End
|
||||
|
||||
QItemSelectionRange operator[](int i);
|
||||
%MethodCode
|
||||
Py_ssize_t idx = sipConvertFromSequenceIndex(a0, sipCpp->count());
|
||||
|
||||
if (idx < 0)
|
||||
sipIsErr = 1;
|
||||
else
|
||||
sipRes = new QItemSelectionRange(sipCpp->operator[]((int)idx));
|
||||
%End
|
||||
|
||||
QItemSelection operator[](SIP_PYSLICE slice);
|
||||
%MethodCode
|
||||
Py_ssize_t start, stop, step, slicelength;
|
||||
|
||||
if (sipConvertFromSliceObject(a0, sipCpp->count(), &start, &stop, &step, &slicelength) < 0)
|
||||
{
|
||||
sipIsErr = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
sipRes = new QItemSelection();
|
||||
|
||||
for (Py_ssize_t i = 0; i < slicelength; ++i)
|
||||
{
|
||||
(*sipRes) += (*sipCpp)[start];
|
||||
start += step;
|
||||
}
|
||||
}
|
||||
%End
|
||||
|
||||
// Methods inherited from QList<QItemSelectionRange>.
|
||||
bool operator!=(const QItemSelection &other) const;
|
||||
bool operator==(const QItemSelection &other) const;
|
||||
|
||||
// Keep the following in sync with QStringList (except for mid()).
|
||||
void clear();
|
||||
bool isEmpty() const;
|
||||
void append(const QItemSelectionRange &range);
|
||||
void prepend(const QItemSelectionRange &range);
|
||||
void insert(int i, const QItemSelectionRange &range);
|
||||
void replace(int i, const QItemSelectionRange &range);
|
||||
void removeAt(int i);
|
||||
int removeAll(const QItemSelectionRange &range);
|
||||
QItemSelectionRange takeAt(int i);
|
||||
QItemSelectionRange takeFirst();
|
||||
QItemSelectionRange takeLast();
|
||||
void move(int from, int to);
|
||||
void swap(int i, int j);
|
||||
int count(const QItemSelectionRange &range) const;
|
||||
int count() const /__len__/;
|
||||
QItemSelectionRange &first();
|
||||
QItemSelectionRange &last();
|
||||
int indexOf(const QItemSelectionRange &value, int from = 0) const;
|
||||
int lastIndexOf(const QItemSelectionRange &value, int from = -1) const;
|
||||
QItemSelection &operator+=(const QItemSelection &other);
|
||||
QItemSelection &operator+=(const QItemSelectionRange &value);
|
||||
};
|
||||
133
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qjsonarray.sip
Normal file
133
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qjsonarray.sip
Normal file
@@ -0,0 +1,133 @@
|
||||
// This is the SIP interface definition for the QJsonArray mapped type.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
// Note that we assume any iterable can be converted to a QJsonArray. However,
|
||||
// because QJsonValue is an iterable and QJsonObject is implemented as a dict
|
||||
// (which is also an iterable), then any overloads that handle one or more of
|
||||
// them must be ordered so that QJsonArray is checked last.
|
||||
|
||||
%MappedType QJsonArray
|
||||
/TypeHintIn="Iterable[QJsonValue]", TypeHintOut="List[QJsonValue]",
|
||||
TypeHintValue="[]"/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qjsonarray.h>
|
||||
%End
|
||||
|
||||
%ConvertFromTypeCode
|
||||
PyObject *l = PyList_New(sipCpp->size());
|
||||
|
||||
if (!l)
|
||||
return 0;
|
||||
|
||||
for (int i = 0; i < sipCpp->size(); ++i)
|
||||
{
|
||||
QJsonValue *t = new QJsonValue(sipCpp->at(i));
|
||||
PyObject *tobj = sipConvertFromNewType(t, sipType_QJsonValue,
|
||||
sipTransferObj);
|
||||
|
||||
if (!tobj)
|
||||
{
|
||||
delete t;
|
||||
Py_DECREF(l);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyList_SetItem(l, i, tobj);
|
||||
}
|
||||
|
||||
return l;
|
||||
%End
|
||||
|
||||
%ConvertToTypeCode
|
||||
PyObject *iter = PyObject_GetIter(sipPy);
|
||||
|
||||
if (!sipIsErr)
|
||||
{
|
||||
PyErr_Clear();
|
||||
Py_XDECREF(iter);
|
||||
|
||||
return (iter
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
&& !PyString_Check(sipPy)
|
||||
#endif
|
||||
&& !PyUnicode_Check(sipPy));
|
||||
}
|
||||
|
||||
if (!iter)
|
||||
{
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
QJsonArray *ql = new QJsonArray;
|
||||
|
||||
for (Py_ssize_t i = 0; ; ++i)
|
||||
{
|
||||
PyErr_Clear();
|
||||
PyObject *itm = PyIter_Next(iter);
|
||||
|
||||
if (!itm)
|
||||
{
|
||||
if (PyErr_Occurred())
|
||||
{
|
||||
delete ql;
|
||||
Py_DECREF(iter);
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
int state;
|
||||
QJsonValue *t = reinterpret_cast<QJsonValue *>(
|
||||
sipForceConvertToType(itm, sipType_QJsonValue, sipTransferObj,
|
||||
SIP_NOT_NONE, &state, sipIsErr));
|
||||
|
||||
if (*sipIsErr)
|
||||
{
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"index %zd has type '%s' but 'QJsonValue' is expected", i,
|
||||
sipPyTypeName(Py_TYPE(itm)));
|
||||
|
||||
Py_DECREF(itm);
|
||||
delete ql;
|
||||
Py_DECREF(iter);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
ql->append(*t);
|
||||
|
||||
sipReleaseType(t, sipType_QJsonValue, state);
|
||||
Py_DECREF(itm);
|
||||
}
|
||||
|
||||
Py_DECREF(iter);
|
||||
|
||||
*sipCppPtr = ql;
|
||||
|
||||
return sipGetState(sipTransferObj);
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,116 @@
|
||||
// qjsondocument.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
struct QJsonParseError
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qjsondocument.h>
|
||||
%End
|
||||
|
||||
enum ParseError
|
||||
{
|
||||
NoError,
|
||||
UnterminatedObject,
|
||||
MissingNameSeparator,
|
||||
UnterminatedArray,
|
||||
MissingValueSeparator,
|
||||
IllegalValue,
|
||||
TerminationByNumber,
|
||||
IllegalNumber,
|
||||
IllegalEscapeSequence,
|
||||
IllegalUTF8String,
|
||||
UnterminatedString,
|
||||
MissingObject,
|
||||
DeepNesting,
|
||||
DocumentTooLarge,
|
||||
%If (Qt_5_4_0 -)
|
||||
GarbageAtEnd,
|
||||
%End
|
||||
};
|
||||
|
||||
QString errorString() const;
|
||||
int offset;
|
||||
QJsonParseError::ParseError error;
|
||||
};
|
||||
|
||||
class QJsonDocument
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qjsondocument.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QJsonDocument();
|
||||
explicit QJsonDocument(const QJsonObject &object);
|
||||
explicit QJsonDocument(const QJsonArray &array);
|
||||
QJsonDocument(const QJsonDocument &other);
|
||||
~QJsonDocument();
|
||||
|
||||
enum DataValidation
|
||||
{
|
||||
Validate,
|
||||
BypassValidation,
|
||||
};
|
||||
|
||||
static QJsonDocument fromRawData(const char *data /Encoding="None"/, int size, QJsonDocument::DataValidation validation = QJsonDocument::Validate);
|
||||
const char *rawData(int *size /Out/) const /Encoding="None"/;
|
||||
static QJsonDocument fromBinaryData(const QByteArray &data, QJsonDocument::DataValidation validation = QJsonDocument::Validate);
|
||||
QByteArray toBinaryData() const;
|
||||
static QJsonDocument fromVariant(const QVariant &variant);
|
||||
QVariant toVariant() const;
|
||||
|
||||
enum JsonFormat
|
||||
{
|
||||
Indented,
|
||||
Compact,
|
||||
};
|
||||
|
||||
static QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error = 0);
|
||||
QByteArray toJson() const;
|
||||
QByteArray toJson(QJsonDocument::JsonFormat format) const;
|
||||
bool isEmpty() const;
|
||||
bool isArray() const;
|
||||
bool isObject() const;
|
||||
QJsonObject object() const;
|
||||
QJsonArray array() const;
|
||||
void setObject(const QJsonObject &object);
|
||||
void setArray(const QJsonArray &array);
|
||||
bool operator==(const QJsonDocument &other) const;
|
||||
bool operator!=(const QJsonDocument &other) const;
|
||||
bool isNull() const;
|
||||
%If (Qt_5_10_0 -)
|
||||
void swap(QJsonDocument &other /Constrained/);
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
const QJsonValue operator[](const QString &key) const;
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
const QJsonValue operator[](int i) const;
|
||||
%End
|
||||
};
|
||||
|
||||
%If (Qt_5_13_0 -)
|
||||
QDataStream &operator<<(QDataStream &, const QJsonDocument & /Constrained/) /ReleaseGIL/;
|
||||
%End
|
||||
%If (Qt_5_13_0 -)
|
||||
QDataStream &operator>>(QDataStream &, QJsonDocument & /Constrained/) /ReleaseGIL/;
|
||||
%End
|
||||
136
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qjsonobject.sip
Normal file
136
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qjsonobject.sip
Normal file
@@ -0,0 +1,136 @@
|
||||
// This is the SIP interface definition for the QJsonObject mapped type.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%MappedType QJsonObject
|
||||
/TypeHint="Dict[QString, QJsonValue]", TypeHintValue="{}"/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qjsonobject.h>
|
||||
%End
|
||||
|
||||
%ConvertFromTypeCode
|
||||
PyObject *d = PyDict_New();
|
||||
|
||||
if (!d)
|
||||
return 0;
|
||||
|
||||
QJsonObject::const_iterator it = sipCpp->constBegin();
|
||||
QJsonObject::const_iterator end = sipCpp->constEnd();
|
||||
|
||||
while (it != end)
|
||||
{
|
||||
QString *k = new QString(it.key());
|
||||
PyObject *kobj = sipConvertFromNewType(k, sipType_QString,
|
||||
sipTransferObj);
|
||||
|
||||
if (!kobj)
|
||||
{
|
||||
delete k;
|
||||
Py_DECREF(d);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
QJsonValue *v = new QJsonValue(it.value());
|
||||
PyObject *vobj = sipConvertFromNewType(v, sipType_QJsonValue,
|
||||
sipTransferObj);
|
||||
|
||||
if (!vobj)
|
||||
{
|
||||
delete v;
|
||||
Py_DECREF(kobj);
|
||||
Py_DECREF(d);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int rc = PyDict_SetItem(d, kobj, vobj);
|
||||
|
||||
Py_DECREF(vobj);
|
||||
Py_DECREF(kobj);
|
||||
|
||||
if (rc < 0)
|
||||
{
|
||||
Py_DECREF(d);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
++it;
|
||||
}
|
||||
|
||||
return d;
|
||||
%End
|
||||
|
||||
%ConvertToTypeCode
|
||||
if (!sipIsErr)
|
||||
return PyDict_Check(sipPy);
|
||||
|
||||
QJsonObject *jo = new QJsonObject;
|
||||
|
||||
Py_ssize_t pos = 0;
|
||||
PyObject *kobj, *vobj;
|
||||
|
||||
while (PyDict_Next(sipPy, &pos, &kobj, &vobj))
|
||||
{
|
||||
int kstate;
|
||||
QString *k = reinterpret_cast<QString *>(
|
||||
sipForceConvertToType(kobj, sipType_QString, sipTransferObj,
|
||||
SIP_NOT_NONE, &kstate, sipIsErr));
|
||||
|
||||
if (*sipIsErr)
|
||||
{
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"a key has type '%s' but 'str' is expected",
|
||||
sipPyTypeName(Py_TYPE(kobj)));
|
||||
|
||||
delete jo;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int vstate;
|
||||
QJsonValue *v = reinterpret_cast<QJsonValue *>(
|
||||
sipForceConvertToType(vobj, sipType_QJsonValue, sipTransferObj,
|
||||
SIP_NOT_NONE, &vstate, sipIsErr));
|
||||
|
||||
if (*sipIsErr)
|
||||
{
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"a value has type '%s' but 'QJsonValue' is expected",
|
||||
sipPyTypeName(Py_TYPE(vobj)));
|
||||
|
||||
sipReleaseType(k, sipType_QString, kstate);
|
||||
delete jo;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
jo->insert(*k, *v);
|
||||
|
||||
sipReleaseType(v, sipType_QJsonValue, vstate);
|
||||
sipReleaseType(k, sipType_QString, kstate);
|
||||
}
|
||||
|
||||
*sipCppPtr = jo;
|
||||
|
||||
return sipGetState(sipTransferObj);
|
||||
%End
|
||||
};
|
||||
102
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qjsonvalue.sip
Normal file
102
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qjsonvalue.sip
Normal file
@@ -0,0 +1,102 @@
|
||||
// qjsonvalue.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QJsonValue /AllowNone,TypeHintIn="Union[QJsonValue, QJsonValue.Type, QJsonArray, QJsonObject, bool, int, float, None, QString]"/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qjsonvalue.h>
|
||||
%End
|
||||
|
||||
%ConvertToTypeCode
|
||||
if (!sipIsErr)
|
||||
return qpycore_canConvertTo_QJsonValue(sipPy);
|
||||
|
||||
return qpycore_convertTo_QJsonValue(sipPy, sipTransferObj, sipCppPtr, sipIsErr);
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Type
|
||||
{
|
||||
Null,
|
||||
Bool,
|
||||
Double,
|
||||
String,
|
||||
Array,
|
||||
Object,
|
||||
Undefined,
|
||||
};
|
||||
|
||||
QJsonValue(QJsonValue::Type type /Constrained/ = QJsonValue::Null);
|
||||
QJsonValue(const QJsonValue &other);
|
||||
~QJsonValue();
|
||||
static QJsonValue fromVariant(const QVariant &variant);
|
||||
QVariant toVariant() const;
|
||||
QJsonValue::Type type() const;
|
||||
bool isNull() const;
|
||||
bool isBool() const;
|
||||
bool isDouble() const;
|
||||
bool isString() const;
|
||||
bool isArray() const;
|
||||
bool isObject() const;
|
||||
bool isUndefined() const;
|
||||
bool toBool(bool defaultValue = false) const;
|
||||
int toInt(int defaultValue = 0) const;
|
||||
double toDouble(double defaultValue = 0) const;
|
||||
QJsonArray toArray() const;
|
||||
QJsonArray toArray(const QJsonArray &defaultValue) const;
|
||||
QJsonObject toObject() const;
|
||||
QJsonObject toObject(const QJsonObject &defaultValue) const;
|
||||
bool operator==(const QJsonValue &other) const;
|
||||
bool operator!=(const QJsonValue &other) const;
|
||||
%If (Qt_5_7_0 -)
|
||||
QString toString() const;
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
QString toString(const QString &defaultValue) const;
|
||||
%End
|
||||
%If (- Qt_5_7_0)
|
||||
QString toString(const QString &defaultValue = QString()) const;
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
void swap(QJsonValue &other /Constrained/);
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
const QJsonValue operator[](const QString &key) const;
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
const QJsonValue operator[](int i) const;
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
long __hash__() const;
|
||||
%MethodCode
|
||||
sipRes = qHash(*sipCpp);
|
||||
%End
|
||||
|
||||
%End
|
||||
};
|
||||
|
||||
%If (Qt_5_13_0 -)
|
||||
QDataStream &operator<<(QDataStream &, const QJsonValue & /Constrained/) /ReleaseGIL/;
|
||||
%End
|
||||
%If (Qt_5_13_0 -)
|
||||
QDataStream &operator>>(QDataStream &, QJsonValue & /Constrained/) /ReleaseGIL/;
|
||||
%End
|
||||
@@ -0,0 +1,64 @@
|
||||
// qlibrary.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QLibrary : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlibrary.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum LoadHint
|
||||
{
|
||||
ResolveAllSymbolsHint,
|
||||
ExportExternalSymbolsHint,
|
||||
LoadArchiveMemberHint,
|
||||
PreventUnloadHint,
|
||||
%If (Qt_5_5_0 -)
|
||||
DeepBindHint,
|
||||
%End
|
||||
};
|
||||
|
||||
typedef QFlags<QLibrary::LoadHint> LoadHints;
|
||||
explicit QLibrary(QObject *parent /TransferThis/ = 0);
|
||||
QLibrary(const QString &fileName, QObject *parent /TransferThis/ = 0);
|
||||
QLibrary(const QString &fileName, int verNum, QObject *parent /TransferThis/ = 0);
|
||||
QLibrary(const QString &fileName, const QString &version, QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QLibrary();
|
||||
QString errorString() const;
|
||||
QString fileName() const;
|
||||
bool isLoaded() const;
|
||||
bool load();
|
||||
QLibrary::LoadHints loadHints() const;
|
||||
QFunctionPointer resolve(const char *symbol);
|
||||
static QFunctionPointer resolve(const QString &fileName, const char *symbol);
|
||||
static QFunctionPointer resolve(const QString &fileName, int verNum, const char *symbol);
|
||||
static QFunctionPointer resolve(const QString &fileName, const QString &version, const char *symbol);
|
||||
bool unload();
|
||||
static bool isLibrary(const QString &fileName);
|
||||
void setFileName(const QString &fileName);
|
||||
void setFileNameAndVersion(const QString &fileName, int verNum);
|
||||
void setFileNameAndVersion(const QString &fileName, const QString &version);
|
||||
void setLoadHints(QLibrary::LoadHints hints);
|
||||
};
|
||||
|
||||
QFlags<QLibrary::LoadHint> operator|(QLibrary::LoadHint f1, QFlags<QLibrary::LoadHint> f2);
|
||||
@@ -0,0 +1,61 @@
|
||||
// qlibraryinfo.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QLibraryInfo
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlibraryinfo.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
static QString licensee();
|
||||
static QString licensedProducts();
|
||||
|
||||
enum LibraryLocation
|
||||
{
|
||||
PrefixPath,
|
||||
DocumentationPath,
|
||||
HeadersPath,
|
||||
LibrariesPath,
|
||||
BinariesPath,
|
||||
PluginsPath,
|
||||
DataPath,
|
||||
TranslationsPath,
|
||||
SettingsPath,
|
||||
ExamplesPath,
|
||||
ImportsPath,
|
||||
TestsPath,
|
||||
LibraryExecutablesPath,
|
||||
Qml2ImportsPath,
|
||||
ArchDataPath,
|
||||
};
|
||||
|
||||
static QString location(QLibraryInfo::LibraryLocation) /ReleaseGIL/;
|
||||
static QDate buildDate();
|
||||
static bool isDebugBuild();
|
||||
%If (Qt_5_8_0 -)
|
||||
static QVersionNumber version();
|
||||
%End
|
||||
|
||||
private:
|
||||
QLibraryInfo();
|
||||
};
|
||||
203
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qline.sip
Normal file
203
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qline.sip
Normal file
@@ -0,0 +1,203 @@
|
||||
// qline.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QLine
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qline.h>
|
||||
%End
|
||||
|
||||
%PickleCode
|
||||
sipRes = Py_BuildValue((char *)"iiii", sipCpp->x1(), sipCpp->y1(), sipCpp->x2(), sipCpp->y2());
|
||||
%End
|
||||
|
||||
public:
|
||||
bool operator!=(const QLine &d) const;
|
||||
QLine();
|
||||
QLine(const QPoint &pt1_, const QPoint &pt2_);
|
||||
QLine(int x1pos, int y1pos, int x2pos, int y2pos);
|
||||
SIP_PYOBJECT __repr__() const /TypeHint="str"/;
|
||||
%MethodCode
|
||||
if (sipCpp->isNull())
|
||||
{
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
sipRes = PyUnicode_FromString("PyQt5.QtCore.QLine()");
|
||||
#else
|
||||
sipRes = PyString_FromString("PyQt5.QtCore.QLine()");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
sipRes =
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
PyUnicode_FromFormat
|
||||
#else
|
||||
PyString_FromFormat
|
||||
#endif
|
||||
("PyQt5.QtCore.QLine(%i, %i, %i, %i)",
|
||||
sipCpp->x1(), sipCpp->y1(), sipCpp->x2(), sipCpp->y2());
|
||||
}
|
||||
%End
|
||||
|
||||
bool isNull() const;
|
||||
int __bool__() const;
|
||||
%MethodCode
|
||||
sipRes = !sipCpp->isNull();
|
||||
%End
|
||||
|
||||
int x1() const;
|
||||
int y1() const;
|
||||
int x2() const;
|
||||
int y2() const;
|
||||
QPoint p1() const;
|
||||
QPoint p2() const;
|
||||
int dx() const;
|
||||
int dy() const;
|
||||
void translate(const QPoint &point);
|
||||
void translate(int adx, int ady);
|
||||
bool operator==(const QLine &d) const;
|
||||
QLine translated(const QPoint &p) const;
|
||||
QLine translated(int adx, int ady) const;
|
||||
void setP1(const QPoint &aP1);
|
||||
void setP2(const QPoint &aP2);
|
||||
void setPoints(const QPoint &aP1, const QPoint &aP2);
|
||||
void setLine(int aX1, int aY1, int aX2, int aY2);
|
||||
%If (Qt_5_8_0 -)
|
||||
QPoint center() const;
|
||||
%End
|
||||
};
|
||||
|
||||
QDataStream &operator<<(QDataStream &, const QLine & /Constrained/) /ReleaseGIL/;
|
||||
QDataStream &operator>>(QDataStream &, QLine & /Constrained/) /ReleaseGIL/;
|
||||
|
||||
class QLineF
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qline.h>
|
||||
%End
|
||||
|
||||
%PickleCode
|
||||
sipRes = Py_BuildValue((char *)"dddd", sipCpp->x1(), sipCpp->y1(), sipCpp->x2(), sipCpp->y2());
|
||||
%End
|
||||
|
||||
public:
|
||||
enum IntersectType
|
||||
{
|
||||
NoIntersection,
|
||||
BoundedIntersection,
|
||||
UnboundedIntersection,
|
||||
};
|
||||
|
||||
QLineF(const QLine &line);
|
||||
bool isNull() const;
|
||||
int __bool__() const;
|
||||
%MethodCode
|
||||
sipRes = !sipCpp->isNull();
|
||||
%End
|
||||
|
||||
qreal length() const;
|
||||
QLineF unitVector() const;
|
||||
QLineF::IntersectType intersect(const QLineF &l, QPointF *intersectionPoint) const;
|
||||
%If (Qt_5_14_0 -)
|
||||
typedef QLineF::IntersectType IntersectionType;
|
||||
%End
|
||||
%If (Qt_5_14_0 -)
|
||||
QLineF::IntersectionType intersects(const QLineF &l, QPointF *intersectionPoint /Out/) const;
|
||||
%End
|
||||
bool operator!=(const QLineF &d) const;
|
||||
QLineF();
|
||||
QLineF(const QPointF &apt1, const QPointF &apt2);
|
||||
QLineF(qreal x1pos, qreal y1pos, qreal x2pos, qreal y2pos);
|
||||
SIP_PYOBJECT __repr__() const /TypeHint="str"/;
|
||||
%MethodCode
|
||||
if (sipCpp->isNull())
|
||||
{
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
sipRes = PyUnicode_FromString("PyQt5.QtCore.QLineF()");
|
||||
#else
|
||||
sipRes = PyString_FromString("PyQt5.QtCore.QLineF()");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
PyObject *x1 = PyFloat_FromDouble(sipCpp->x1());
|
||||
PyObject *y1 = PyFloat_FromDouble(sipCpp->y1());
|
||||
PyObject *x2 = PyFloat_FromDouble(sipCpp->x2());
|
||||
PyObject *y2 = PyFloat_FromDouble(sipCpp->y2());
|
||||
|
||||
if (x1 && y1 && x2 && y2)
|
||||
{
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
sipRes = PyUnicode_FromFormat("PyQt5.QtCore.QLineF(%R, %R, %R, %R)",
|
||||
x1, y1, x2, y2);
|
||||
#else
|
||||
sipRes = PyString_FromString("PyQt5.QtCore.QLineF(");
|
||||
PyString_ConcatAndDel(&sipRes, PyObject_Repr(x1));
|
||||
PyString_ConcatAndDel(&sipRes, PyString_FromString(", "));
|
||||
PyString_ConcatAndDel(&sipRes, PyObject_Repr(y1));
|
||||
PyString_ConcatAndDel(&sipRes, PyString_FromString(", "));
|
||||
PyString_ConcatAndDel(&sipRes, PyObject_Repr(x2));
|
||||
PyString_ConcatAndDel(&sipRes, PyString_FromString(", "));
|
||||
PyString_ConcatAndDel(&sipRes, PyObject_Repr(y2));
|
||||
PyString_ConcatAndDel(&sipRes, PyString_FromString(")"));
|
||||
#endif
|
||||
}
|
||||
|
||||
Py_XDECREF(x1);
|
||||
Py_XDECREF(y1);
|
||||
Py_XDECREF(x2);
|
||||
Py_XDECREF(y2);
|
||||
}
|
||||
%End
|
||||
|
||||
qreal x1() const;
|
||||
qreal y1() const;
|
||||
qreal x2() const;
|
||||
qreal y2() const;
|
||||
QPointF p1() const;
|
||||
QPointF p2() const;
|
||||
qreal dx() const;
|
||||
qreal dy() const;
|
||||
QLineF normalVector() const;
|
||||
void translate(const QPointF &point);
|
||||
void translate(qreal adx, qreal ady);
|
||||
void setLength(qreal len);
|
||||
QPointF pointAt(qreal t) const;
|
||||
QLine toLine() const;
|
||||
bool operator==(const QLineF &d) const;
|
||||
static QLineF fromPolar(qreal length, qreal angle);
|
||||
qreal angle() const;
|
||||
void setAngle(qreal angle);
|
||||
qreal angleTo(const QLineF &l) const;
|
||||
QLineF translated(const QPointF &p) const;
|
||||
QLineF translated(qreal adx, qreal ady) const;
|
||||
void setP1(const QPointF &aP1);
|
||||
void setP2(const QPointF &aP2);
|
||||
void setPoints(const QPointF &aP1, const QPointF &aP2);
|
||||
void setLine(qreal aX1, qreal aY1, qreal aX2, qreal aY2);
|
||||
%If (Qt_5_8_0 -)
|
||||
QPointF center() const;
|
||||
%End
|
||||
};
|
||||
|
||||
QDataStream &operator<<(QDataStream &, const QLineF & /Constrained/) /ReleaseGIL/;
|
||||
QDataStream &operator>>(QDataStream &, QLineF & /Constrained/) /ReleaseGIL/;
|
||||
1622
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qlocale.sip
Normal file
1622
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qlocale.sip
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,57 @@
|
||||
// qlockfile.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_1_0 -)
|
||||
|
||||
class QLockFile
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlockfile.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QLockFile(const QString &fileName);
|
||||
~QLockFile();
|
||||
bool lock() /ReleaseGIL/;
|
||||
bool tryLock(int timeout = 0) /ReleaseGIL/;
|
||||
void unlock() /ReleaseGIL/;
|
||||
void setStaleLockTime(int);
|
||||
int staleLockTime() const;
|
||||
bool isLocked() const /ReleaseGIL/;
|
||||
bool getLockInfo(qint64 *pid /Out/, QString *hostname /Out/, QString *appname /Out/) const;
|
||||
bool removeStaleLockFile() /ReleaseGIL/;
|
||||
|
||||
enum LockError
|
||||
{
|
||||
NoError,
|
||||
LockFailedError,
|
||||
PermissionError,
|
||||
UnknownError,
|
||||
};
|
||||
|
||||
QLockFile::LockError error() const;
|
||||
|
||||
private:
|
||||
QLockFile(const QLockFile &);
|
||||
};
|
||||
|
||||
%End
|
||||
217
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qlogging.sip
Normal file
217
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qlogging.sip
Normal file
@@ -0,0 +1,217 @@
|
||||
// qlogging.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%ModuleCode
|
||||
#include <qlogging.h>
|
||||
%End
|
||||
|
||||
enum QtMsgType
|
||||
{
|
||||
QtDebugMsg,
|
||||
QtWarningMsg,
|
||||
QtCriticalMsg,
|
||||
QtFatalMsg,
|
||||
QtSystemMsg,
|
||||
%If (Qt_5_5_0 -)
|
||||
QtInfoMsg,
|
||||
%End
|
||||
};
|
||||
|
||||
class QMessageLogContext /NoDefaultCtors/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlogging.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
int line;
|
||||
const char *file;
|
||||
const char *function;
|
||||
const char *category;
|
||||
};
|
||||
|
||||
class QMessageLogger
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlogging.h>
|
||||
%End
|
||||
|
||||
QMessageLogger(const QMessageLogger &);
|
||||
|
||||
public:
|
||||
QMessageLogger();
|
||||
QMessageLogger(const char *file, int line, const char *function);
|
||||
QMessageLogger(const char *file, int line, const char *function, const char *category);
|
||||
void debug(const char *msg) const /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp->debug("%s", a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void warning(const char *msg) const /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp->warning("%s", a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void critical(const char *msg) const /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp->critical("%s", a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void fatal(const char *msg) const /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp->fatal("%s", a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
%If (Qt_5_5_0 -)
|
||||
void info(const char *msg) const /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp->info("%s", a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
%End
|
||||
};
|
||||
|
||||
void qCritical(const char *msg) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
const char *file, *function;
|
||||
int line = qpycore_current_context(&file, &function);
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
QMessageLogger(file, line, function).critical("%s", a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void qDebug(const char *msg) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
const char *file, *function;
|
||||
int line = qpycore_current_context(&file, &function);
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
QMessageLogger(file, line, function).debug("%s", a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void qErrnoWarning(int code, const char *msg) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
qErrnoWarning(a0, "%s", a1);
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void qErrnoWarning(const char *msg) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
qErrnoWarning("%s", a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
void qFatal(const char *msg) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
const char *file, *function;
|
||||
int line = qpycore_current_context(&file, &function);
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
QMessageLogger(file, line, function).fatal("%s", a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
%If (Qt_5_5_0 -)
|
||||
void qInfo(const char *msg) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
const char *file, *function;
|
||||
int line = qpycore_current_context(&file, &function);
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
QMessageLogger(file, line, function).info("%s", a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
%End
|
||||
void qWarning(const char *msg) /ReleaseGIL/;
|
||||
%MethodCode
|
||||
const char *file, *function;
|
||||
int line = qpycore_current_context(&file, &function);
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
QMessageLogger(file, line, function).warning("%s", a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
SIP_PYCALLABLE qInstallMessageHandler(SIP_PYCALLABLE /AllowNone,TypeHint="Optional[Callable[[QtMsgType, QMessageLogContext, QString], None]]"/) /TypeHint="Optional[Callable[[QtMsgType, QMessageLogContext, QString], None]]"/;
|
||||
%MethodCode
|
||||
// Treat None as the default handler.
|
||||
QtMessageHandler old = qInstallMessageHandler((a0 != Py_None) ? qtcore_MessageHandler : 0);
|
||||
|
||||
// If we recognise the old handler, then return it. Otherwise return
|
||||
// the default handler. This doesn't exactly mimic the Qt behaviour
|
||||
// but it is probably close enough for the way it will be used.
|
||||
sipRes = (old == qtcore_MessageHandler) ? qtcore_PyMessageHandler : Py_None;
|
||||
Py_INCREF(sipRes);
|
||||
|
||||
// Save the new Python handler.
|
||||
Py_XDECREF(qtcore_PyMessageHandler);
|
||||
qtcore_PyMessageHandler = a0;
|
||||
Py_INCREF(qtcore_PyMessageHandler);
|
||||
%End
|
||||
|
||||
// Module code needed by qInstallMessageHandler().
|
||||
%ModuleCode
|
||||
// The user supplied Python handler.
|
||||
static PyObject *qtcore_PyMessageHandler = 0;
|
||||
|
||||
// The C++ wrapper around the Python handler.
|
||||
static void qtcore_MessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg)
|
||||
{
|
||||
PyObject *res;
|
||||
|
||||
SIP_BLOCK_THREADS
|
||||
|
||||
res = sipCallMethod(0, qtcore_PyMessageHandler, "FDD", type, sipType_QtMsgType, &context, sipType_QMessageLogContext, NULL, &msg, sipType_QString, NULL);
|
||||
|
||||
Py_XDECREF(res);
|
||||
|
||||
if (res != NULL && res != Py_None)
|
||||
{
|
||||
PyErr_SetString(PyExc_TypeError, "invalid result type from PyQt message handler");
|
||||
res = NULL;
|
||||
}
|
||||
|
||||
if (res == NULL)
|
||||
pyqt5_err_print();
|
||||
|
||||
SIP_UNBLOCK_THREADS
|
||||
}
|
||||
%End
|
||||
void qSetMessagePattern(const QString &messagePattern);
|
||||
%If (Qt_5_4_0 -)
|
||||
QString qFormatLogMessage(QtMsgType type, const QMessageLogContext &context, const QString &buf);
|
||||
%End
|
||||
@@ -0,0 +1,50 @@
|
||||
// qloggingcategory.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
class QLoggingCategory
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qloggingcategory.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QLoggingCategory(const char *category);
|
||||
QLoggingCategory(const char *category, QtMsgType severityLevel);
|
||||
~QLoggingCategory();
|
||||
bool isEnabled(QtMsgType type) const;
|
||||
void setEnabled(QtMsgType type, bool enable);
|
||||
bool isDebugEnabled() const;
|
||||
bool isInfoEnabled() const;
|
||||
bool isWarningEnabled() const;
|
||||
bool isCriticalEnabled() const;
|
||||
const char *categoryName() const;
|
||||
QLoggingCategory &operator()();
|
||||
static QLoggingCategory *defaultCategory();
|
||||
static void setFilterRules(const QString &rules);
|
||||
|
||||
private:
|
||||
QLoggingCategory(const QLoggingCategory &);
|
||||
};
|
||||
|
||||
%End
|
||||
182
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qmargins.sip
Normal file
182
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qmargins.sip
Normal file
@@ -0,0 +1,182 @@
|
||||
// qmargins.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QMargins
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmargins.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QMargins();
|
||||
QMargins(int aleft, int atop, int aright, int abottom);
|
||||
bool isNull() const;
|
||||
int left() const;
|
||||
int top() const;
|
||||
int right() const;
|
||||
int bottom() const;
|
||||
void setLeft(int aleft);
|
||||
void setTop(int atop);
|
||||
void setRight(int aright);
|
||||
void setBottom(int abottom);
|
||||
%If (Qt_5_1_0 -)
|
||||
QMargins &operator+=(const QMargins &margins);
|
||||
%End
|
||||
%If (Qt_5_1_0 -)
|
||||
QMargins &operator-=(const QMargins &margins);
|
||||
%End
|
||||
%If (Qt_5_1_0 -)
|
||||
QMargins &operator*=(int factor /Constrained/);
|
||||
%End
|
||||
%If (Qt_5_1_0 -)
|
||||
QMargins &operator/=(int divisor /Constrained/);
|
||||
%End
|
||||
%If (Qt_5_1_0 -)
|
||||
QMargins &operator*=(qreal factor);
|
||||
%End
|
||||
%If (Qt_5_1_0 -)
|
||||
QMargins &operator/=(qreal divisor);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
QMargins &operator+=(int margin);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
QMargins &operator-=(int margin);
|
||||
%End
|
||||
};
|
||||
|
||||
bool operator==(const QMargins &m1, const QMargins &m2);
|
||||
bool operator!=(const QMargins &m1, const QMargins &m2);
|
||||
QDataStream &operator<<(QDataStream &, const QMargins & /Constrained/) /ReleaseGIL/;
|
||||
QDataStream &operator>>(QDataStream &, QMargins & /Constrained/) /ReleaseGIL/;
|
||||
%If (Qt_5_1_0 - Qt_5_3_0)
|
||||
QRect operator+(const QRect &rectangle, const QMargins &margins);
|
||||
%End
|
||||
%If (Qt_5_1_0 - Qt_5_3_0)
|
||||
QRect operator+(const QMargins &margins, const QRect &rectangle);
|
||||
%End
|
||||
%If (Qt_5_1_0 -)
|
||||
QMargins operator+(const QMargins &m1, const QMargins &m2);
|
||||
%End
|
||||
%If (Qt_5_1_0 -)
|
||||
QMargins operator-(const QMargins &m1, const QMargins &m2);
|
||||
%End
|
||||
%If (Qt_5_1_0 -)
|
||||
QMargins operator*(const QMargins &margins, int factor /Constrained/);
|
||||
%End
|
||||
%If (Qt_5_1_0 -)
|
||||
QMargins operator*(const QMargins &margins, qreal factor);
|
||||
%End
|
||||
%If (Qt_5_1_0 -)
|
||||
QMargins operator/(const QMargins &margins, int divisor /Constrained/);
|
||||
%End
|
||||
%If (Qt_5_1_0 -)
|
||||
QMargins operator/(const QMargins &margins, qreal divisor);
|
||||
%End
|
||||
%If (Qt_5_1_0 -)
|
||||
QMargins operator-(const QMargins &margins);
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
QMargins operator+(const QMargins &lhs, int rhs);
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
QMargins operator+(int lhs, const QMargins &rhs);
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
QMargins operator-(const QMargins &lhs, int rhs);
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
QMargins operator+(const QMargins &margins);
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
|
||||
class QMarginsF
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmargins.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QMarginsF();
|
||||
QMarginsF(qreal aleft, qreal atop, qreal aright, qreal abottom);
|
||||
QMarginsF(const QMargins &margins);
|
||||
bool isNull() const;
|
||||
qreal left() const;
|
||||
qreal top() const;
|
||||
qreal right() const;
|
||||
qreal bottom() const;
|
||||
void setLeft(qreal aleft);
|
||||
void setTop(qreal atop);
|
||||
void setRight(qreal aright);
|
||||
void setBottom(qreal abottom);
|
||||
QMarginsF &operator+=(const QMarginsF &margins);
|
||||
QMarginsF &operator-=(const QMarginsF &margins);
|
||||
QMarginsF &operator+=(qreal addend);
|
||||
QMarginsF &operator-=(qreal subtrahend);
|
||||
QMarginsF &operator*=(qreal factor);
|
||||
QMarginsF &operator/=(qreal divisor);
|
||||
QMargins toMargins() const;
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
QDataStream &operator<<(QDataStream &, const QMarginsF & /Constrained/);
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
QDataStream &operator>>(QDataStream &, QMarginsF & /Constrained/);
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
bool operator==(const QMarginsF &lhs, const QMarginsF &rhs);
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
bool operator!=(const QMarginsF &lhs, const QMarginsF &rhs);
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
QMarginsF operator+(const QMarginsF &lhs, const QMarginsF &rhs);
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
QMarginsF operator-(const QMarginsF &lhs, const QMarginsF &rhs);
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
QMarginsF operator+(const QMarginsF &lhs, qreal rhs);
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
QMarginsF operator+(qreal lhs, const QMarginsF &rhs);
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
QMarginsF operator-(const QMarginsF &lhs, qreal rhs);
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
QMarginsF operator*(const QMarginsF &lhs, qreal rhs);
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
QMarginsF operator*(qreal lhs, const QMarginsF &rhs);
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
QMarginsF operator/(const QMarginsF &lhs, qreal divisor);
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
QMarginsF operator+(const QMarginsF &margins);
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
QMarginsF operator-(const QMarginsF &margins);
|
||||
%End
|
||||
@@ -0,0 +1,46 @@
|
||||
// qmessageauthenticationcode.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
%If (Qt_5_1_0 -)
|
||||
|
||||
class QMessageAuthenticationCode
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmessageauthenticationcode.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QMessageAuthenticationCode(QCryptographicHash::Algorithm method, const QByteArray &key = QByteArray());
|
||||
~QMessageAuthenticationCode();
|
||||
void reset();
|
||||
void setKey(const QByteArray &key);
|
||||
void addData(const char *data, int length);
|
||||
void addData(const QByteArray &data);
|
||||
bool addData(QIODevice *device);
|
||||
QByteArray result() const;
|
||||
static QByteArray hash(const QByteArray &message, const QByteArray &key, QCryptographicHash::Algorithm method);
|
||||
|
||||
private:
|
||||
QMessageAuthenticationCode(const QMessageAuthenticationCode &);
|
||||
};
|
||||
|
||||
%End
|
||||
220
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qmetaobject.sip
Normal file
220
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qmetaobject.sip
Normal file
@@ -0,0 +1,220 @@
|
||||
// qmetaobject.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QMetaMethod
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmetaobject.h>
|
||||
%End
|
||||
|
||||
%TypeCode
|
||||
// Raise an exception when QMetaMethod::invoke() returns false.
|
||||
static void qtcore_invoke_exception()
|
||||
{
|
||||
PyErr_SetString(PyExc_RuntimeError, "QMetaMethod.invoke() call failed");
|
||||
}
|
||||
%End
|
||||
|
||||
public:
|
||||
QMetaMethod();
|
||||
const char *typeName() const;
|
||||
QList<QByteArray> parameterTypes() const;
|
||||
QList<QByteArray> parameterNames() const;
|
||||
const char *tag() const;
|
||||
|
||||
enum Access
|
||||
{
|
||||
Private,
|
||||
Protected,
|
||||
Public,
|
||||
};
|
||||
|
||||
QMetaMethod::Access access() const;
|
||||
|
||||
enum MethodType
|
||||
{
|
||||
Method,
|
||||
Signal,
|
||||
Slot,
|
||||
Constructor,
|
||||
};
|
||||
|
||||
QMetaMethod::MethodType methodType() const;
|
||||
SIP_PYOBJECT invoke(QObject *object, Qt::ConnectionType connectionType, QGenericReturnArgument returnValue /GetWrapper/, QGenericArgument value0 = QGenericArgument(0u, 0u), QGenericArgument value1 = QGenericArgument(0u, 0u), QGenericArgument value2 = QGenericArgument(0u, 0u), QGenericArgument value3 = QGenericArgument(0u, 0u), QGenericArgument value4 = QGenericArgument(0u, 0u), QGenericArgument value5 = QGenericArgument(0u, 0u), QGenericArgument value6 = QGenericArgument(0u, 0u), QGenericArgument value7 = QGenericArgument(0u, 0u), QGenericArgument value8 = QGenericArgument(0u, 0u), QGenericArgument value9 = QGenericArgument(0u, 0u)) const;
|
||||
%MethodCode
|
||||
// Raise an exception if the call failed.
|
||||
bool ok;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
ok = sipCpp->invoke(a0, a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8, *a9, *a10, *a11,
|
||||
*a12);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
if (ok)
|
||||
sipRes = qpycore_ReturnValue(a2Wrapper);
|
||||
else
|
||||
qtcore_invoke_exception();
|
||||
%End
|
||||
|
||||
SIP_PYOBJECT invoke(QObject *object, QGenericReturnArgument returnValue /GetWrapper/, QGenericArgument value0 = QGenericArgument(0u, 0u), QGenericArgument value1 = QGenericArgument(0u, 0u), QGenericArgument value2 = QGenericArgument(0u, 0u), QGenericArgument value3 = QGenericArgument(0u, 0u), QGenericArgument value4 = QGenericArgument(0u, 0u), QGenericArgument value5 = QGenericArgument(0u, 0u), QGenericArgument value6 = QGenericArgument(0u, 0u), QGenericArgument value7 = QGenericArgument(0u, 0u), QGenericArgument value8 = QGenericArgument(0u, 0u), QGenericArgument value9 = QGenericArgument(0u, 0u)) const;
|
||||
%MethodCode
|
||||
// Raise an exception if the call failed.
|
||||
bool ok;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
ok = sipCpp->invoke(a0, *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8, *a9, *a10,
|
||||
*a11);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
if (ok)
|
||||
sipRes = qpycore_ReturnValue(a1Wrapper);
|
||||
else
|
||||
qtcore_invoke_exception();
|
||||
%End
|
||||
|
||||
SIP_PYOBJECT invoke(QObject *object, Qt::ConnectionType connectionType, QGenericArgument value0 = QGenericArgument(0u, 0u), QGenericArgument value1 = QGenericArgument(0u, 0u), QGenericArgument value2 = QGenericArgument(0u, 0u), QGenericArgument value3 = QGenericArgument(0u, 0u), QGenericArgument value4 = QGenericArgument(0u, 0u), QGenericArgument value5 = QGenericArgument(0u, 0u), QGenericArgument value6 = QGenericArgument(0u, 0u), QGenericArgument value7 = QGenericArgument(0u, 0u), QGenericArgument value8 = QGenericArgument(0u, 0u), QGenericArgument value9 = QGenericArgument(0u, 0u)) const;
|
||||
%MethodCode
|
||||
// Raise an exception if the call failed.
|
||||
bool ok;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
ok = sipCpp->invoke(a0, a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8, *a9, *a10, *a11);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
if (ok)
|
||||
{
|
||||
Py_INCREF(Py_None);
|
||||
sipRes = Py_None;
|
||||
}
|
||||
else
|
||||
qtcore_invoke_exception();
|
||||
%End
|
||||
|
||||
SIP_PYOBJECT invoke(QObject *object, QGenericArgument value0 = QGenericArgument(0u, 0u), QGenericArgument value1 = QGenericArgument(0u, 0u), QGenericArgument value2 = QGenericArgument(0u, 0u), QGenericArgument value3 = QGenericArgument(0u, 0u), QGenericArgument value4 = QGenericArgument(0u, 0u), QGenericArgument value5 = QGenericArgument(0u, 0u), QGenericArgument value6 = QGenericArgument(0u, 0u), QGenericArgument value7 = QGenericArgument(0u, 0u), QGenericArgument value8 = QGenericArgument(0u, 0u), QGenericArgument value9 = QGenericArgument(0u, 0u)) const;
|
||||
%MethodCode
|
||||
// Raise an exception if the call failed.
|
||||
bool ok;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
ok = sipCpp->invoke(a0, *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8, *a9, *a10);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
if (ok)
|
||||
{
|
||||
Py_INCREF(Py_None);
|
||||
sipRes = Py_None;
|
||||
}
|
||||
else
|
||||
qtcore_invoke_exception();
|
||||
%End
|
||||
|
||||
int methodIndex() const;
|
||||
bool isValid() const;
|
||||
QByteArray methodSignature() const;
|
||||
QByteArray name() const;
|
||||
int returnType() const;
|
||||
int parameterCount() const;
|
||||
int parameterType(int index) const;
|
||||
};
|
||||
|
||||
class QMetaEnum
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmetaobject.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QMetaEnum();
|
||||
const char *name() const;
|
||||
bool isFlag() const;
|
||||
int keyCount() const;
|
||||
const char *key(int index) const;
|
||||
int value(int index) const;
|
||||
const char *scope() const;
|
||||
int keyToValue(const char *key, bool *ok = 0) const;
|
||||
const char *valueToKey(int value) const;
|
||||
int keysToValue(const char *keys, bool *ok = 0) const;
|
||||
QByteArray valueToKeys(int value) const;
|
||||
bool isValid() const;
|
||||
%If (Qt_5_8_0 -)
|
||||
bool isScoped() const;
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
const char *enumName() const;
|
||||
%End
|
||||
};
|
||||
|
||||
class QMetaProperty
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmetaobject.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QMetaProperty();
|
||||
const char *name() const;
|
||||
const char *typeName() const;
|
||||
QVariant::Type type() const;
|
||||
bool isReadable() const;
|
||||
bool isWritable() const;
|
||||
bool isDesignable(const QObject *object = 0) const;
|
||||
bool isScriptable(const QObject *object = 0) const;
|
||||
bool isStored(const QObject *object = 0) const;
|
||||
bool isFlagType() const;
|
||||
bool isEnumType() const;
|
||||
QMetaEnum enumerator() const;
|
||||
QVariant read(const QObject *obj) const;
|
||||
bool write(QObject *obj, const QVariant &value) const;
|
||||
bool reset(QObject *obj) const;
|
||||
bool hasStdCppSet() const;
|
||||
bool isValid() const;
|
||||
bool isResettable() const;
|
||||
bool isUser(const QObject *object = 0) const;
|
||||
int userType() const;
|
||||
bool hasNotifySignal() const;
|
||||
QMetaMethod notifySignal() const;
|
||||
int notifySignalIndex() const;
|
||||
int propertyIndex() const;
|
||||
bool isConstant() const;
|
||||
bool isFinal() const;
|
||||
%If (Qt_5_14_0 -)
|
||||
int relativePropertyIndex() const;
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
bool isRequired() const;
|
||||
%End
|
||||
};
|
||||
|
||||
class QMetaClassInfo
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmetaobject.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QMetaClassInfo();
|
||||
const char *name() const;
|
||||
const char *value() const;
|
||||
};
|
||||
|
||||
bool operator==(const QMetaMethod &m1, const QMetaMethod &m2);
|
||||
bool operator!=(const QMetaMethod &m1, const QMetaMethod &m2);
|
||||
174
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qmetatype.sip
Normal file
174
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qmetatype.sip
Normal file
@@ -0,0 +1,174 @@
|
||||
// qmetatype.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QMetaType
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmetatype.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Type
|
||||
{
|
||||
UnknownType,
|
||||
Void,
|
||||
Bool,
|
||||
Int,
|
||||
UInt,
|
||||
LongLong,
|
||||
ULongLong,
|
||||
Double,
|
||||
QChar,
|
||||
QVariantMap,
|
||||
QVariantList,
|
||||
QVariantHash,
|
||||
QString,
|
||||
QStringList,
|
||||
QByteArray,
|
||||
QBitArray,
|
||||
QDate,
|
||||
QTime,
|
||||
QDateTime,
|
||||
QUrl,
|
||||
QLocale,
|
||||
QRect,
|
||||
QRectF,
|
||||
QSize,
|
||||
QSizeF,
|
||||
QLine,
|
||||
QLineF,
|
||||
QPoint,
|
||||
QPointF,
|
||||
QRegExp,
|
||||
LastCoreType,
|
||||
FirstGuiType,
|
||||
QFont,
|
||||
QPixmap,
|
||||
QBrush,
|
||||
QColor,
|
||||
QPalette,
|
||||
QIcon,
|
||||
QImage,
|
||||
QPolygon,
|
||||
QRegion,
|
||||
QBitmap,
|
||||
QCursor,
|
||||
QSizePolicy,
|
||||
QKeySequence,
|
||||
QPen,
|
||||
QTextLength,
|
||||
QTextFormat,
|
||||
QMatrix,
|
||||
QTransform,
|
||||
VoidStar,
|
||||
Long,
|
||||
Short,
|
||||
Char,
|
||||
ULong,
|
||||
UShort,
|
||||
UChar,
|
||||
Float,
|
||||
QObjectStar,
|
||||
QMatrix4x4,
|
||||
QVector2D,
|
||||
QVector3D,
|
||||
QVector4D,
|
||||
QQuaternion,
|
||||
QEasingCurve,
|
||||
QVariant,
|
||||
QUuid,
|
||||
QModelIndex,
|
||||
QPolygonF,
|
||||
SChar,
|
||||
QRegularExpression,
|
||||
QJsonValue,
|
||||
QJsonObject,
|
||||
QJsonArray,
|
||||
QJsonDocument,
|
||||
%If (Qt_5_4_0 -)
|
||||
QByteArrayList,
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
QPersistentModelIndex,
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
QCborSimpleType,
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
QCborValue,
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
QCborArray,
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
QCborMap,
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
QColorSpace,
|
||||
%End
|
||||
User,
|
||||
};
|
||||
|
||||
static int type(const char *typeName);
|
||||
static const char *typeName(int type);
|
||||
static bool isRegistered(int type);
|
||||
%If (- Qt_5_15_0)
|
||||
explicit QMetaType(const int type);
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
explicit QMetaType(const int type = QMetaType::Type::UnknownType);
|
||||
%End
|
||||
~QMetaType();
|
||||
|
||||
enum TypeFlag
|
||||
{
|
||||
NeedsConstruction,
|
||||
NeedsDestruction,
|
||||
MovableType,
|
||||
PointerToQObject,
|
||||
IsEnumeration,
|
||||
};
|
||||
|
||||
typedef QFlags<QMetaType::TypeFlag> TypeFlags;
|
||||
static QMetaType::TypeFlags typeFlags(int type);
|
||||
QMetaType::TypeFlags flags() const;
|
||||
bool isValid() const;
|
||||
bool isRegistered() const;
|
||||
static const QMetaObject *metaObjectForType(int type);
|
||||
%If (Qt_5_13_0 -)
|
||||
int id() const;
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
QByteArray name() const;
|
||||
%End
|
||||
|
||||
private:
|
||||
QMetaType(const QMetaType &other);
|
||||
};
|
||||
|
||||
QFlags<QMetaType::TypeFlag> operator|(QMetaType::TypeFlag f1, QFlags<QMetaType::TypeFlag> f2);
|
||||
%If (Qt_5_15_0 -)
|
||||
bool operator==(const QMetaType &a, const QMetaType &b);
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
bool operator!=(const QMetaType &a, const QMetaType &b);
|
||||
%End
|
||||
@@ -0,0 +1,59 @@
|
||||
// qmimedata.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QMimeData : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmimedata.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QMimeData();
|
||||
virtual ~QMimeData();
|
||||
QList<QUrl> urls() const;
|
||||
void setUrls(const QList<QUrl> &urls);
|
||||
bool hasUrls() const;
|
||||
QString text() const;
|
||||
void setText(const QString &text);
|
||||
bool hasText() const;
|
||||
QString html() const;
|
||||
void setHtml(const QString &html);
|
||||
bool hasHtml() const;
|
||||
QVariant imageData() const;
|
||||
void setImageData(const QVariant &image);
|
||||
bool hasImage() const;
|
||||
QVariant colorData() const;
|
||||
void setColorData(const QVariant &color);
|
||||
bool hasColor() const;
|
||||
QByteArray data(const QString &mimetype) const;
|
||||
void setData(const QString &mimetype, const QByteArray &data);
|
||||
virtual bool hasFormat(const QString &mimetype) const;
|
||||
virtual QStringList formats() const;
|
||||
void clear();
|
||||
void removeFormat(const QString &mimetype);
|
||||
|
||||
protected:
|
||||
virtual QVariant retrieveData(const QString &mimetype, QVariant::Type preferredType) const;
|
||||
|
||||
private:
|
||||
QMimeData(const QMimeData &);
|
||||
};
|
||||
@@ -0,0 +1,54 @@
|
||||
// qmimedatabase.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QMimeDatabase
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmimedatabase.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QMimeDatabase();
|
||||
~QMimeDatabase();
|
||||
QMimeType mimeTypeForName(const QString &nameOrAlias) const;
|
||||
|
||||
enum MatchMode
|
||||
{
|
||||
MatchDefault,
|
||||
MatchExtension,
|
||||
MatchContent,
|
||||
};
|
||||
|
||||
QMimeType mimeTypeForFile(const QString &fileName, QMimeDatabase::MatchMode mode = QMimeDatabase::MatchDefault) const;
|
||||
QMimeType mimeTypeForFile(const QFileInfo &fileInfo, QMimeDatabase::MatchMode mode = QMimeDatabase::MatchDefault) const;
|
||||
QList<QMimeType> mimeTypesForFileName(const QString &fileName) const;
|
||||
QMimeType mimeTypeForData(const QByteArray &data) const;
|
||||
QMimeType mimeTypeForData(QIODevice *device) const;
|
||||
QMimeType mimeTypeForUrl(const QUrl &url) const;
|
||||
QMimeType mimeTypeForFileNameAndData(const QString &fileName, QIODevice *device) const;
|
||||
QMimeType mimeTypeForFileNameAndData(const QString &fileName, const QByteArray &data) const;
|
||||
QString suffixForFileName(const QString &fileName) const;
|
||||
QList<QMimeType> allMimeTypes() const;
|
||||
|
||||
private:
|
||||
QMimeDatabase(const QMimeDatabase &);
|
||||
};
|
||||
@@ -0,0 +1,57 @@
|
||||
// qmimetype.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QMimeType
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmimetype.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QMimeType();
|
||||
QMimeType(const QMimeType &other);
|
||||
~QMimeType();
|
||||
void swap(QMimeType &other /Constrained/);
|
||||
bool operator==(const QMimeType &other) const;
|
||||
bool operator!=(const QMimeType &other) const;
|
||||
bool isValid() const;
|
||||
bool isDefault() const;
|
||||
QString name() const;
|
||||
QString comment() const;
|
||||
QString genericIconName() const;
|
||||
QString iconName() const;
|
||||
QStringList globPatterns() const;
|
||||
QStringList parentMimeTypes() const;
|
||||
QStringList allAncestors() const;
|
||||
QStringList aliases() const;
|
||||
QStringList suffixes() const;
|
||||
QString preferredSuffix() const;
|
||||
bool inherits(const QString &mimeTypeName) const;
|
||||
QString filterString() const;
|
||||
%If (Qt_5_6_0 -)
|
||||
long __hash__() const;
|
||||
%MethodCode
|
||||
sipRes = qHash(*sipCpp);
|
||||
%End
|
||||
|
||||
%End
|
||||
};
|
||||
97
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qmutex.sip
Normal file
97
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qmutex.sip
Normal file
@@ -0,0 +1,97 @@
|
||||
// qmutex.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtCore Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
|
||||
//
|
||||
// This file is part of PyQt5.
|
||||
//
|
||||
// This file may be used under the terms of the GNU General Public License
|
||||
// version 3.0 as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE included in the packaging of this file. Please review the
|
||||
// following information to ensure the GNU General Public License version 3.0
|
||||
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
//
|
||||
// If you do not wish to use this file under the terms of the GPL version 3.0
|
||||
// then you may purchase a commercial license. For more information contact
|
||||
// info@riverbankcomputing.com.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
class QMutexLocker
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmutex.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QMutexLocker(QMutex *m) /ReleaseGIL/;
|
||||
%If (Qt_5_14_0 -)
|
||||
explicit QMutexLocker(QRecursiveMutex *m) /ReleaseGIL/;
|
||||
%End
|
||||
~QMutexLocker();
|
||||
void unlock();
|
||||
void relock() /ReleaseGIL/;
|
||||
QMutex *mutex() const;
|
||||
SIP_PYOBJECT __enter__();
|
||||
%MethodCode
|
||||
// Just return a reference to self.
|
||||
sipRes = sipSelf;
|
||||
Py_INCREF(sipRes);
|
||||
%End
|
||||
|
||||
void __exit__(SIP_PYOBJECT type, SIP_PYOBJECT value, SIP_PYOBJECT traceback);
|
||||
%MethodCode
|
||||
sipCpp->unlock();
|
||||
%End
|
||||
|
||||
private:
|
||||
QMutexLocker(const QMutexLocker &);
|
||||
};
|
||||
|
||||
class QMutex
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmutex.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum RecursionMode
|
||||
{
|
||||
NonRecursive,
|
||||
Recursive,
|
||||
};
|
||||
|
||||
explicit QMutex(QMutex::RecursionMode mode = QMutex::NonRecursive);
|
||||
~QMutex();
|
||||
void lock() /ReleaseGIL/;
|
||||
bool tryLock(int timeout = 0) /ReleaseGIL/;
|
||||
void unlock() /ReleaseGIL/;
|
||||
%If (Qt_5_7_0 -)
|
||||
bool isRecursive() const;
|
||||
%End
|
||||
%If (- Qt_5_7_0)
|
||||
// Methods implemented in QBasicMutex.
|
||||
bool isRecursive();
|
||||
%End
|
||||
|
||||
private:
|
||||
QMutex(const QMutex &);
|
||||
};
|
||||
|
||||
%If (Qt_5_14_0 -)
|
||||
|
||||
class QRecursiveMutex : private QMutex /NoDefaultCtors/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmutex.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QRecursiveMutex();
|
||||
~QRecursiveMutex();
|
||||
};
|
||||
|
||||
%End
|
||||
1835
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qnamespace.sip
Normal file
1835
venv3_12/Lib/site-packages/PyQt5/bindings/QtCore/qnamespace.sip
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user