HomeHome

ClassesAnnotated - TreeFunctionsHomeStructure

QMetaProperty Class Reference


The QMetaProperty class stores meta data about a property. More...

#include <qmetaobject.h>

List of all member functions.

Public Members


Detailed Description

The QMetaProperty class stores meta data about a property.

Property meta data mainly consists of a type(), a name() and the fact, whether a property is writable(), designable() or stored().

The functions isSetType(), isEnumType() and enumKeys() provide further information about a property's type. The conversion functions keyToValue(), valueToKey(), keysToValue() and valueToKeys() allow to convert between the integer representation of an enumeration or set value and its literal representation.

Actual property values are set and received through QObject's set and get functions. See QObject::setProperty() and QObject::property() for details.

You receive meta property data through an object's meta object. See QMetaObject::property() and QMetaObject::propertyNames() for details.


Member Type Documentation

QMetaProperty::Flags

For internal use only.

QMetaProperty::Specification

For internal use only.

Member Function Documentation

void QMetaProperty::clearFlags ( uint f )

For internal use only.

bool QMetaProperty::designable () const

Returns whether the property is considered to be designable or not.

QStrList QMetaProperty::enumKeys () const

Returns the possible enumeration keys if this property is an enumeration type (or a set type).

See also isEnumType().

bool QMetaProperty::isEnumType () const

Returns whether the property's type is an enumeration value.

See also isSetType() and enumKeys().

bool QMetaProperty::isSetType () const

Returns whether the property's type is an enumeration value that is used as set, i.e. the enumeration values can be or'ed together. A set type is implicitely also an enum type.

See also isEnumType() and enumKeys().

int QMetaProperty::keyToValue ( const char * key ) const

Converts the enumeration key key to its integer value.

For set types, use keysToValue().

See also valueToKey(), isSetType() and keysToValue().

int QMetaProperty::keysToValue ( const QStrList & keys ) const

Converts the list of keys keys to their combined integer value.

See also isSetType(), valueToKey() and keysToValue().

const char* QMetaProperty::name () const

Returns the name of the property.

void QMetaProperty::setFlags ( uint f )

For internal use only.

bool QMetaProperty::stored ( QObject * o ) const

Returns whether the property shall be stored for object o or not.

bool QMetaProperty::testFlags ( uint f ) const

For internal use only.

const char* QMetaProperty::type () const

Returns the type of the property.

const char* QMetaProperty::valueToKey ( int value ) const

Converts the enumeration value value to its literal key.

For set types, use valueToKeys().

See also valueToKey(), isSetType() and valueToKeys().

QStrList QMetaProperty::valueToKeys ( int value ) const

Converts the set value value to a list of keys.

See also isSetType(), valueToKey() and valueToKeys().

bool QMetaProperty::writable () const

Returns whether the property is writable or not.

See also isValid().

QMetaProperty::QMetaProperty ()

For internal use only.

QMetaProperty::~QMetaProperty ()

For internal use only.

bool QMetaProperty::isValid () const

For internal use only.


Search the documentation, FAQ, qt-interest archive and more (uses www.trolltech.com):


This file is part of the Qt toolkit, copyright © 1995-2000 Trolltech, all rights reserved.


Copyright © 2000 TrolltechTrademarks
Qt version 2.2.1