QPy
Python-Qt dynamic bindings
 All Classes Namespaces Files Functions
Public Member Functions
qpy::PyArgWrapper Class Reference

Wrapper for objects returned from QObject method invocations or passed to Python callbacks in response to emitted signals. More...

#include <PyArgWrappers.h>

List of all members.

Public Member Functions

 PyArgWrapper (PyArgConstructor *pac=0)
 Default constructor.
 PyArgWrapper (const PyArgWrapper &other)
 Copy constructor: Clones the internal Return constructor instance.
PyObject * Create () const
 return values stored in the inner PyArgConstructor.
PyObject * Create (void *p) const
 return value converted from void* .
QGenericReturnArgument Arg () const
 return placeholder for storing Qt return argument
QString Type () const
 Type name.
QMetaType::Type MetaType () const
 Meta type.
bool IsQObjectPtr () const
 ~PyArgWrapper ()
 Delete PyArgConstructor instance.

Detailed Description

Wrapper for objects returned from QObject method invocations or passed to Python callbacks in response to emitted signals.

This class translates C++ values to PyObjects and is used to both return values from method invocations as well as translate the parameters received from a signal to PyObject values whenever a Python callback invocation is triggered by an emitted signal.


Member Function Documentation

PyObject* qpy::PyArgWrapper::Create ( ) const [inline]

return values stored in the inner PyArgConstructor.

This is the method invoked to return values from a QObject method invocation.

PyObject* qpy::PyArgWrapper::Create ( void *  p) const [inline]

return value converted from void* .

This is the method invoked when a Python function is called as the result of a triggered signal.

bool qpy::PyArgWrapper::IsQObjectPtr ( ) const [inline]

Return true if wrapped type is QObject pointer. Required to have PyContext add QObject wrappers to the Python interpreter. Note that it is not enough to check the value returned by MetaType() because custom registered objects derived from QObject do not have a QMetaType::QObjectStar type.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions