You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
152 lines
5.5 KiB
152 lines
5.5 KiB
'\" t
|
|
.TH QMetaProperty 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
|
|
.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
|
|
.\" license file included in the distribution for a complete license
|
|
.\" statement.
|
|
.\"
|
|
.ad l
|
|
.nh
|
|
.SH NAME
|
|
QMetaProperty \- Stores meta data about a property
|
|
.SH SYNOPSIS
|
|
\fC#include <ntqmetaobject.h>\fR
|
|
.PP
|
|
.SS "Public Members"
|
|
.in +1c
|
|
.ti -1c
|
|
.BI "const char * \fBtype\fR () const"
|
|
.br
|
|
.ti -1c
|
|
.BI "const char * \fBname\fR () const"
|
|
.br
|
|
.ti -1c
|
|
.BI "bool \fBwritable\fR () const"
|
|
.br
|
|
.ti -1c
|
|
.BI "bool \fBisSetType\fR () const"
|
|
.br
|
|
.ti -1c
|
|
.BI "bool \fBisEnumType\fR () const"
|
|
.br
|
|
.ti -1c
|
|
.BI "QStrList \fBenumKeys\fR () const"
|
|
.br
|
|
.ti -1c
|
|
.BI "int \fBkeyToValue\fR ( const char * key ) const"
|
|
.br
|
|
.ti -1c
|
|
.BI "const char * \fBvalueToKey\fR ( int value ) const"
|
|
.br
|
|
.ti -1c
|
|
.BI "int \fBkeysToValue\fR ( const QStrList & keys ) const"
|
|
.br
|
|
.ti -1c
|
|
.BI "QStrList \fBvalueToKeys\fR ( int value ) const"
|
|
.br
|
|
.ti -1c
|
|
.BI "bool \fBdesignable\fR ( QObject * o = 0 ) const"
|
|
.br
|
|
.ti -1c
|
|
.BI "bool \fBscriptable\fR ( QObject * o = 0 ) const"
|
|
.br
|
|
.ti -1c
|
|
.BI "bool \fBstored\fR ( QObject * o = 0 ) const"
|
|
.br
|
|
.ti -1c
|
|
.BI "bool \fBreset\fR ( QObject * o ) const"
|
|
.br
|
|
.in -1c
|
|
.SH DESCRIPTION
|
|
The QMetaProperty class stores meta data about a property.
|
|
.PP
|
|
Property meta data includes type(), name(), and whether a property is writable(), designable() and stored().
|
|
.PP
|
|
The functions isSetType(), isEnumType() and enumKeys() provide further information about a property's type. The conversion functions keyToValue(), valueToKey(), keysToValue() and valueToKeys() allow conversion between the integer representation of an enumeration or set value and its literal representation.
|
|
.PP
|
|
Actual property values are set and received through QObject's set and get functions. See QObject::setProperty() and QObject::property() for details.
|
|
.PP
|
|
You receive meta property data through an object's meta object. See QMetaObject::property() and QMetaObject::propertyNames() for details.
|
|
.PP
|
|
See also Object Model.
|
|
.SH MEMBER FUNCTION DOCUMENTATION
|
|
.SH "bool QMetaProperty::designable ( QObject * o = 0 ) const"
|
|
Returns TRUE if the property is designable for object \fIo\fR; otherwise returns FALSE.
|
|
.PP
|
|
If no object \fIo\fR is given, the function returns a static approximation.
|
|
.SH "QStrList QMetaProperty::enumKeys () const"
|
|
Returns the possible enumeration keys if this property is an enumeration type (or a set type).
|
|
.PP
|
|
See also isEnumType().
|
|
.SH "bool QMetaProperty::isEnumType () const"
|
|
Returns TRUE if the property's type is an enumeration value; otherwise returns FALSE.
|
|
.PP
|
|
See also isSetType() and enumKeys().
|
|
.SH "bool QMetaProperty::isSetType () const"
|
|
Returns TRUE if the property's type is an enumeration value that is used as set, i.e. if the enumeration values can be OR-ed together; otherwise returns FALSE. A set type is implicitly also an enum type.
|
|
.PP
|
|
See also isEnumType() and enumKeys().
|
|
.SH "int QMetaProperty::keyToValue ( const char * key ) const"
|
|
Converts the enumeration key \fIkey\fR to its integer value.
|
|
.PP
|
|
For set types, use keysToValue().
|
|
.PP
|
|
See also valueToKey(), isSetType(), and keysToValue().
|
|
.SH "int QMetaProperty::keysToValue ( const QStrList & keys ) const"
|
|
Converts the list of keys \fIkeys\fR to their combined (OR-ed) integer value.
|
|
.PP
|
|
See also isSetType() and valueToKey().
|
|
.SH "const char * QMetaProperty::name () const"
|
|
Returns the name of the property.
|
|
.SH "bool QMetaProperty::reset ( QObject * o ) const"
|
|
Tries to reset the property for object \fIo\fR with a reset method. On success, returns TRUE; otherwise returns FALSE.
|
|
.PP
|
|
Reset methods are optional, usually only a few properties support them.
|
|
.SH "bool QMetaProperty::scriptable ( QObject * o = 0 ) const"
|
|
Returns TRUE if the property is scriptable for object \fIo\fR; otherwise returns FALSE.
|
|
.PP
|
|
If no object \fIo\fR is given, the function returns a static approximation.
|
|
.SH "bool QMetaProperty::stored ( QObject * o = 0 ) const"
|
|
Returns TRUE if the property shall be stored for object \fIo\fR; otherwise returns FALSE.
|
|
.PP
|
|
If no object \fIo\fR is given, the function returns a static approximation.
|
|
.SH "const char * QMetaProperty::type () const"
|
|
Returns the type of the property.
|
|
.SH "const char * QMetaProperty::valueToKey ( int value ) const"
|
|
Converts the enumeration value \fIvalue\fR to its literal key.
|
|
.PP
|
|
For set types, use valueToKeys().
|
|
.PP
|
|
See also isSetType() and valueToKeys().
|
|
.SH "QStrList QMetaProperty::valueToKeys ( int value ) const"
|
|
Converts the set value \fIvalue\fR to a list of keys.
|
|
.PP
|
|
See also isSetType() and valueToKey().
|
|
.SH "bool QMetaProperty::writable () const"
|
|
Returns TRUE if the property is writable; otherwise returns FALSE.
|
|
.PP
|
|
|
|
.SH "SEE ALSO"
|
|
.BR http://doc.trolltech.com/qmetaproperty.html
|
|
.BR http://www.trolltech.com/faq/tech.html
|
|
.SH COPYRIGHT
|
|
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
|
|
license file included in the distribution for a complete license
|
|
statement.
|
|
.SH AUTHOR
|
|
Generated automatically from the source code.
|
|
.SH BUGS
|
|
If you find a bug in Qt, please report it as described in
|
|
.BR http://doc.trolltech.com/bughowto.html .
|
|
Good bug reports help us to help you. Thank you.
|
|
.P
|
|
The definitive TQt documentation is provided in HTML format; it is
|
|
located at $QTDIR/doc/html and can be read using TQt Assistant or with
|
|
a web browser. This man page is provided as a convenience for those
|
|
users who prefer man pages, although this format is not officially
|
|
supported by Trolltech.
|
|
.P
|
|
If you find errors in this manual page, please report them to
|
|
.BR qt-bugs@trolltech.com .
|
|
Please include the name of the manual page (tqmetaproperty.3qt) and the Qt
|
|
version (3.3.8).
|