QxtMetaObject Class Reference
[QxtCore module]

provides extensions to QMetaObject More...

 #include <QxtMetaObject>

related


Detailed Description

including QxtMetaObject::bind

Member Documentation

QxtBoundFunction * bind ( QxtGenericFunctionPointer funcPointer , QXT_IMPL_10ARGS(QGenericArgument) )

see See also: QxtMetaObject::connectqxtFuncPtr QxtBoundFunction QXT_BIND
Creates a binding to the provided C/C++ function using the provided parameter list. Use the qxtFuncPtr function to wrap a bare function pointer for use in this function. Use the Q_ARG macro to specify constant parameters, or use the QXT_BIND macro to relay a parameter from a connected signal or passed via the QxtBoundFunction::invoke() method.

The first template parameter must match the return type of the function, or void if the function does not return a value. The remaining template parameters must match the types of the function's parameters. If any type does not match, this function returns NULL.

The returned QxtBoundFunction will not have a parent. Assigning a parent using QObject::setParent() is strongly recommended to avoid memory leaks.




QxtBoundFunction * bind ( QxtGenericFunctionPointer funcPointer , QXT_IMPL_10ARGS(QVariant) )

see See also: QxtMetaObject::connectqxtFuncPtr QxtBoundFunction
Creates a binding to the provided C/C++ function using the provided parameter list. Use the qxtFuncPtr function to wrap a bare function pointer for use in this function. The type of each argument is deduced from the type of the QVariant. This function cannot bind positional arguments; see the overload using QGenericArgument.

The first template parameter must match the return type of the function, or void if the function does not return a value. The remaining template parameters must match the types of the function's parameters. If any type does not match, this function returns NULL.

The returned QxtBoundFunction will not have a parent. Assigning a parent using QObject::setParent() is strongly recommended to avoid memory leaks.




methodName ( const char * method )

Returns the name of the given method.

Example usage:

QByteArray method = QxtMetaObject::methodName(" int foo ( int bar, double baz )");
// method is now "foo"




methodSignature ( const char * method )

Returns the signature of the given method.




bool isSignalOrSlot ( const char * method )

checks if method contains parantesis and begins with 1 or 2




QxtBoundFunction * bind ( QObject * recv , const char * invokable , QXT_IMPL_10ARGS(QVariant) )

see See also: QxtMetaObject::connectQxtBoundFunction
Creates a binding to the provided signal, slot, or Q_INVOKABLE method using the provided parameter list. The type of each argument is deduced from the type of the QVariant. This function cannot bind positional arguments; see the overload using QGenericArgument.

If the provided QObject does not implement the requested method, or if the argument list is incompatible with the method's function signature, this function returns NULL.

The returned QxtBoundFunction is created as a child of the receiver. Changing the parent will result in undefined behavior.




QxtBoundFunction * bind ( QObject * recv , const char * invokable , QXT_IMPL_10ARGS(QGenericArgument) )

see See also: QxtMetaObject::connectQxtBoundFunction QXT_BIND
Creates a binding to the provided signal, slot, or Q_INVOKABLE method using the provided parameter list. Use the Q_ARG macro to specify constant parameters, or use the QXT_BIND macro to relay a parameter from a connected signal or passed via the QxtBoundFunction::invoke() method.

If the provided QObject does not implement the requested method, or if the argument list is incompatible with the method's function signature, this function returns NULL.

The returned QxtBoundFunction is created as a child of the receiver. Changing the parent will result in undefined behavior.




connect ( QObject * sender , const char * signal , QxtBoundFunction * slot , Qt::ConnectionType type )

connects a signal to a QxtBoundFunction




QXT_BIND

Refers to the n'th parameter of QxtBoundFunction::invoke() or of a signal connected to a QxtBoundFunction.

see See also: QxtMetaObject::bind






Copyright © 2007 Qxt Foundation Trademarks
Qt Extension Library 0.4