stores information about a specific signal/slot/method More...
#include <PythonQtMethodInfo.h>
Classes | |
struct | ParameterInfo |
stores the QVariant id (if available) and the name of the type 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 | |
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 Protected Member Functions | |
static void | fillParameterInfo (ParameterInfo &type, const QByteArray &name, PythonQtClassInfo *classInfo) |
Protected Attributes | |
QList< ParameterInfo > | _parameters |
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 |
stores information about a specific signal/slot/method
Definition at line 57 of file PythonQtMethodInfo.h.
Definition at line 60 of file PythonQtMethodInfo.h.
PythonQtMethodInfo::PythonQtMethodInfo | ( | ) | [inline] |
Definition at line 74 of file PythonQtMethodInfo.h.
{};
PythonQtMethodInfo::~PythonQtMethodInfo | ( | ) | [inline] |
Definition at line 75 of file PythonQtMethodInfo.h.
{};
PythonQtMethodInfo::PythonQtMethodInfo | ( | const QMetaMethod & | meta, | |
PythonQtClassInfo * | classInfo | |||
) |
PythonQtMethodInfo::PythonQtMethodInfo | ( | const QByteArray & | typeName, | |
const QList< QByteArray > & | args | |||
) |
PythonQtMethodInfo::PythonQtMethodInfo | ( | const PythonQtMethodInfo & | other | ) | [inline] |
Definition at line 78 of file PythonQtMethodInfo.h.
References _parameters.
{ _parameters = other._parameters; }
static void PythonQtMethodInfo::addParameterTypeAlias | ( | const QByteArray & | alias, | |
const QByteArray & | name | |||
) | [static] |
add an alias for a typename, e.g. QObjectList and QList<QObject*>.
static void PythonQtMethodInfo::cleanupCachedMethodInfos | ( | ) | [static] |
cleanup the cache
static void PythonQtMethodInfo::fillParameterInfo | ( | ParameterInfo & | type, | |
const QByteArray & | name, | |||
PythonQtClassInfo * | classInfo | |||
) | [static, protected] |
static const PythonQtMethodInfo* PythonQtMethodInfo::getCachedMethodInfo | ( | const QMetaMethod & | method, | |
PythonQtClassInfo * | classInfo | |||
) | [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)
Referenced by PythonQtSlotInfo::PythonQtSlotInfo().
static const PythonQtMethodInfo* PythonQtMethodInfo::getCachedMethodInfoFromArgumentList | ( | int | numArgs, | |
const char ** | args | |||
) | [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 int PythonQtMethodInfo::nameToType | ( | const char * | name | ) | [static] |
returns the id for the given type (using an internal dictionary)
int PythonQtMethodInfo::parameterCount | ( | ) | const [inline] |
returns the number of parameters including the return value
Definition at line 93 of file PythonQtMethodInfo.h.
{ return _parameters.size(); };
const QList<ParameterInfo>& PythonQtMethodInfo::parameters | ( | ) | const [inline] |
get the parameter infos
Definition at line 99 of file PythonQtMethodInfo.h.
Referenced by PythonQtSlotInfo::PythonQtSlotInfo().
{ return _parameters; }
QHash<QByteArray, PythonQtMethodInfo*> PythonQtMethodInfo::_cachedSignatures [static, protected] |
stores the cached signatures of methods to speedup mapping from Qt to Python types
Definition at line 111 of file PythonQtMethodInfo.h.
QHash<QByteArray, QByteArray> PythonQtMethodInfo::_parameterNameAliases [static, protected] |
Definition at line 108 of file PythonQtMethodInfo.h.
QList<ParameterInfo> PythonQtMethodInfo::_parameters [protected] |
Definition at line 113 of file PythonQtMethodInfo.h.
Referenced by PythonQtMethodInfo(), and PythonQtSlotInfo::PythonQtSlotInfo().
QHash<QByteArray, int> PythonQtMethodInfo::_parameterTypeDict [static, protected] |
Definition at line 107 of file PythonQtMethodInfo.h.