PythonQt
|
stores information about a specific signal/slot/method More...
#include <PythonQtMethodInfo.h>
Classes | |
struct | ParameterInfo |
stores various informations about a parameter/type name More... | |
Public Types | |
enum | ParameterType { Unknown = -1 , Variant = -2 } |
Public Member Functions | |
PythonQtMethodInfo () | |
~PythonQtMethodInfo () | |
PythonQtMethodInfo (const QMetaMethod &meta, PythonQtClassInfo *classInfo) | |
PythonQtMethodInfo (const QByteArray &typeName, const QList< QByteArray > &args) | |
PythonQtMethodInfo (const PythonQtMethodInfo &other) | |
int | parameterCount () const |
returns the number of parameters including the return value | |
const QList< ParameterInfo > & | parameters () const |
get the parameter infos | |
bool | shouldAllowThreads () const |
Static Public Member Functions | |
static const PythonQtMethodInfo * | getCachedMethodInfo (const QMetaMethod &method, PythonQtClassInfo *classInfo) |
static const PythonQtMethodInfo * | getCachedMethodInfoFromArgumentList (int numArgs, const char **args) |
get the cached method info using the passed in list of return value and arguments, return value needs to be passed as first arg | |
static void | cleanupCachedMethodInfos () |
cleanup the cache | |
static int | nameToType (const char *name) |
returns the id for the given type (using an internal dictionary) | |
static void | addParameterTypeAlias (const QByteArray &alias, const QByteArray &name) |
add an alias for a typename, e.g. QObjectList and QList<QObject*>. | |
static void | fillParameterInfo (ParameterInfo &type, const QByteArray &name, PythonQtClassInfo *classInfo=nullptr) |
fill the parameter info for the given type name | |
static const ParameterInfo & | getParameterInfoForMetaType (int type) |
returns a parameter info for the given metatype (and creates and caches one if it is not yet present) | |
static int | getInnerTemplateMetaType (const QByteArray &typeName) |
returns the inner type id of a simple template of the form SomeObject<InnerType> | |
static QByteArray | getInnerTemplateTypeName (const QByteArray &typeName) |
returns the inner type name of a simple template of the form SomeObject<InnerType> | |
static QByteArray | getInnerListTypeName (const QByteArray &typeName) |
returns the inner type name of a simple template or the typename without appended "List". | |
Protected Member Functions | |
void | setupAllowThreads () |
Protected Attributes | |
QList< ParameterInfo > | _parameters |
bool | _shouldAllowThreads |
Static Protected Attributes | |
static QHash< QByteArray, int > | _parameterTypeDict |
static QHash< QByteArray, QByteArray > | _parameterNameAliases |
static QHash< QByteArray, PythonQtMethodInfo * > | _cachedSignatures |
stores the cached signatures of methods to speedup mapping from Qt to Python types | |
static QHash< int, ParameterInfo > | _cachedParameterInfos |
stores information about a specific signal/slot/method
Definition at line 58 of file PythonQtMethodInfo.h.
Enumerator | |
---|---|
Unknown | |
Variant |
Definition at line 61 of file PythonQtMethodInfo.h.
|
inline |
Definition at line 82 of file PythonQtMethodInfo.h.
|
inline |
Definition at line 85 of file PythonQtMethodInfo.h.
PythonQtMethodInfo::PythonQtMethodInfo | ( | const QMetaMethod & | meta, |
PythonQtClassInfo * | classInfo | ||
) |
PythonQtMethodInfo::PythonQtMethodInfo | ( | const QByteArray & | typeName, |
const QList< QByteArray > & | args | ||
) |
|
inline |
Definition at line 88 of file PythonQtMethodInfo.h.
References PythonQtConvertPairToPython().
|
static |
add an alias for a typename, e.g. QObjectList and QList<QObject*>.
|
static |
fill the parameter info for the given type name
|
static |
returns the method info of the signature, uses a cache internally to speed up multiple requests for the same method, classInfo is passed to allow local enum resolution (if NULL is passed, no local enums are recognized)
|
static |
get the cached method info using the passed in list of return value and arguments, return value needs to be passed as first arg
|
static |
returns the inner type name of a simple template or the typename without appended "List".
Referenced by PythonQtConvertListOfKnownClassToPythonList(), and PythonQtConvertPythonListToListOfKnownClass().
|
static |
returns the inner type id of a simple template of the form SomeObject<InnerType>
Referenced by PythonQtConvertListOfPairToPythonList(), PythonQtConvertListOfValueTypeToPythonList(), PythonQtConvertPythonListToListOfPair(), and PythonQtConvertPythonListToListOfValueType().
|
static |
returns the inner type name of a simple template of the form SomeObject<InnerType>
Referenced by PythonQtConvertIntegerMapToPython(), PythonQtConvertPairToPython(), PythonQtConvertPythonToIntegerMap(), and PythonQtConvertPythonToPair().
|
static |
returns a parameter info for the given metatype (and creates and caches one if it is not yet present)
returns the id for the given type (using an internal dictionary)
|
inline |
returns the number of parameters including the return value
Definition at line 104 of file PythonQtMethodInfo.h.
|
inline |
|
protected |
|
inline |
returns if the GIL should be released when calling this method. This is the default, but it will return false if any of the parameters is a PythonQtObjectPtr or PyObject*.
Definition at line 133 of file PythonQtMethodInfo.h.
|
staticprotected |
Definition at line 144 of file PythonQtMethodInfo.h.
|
staticprotected |
stores the cached signatures of methods to speedup mapping from Qt to Python types
Definition at line 142 of file PythonQtMethodInfo.h.
|
staticprotected |
Definition at line 139 of file PythonQtMethodInfo.h.
|
protected |
Definition at line 146 of file PythonQtMethodInfo.h.
Referenced by PythonQtSlotInfo::PythonQtSlotInfo().
|
staticprotected |
Definition at line 138 of file PythonQtMethodInfo.h.
|
protected |
Definition at line 147 of file PythonQtMethodInfo.h.