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

PyArgConstructor implementation for QString type. More...

#include <PyDefaultArguments.h>

Inheritance diagram for qpy::StringPyArgConstructor:
Inheritance graph
[legend]
Collaboration diagram for qpy::StringPyArgConstructor:
Collaboration graph
[legend]

List of all members.

Public Member Functions

PyObject * Create (void *p) const
 Create PyObject from parameter passed to Python callback from Qt when signal triggered.
PyObject * Create () const
 Create PyObject from value returned from QObject method.
StringPyArgConstructorClone () const
 Return copy of object.
bool IsQObjectPtr () const
 Return true if type is a pointer to a QObject-derived object.
QMetaType::Type Type () const
 Return type of constructed data.

Detailed Description

PyArgConstructor implementation for QString type.


Member Function Documentation

bool qpy::StringPyArgConstructor::IsQObjectPtr ( ) const [inline, virtual]

Return true if type is a pointer to a QObject-derived object.

This is required to have the QPy run-time add the passed QObject into the Python context. The other option is to have PyArgConstructors::Create receive a reference to a PyContext which introduces a two-way dependency between PyArgConstructor and PyContext; this would also augment PyQArgConstructor requirements with the added responsibility of having to add instances to Python. Note that it is not enough to simply check the PyArgConstructor returned Type(), because in the case of custom registered types derived from QObject the returned type is not QObjectStar.

Implements qpy::PyArgConstructor.


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