QtCore/qobject.h File Reference

qobject.h File Reference

Classes

class  QObjectData
 
class  QObject
 
class  QObjectUserData
 

Macros

#define Q_DECLARE_INTERFACE(IFace, IId)
 

Typedefs

typedef QList< QObject * > QObjectList
 

Functions

Q_CORE_EXPORT void qt_qFindChildren_helper (const QObject *parent, const QString &name, const QRegExp *re, const QMetaObject &mo, QList< void * > *list)
 
Q_CORE_EXPORT QObjectqt_qFindChild_helper (const QObject *parent, const QString &name, const QMetaObject &mo)
 
template<class T >
qobject_cast (QObject *object)
 
template<class T >
qobject_cast (const QObject *object)
 
template<class T >
const char * qobject_interface_iid ()
 
Q_CORE_EXPORT QDebug operator<< (QDebug, const QObject *)
 

Macro Definition Documentation

#define Q_DECLARE_INTERFACE (   IFace,
  IId 
)
Value:
template <> inline const char *qobject_interface_iid<IFace *>() \
{ return IId; } \
template <> inline IFace *qobject_cast<IFace *>(QObject *object) \
{ return reinterpret_cast<IFace *>((object ? object->qt_metacast(IId) : 0)); } \
template <> inline IFace *qobject_cast<IFace *>(const QObject *object) \
{ return reinterpret_cast<IFace *>((object ? const_cast<QObject *>(object)->qt_metacast(IId) : 0)); }
T qobject_cast(QObject *object)
Definition: qobject.h:375

Definition at line 397 of file qobject.h.

Typedef Documentation

Definition at line 75 of file qobject.h.

Function Documentation

Q_CORE_EXPORT void qt_qFindChildren_helper ( const QObject parent,
const QString name,
const QRegExp re,
const QMetaObject mo,
QList< void * > *  list 
)
Q_CORE_EXPORT QObject* qt_qFindChild_helper ( const QObject parent,
const QString name,
const QMetaObject mo 
)
T qobject_cast ( QObject object)
inline

Definition at line 375 of file qobject.h.

376 {
377 #if !defined(QT_NO_QOBJECT_CHECK)
378  reinterpret_cast<T>(object)->qt_check_for_QOBJECT_macro(*reinterpret_cast<T>(object));
379 #endif
380  return static_cast<T>(reinterpret_cast<T>(object)->staticMetaObject.cast(object));
381 }
T qobject_cast ( const QObject object)
inline

Definition at line 384 of file qobject.h.

385 {
386 #if !defined(QT_NO_QOBJECT_CHECK)
387  reinterpret_cast<T>(object)->qt_check_for_QOBJECT_macro(*reinterpret_cast<T>(const_cast<QObject *>(object)));
388 #endif
389  return static_cast<T>(reinterpret_cast<T>(object)->staticMetaObject.cast(object));
390 }
const char* qobject_interface_iid ( )
inline

Definition at line 393 of file qobject.h.

394 { return 0; }
Q_CORE_EXPORT QDebug operator<< ( QDebug  ,
const QObject  
)

Go to the source code of this file.