Qt 4.8
Public Functions | Properties | Friends | List of all members
QMetaClassInfo Class Reference

The QMetaClassInfo class provides additional information about a class. More...

#include <qmetaobject.h>

Public Functions

const QMetaObjectenclosingMetaObject () const
 
const char * name () const
 Returns the name of this item. More...
 
 QMetaClassInfo ()
 
const char * value () const
 Returns the value of this item. More...
 

Properties

uint handle
 
const QMetaObjectmobj
 

Friends

struct QMetaObject
 

Detailed Description

The QMetaClassInfo class provides additional information about a class.

Class information items are simple namevalue pairs that are specified using Q_CLASSINFO() in the source code. The information can be retrieved using name() and value(). For example:

class MyClass
{
Q_CLASSINFO("author", "Sabrina Schweinsteiger")
Q_CLASSINFO("url", "http://doc.moosesoft.co.uk/1.0/")
public:
...
};

This mechanism is free for you to use in your Qt applications. Qt doesn't use it for any of its classes.

See also
QMetaObject

Definition at line 224 of file qmetaobject.h.

Constructors and Destructors

◆ QMetaClassInfo()

QMetaClassInfo::QMetaClassInfo ( )
inline
Warning
This function is not part of the public interface.

Definition at line 227 of file qmetaobject.h.

227 : mobj(0),handle(0) {}
const QMetaObject * mobj
Definition: qmetaobject.h:232

Functions

◆ enclosingMetaObject()

const QMetaObject * QMetaClassInfo::enclosingMetaObject ( ) const
inline
Warning
This function is not part of the public interface.

Definition at line 230 of file qmetaobject.h.

230 { return mobj; }
const QMetaObject * mobj
Definition: qmetaobject.h:232

◆ name()

const char * QMetaClassInfo::name ( ) const

Returns the name of this item.

See also
value()

Definition at line 2770 of file qmetaobject.cpp.

Referenced by QMetaObjectBuilder::addMetaObject(), and clone().

2771 {
2772  if (!mobj)
2773  return 0;
2774  return mobj->d.stringdata + mobj->d.data[handle];
2775 }
const char * stringdata
Definition: qobjectdefs.h:470
const uint * data
Definition: qobjectdefs.h:471
const QMetaObject * mobj
Definition: qmetaobject.h:232
struct QMetaObject::@38 d

◆ value()

const char * QMetaClassInfo::value ( ) const

Friends and Related Functions

◆ QMetaObject

friend struct QMetaObject
friend

Definition at line 234 of file qmetaobject.h.

Properties

◆ handle

uint QMetaClassInfo::handle
private

Definition at line 233 of file qmetaobject.h.

Referenced by QMetaObject::classInfo().

◆ mobj

const QMetaObject* QMetaClassInfo::mobj
private

Definition at line 232 of file qmetaobject.h.

Referenced by QMetaObject::classInfo().


The documentation for this class was generated from the following files: