|
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.
|
inline |
Definition at line 79 of file PythonQtMethodInfo.h.
References _shouldAllowThreads.
Referenced by getCachedMethodInfo(), getCachedMethodInfoFromArgumentList(), PythonQtMethodInfo(), PythonQtSlotInfo::PythonQtSlotInfo(), and PythonQtSlotInfo::PythonQtSlotInfo().
|
inline |
Definition at line 80 of file PythonQtMethodInfo.h.
| PythonQtMethodInfo::PythonQtMethodInfo | ( | const QMetaMethod & | meta, |
| PythonQtClassInfo * | classInfo ) |
| PythonQtMethodInfo::PythonQtMethodInfo | ( | const QByteArray & | typeName, |
| const QList< QByteArray > & | args ) |
|
inline |
Definition at line 83 of file PythonQtMethodInfo.h.
References _parameters, _shouldAllowThreads, and PythonQtMethodInfo().
|
static |
add an alias for a typename, e.g. QObjectList and QList<QObject*>.
|
static |
cleanup the cache
|
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)
References PythonQtMethodInfo().
Referenced by PythonQtSlotInfo::PythonQtSlotInfo().
|
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
References PythonQtMethodInfo().
|
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)
|
static |
returns the id for the given type (using an internal dictionary)
|
inline |
returns the number of parameters including the return value
Definition at line 100 of file PythonQtMethodInfo.h.
References _parameters.
|
inline |
get the parameter infos
Definition at line 106 of file PythonQtMethodInfo.h.
References _parameters.
Referenced by PythonQtSlotInfo::PythonQtSlotInfo().
|
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 129 of file PythonQtMethodInfo.h.
References _shouldAllowThreads.
Referenced by PythonQtSlotInfo::PythonQtSlotInfo().
|
staticprotected |
Definition at line 140 of file PythonQtMethodInfo.h.
|
staticprotected |
stores the cached signatures of methods to speedup mapping from Qt to Python types
Definition at line 138 of file PythonQtMethodInfo.h.
|
staticprotected |
Definition at line 135 of file PythonQtMethodInfo.h.
|
protected |
Definition at line 142 of file PythonQtMethodInfo.h.
Referenced by parameterCount(), parameters(), PythonQtMethodInfo(), PythonQtSlotInfo::PythonQtSlotInfo(), and PythonQtSlotInfo::PythonQtSlotInfo().
|
staticprotected |
Definition at line 134 of file PythonQtMethodInfo.h.
|
protected |
Definition at line 143 of file PythonQtMethodInfo.h.
Referenced by PythonQtMethodInfo(), PythonQtMethodInfo(), PythonQtSlotInfo::PythonQtSlotInfo(), PythonQtSlotInfo::PythonQtSlotInfo(), and shouldAllowThreads().