1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
'\" 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 Qt documentation is provided in HTML format; it is
located at $QTDIR/doc/html and can be read using Qt 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).
|