1QMetaProperty(3qt) QMetaProperty(3qt)
2
3
4
6 QMetaProperty - Stores meta data about a property
7
9 #include <qmetaobject.h>
10
11 Public Members
12 const char * type () const
13 const char * name () const
14 bool writable () const
15 bool isSetType () const
16 bool isEnumType () const
17 QStrList enumKeys () const
18 int keyToValue ( const char * key ) const
19 const char * valueToKey ( int value ) const
20 int keysToValue ( const QStrList & keys ) const
21 QStrList valueToKeys ( int value ) const
22 bool designable ( QObject * o = 0 ) const
23 bool scriptable ( QObject * o = 0 ) const
24 bool stored ( QObject * o = 0 ) const
25 bool reset ( QObject * o ) const
26
28 The QMetaProperty class stores meta data about a property.
29
30 Property meta data includes type(), name(), and whether a property is
31 writable(), designable() and stored().
32
33 The functions isSetType(), isEnumType() and enumKeys() provide further
34 information about a property's type. The conversion functions
35 keyToValue(), valueToKey(), keysToValue() and valueToKeys() allow
36 conversion between the integer representation of an enumeration or set
37 value and its literal representation.
38
39 Actual property values are set and received through QObject's set and
40 get functions. See QObject::setProperty() and QObject::property() for
41 details.
42
43 You receive meta property data through an object's meta object. See
44 QMetaObject::property() and QMetaObject::propertyNames() for details.
45
46 See also Object Model.
47
50 Returns TRUE if the property is designable for object o; otherwise
51 returns FALSE.
52
53 If no object o is given, the function returns a static approximation.
54
56 Returns the possible enumeration keys if this property is an
57 enumeration type (or a set type).
58
59 See also isEnumType().
60
62 Returns TRUE if the property's type is an enumeration value; otherwise
63 returns FALSE.
64
65 See also isSetType() and enumKeys().
66
68 Returns TRUE if the property's type is an enumeration value that is
69 used as set, i.e. if the enumeration values can be OR-ed together;
70 otherwise returns FALSE. A set type is implicitly also an enum type.
71
72 See also isEnumType() and enumKeys().
73
75 Converts the enumeration key key to its integer value.
76
77 For set types, use keysToValue().
78
79 See also valueToKey(), isSetType(), and keysToValue().
80
82 Converts the list of keys keys to their combined (OR-ed) integer value.
83
84 See also isSetType() and valueToKey().
85
87 Returns the name of the property.
88
90 Tries to reset the property for object o with a reset method. On
91 success, returns TRUE; otherwise returns FALSE.
92
93 Reset methods are optional, usually only a few properties support them.
94
96 Returns TRUE if the property is scriptable for object o; otherwise
97 returns FALSE.
98
99 If no object o is given, the function returns a static approximation.
100
102 Returns TRUE if the property shall be stored for object o; otherwise
103 returns FALSE.
104
105 If no object o is given, the function returns a static approximation.
106
108 Returns the type of the property.
109
111 Converts the enumeration value value to its literal key.
112
113 For set types, use valueToKeys().
114
115 See also isSetType() and valueToKeys().
116
118 Converts the set value value to a list of keys.
119
120 See also isSetType() and valueToKey().
121
123 Returns TRUE if the property is writable; otherwise returns FALSE.
124
126 http://doc.trolltech.com/qmetaproperty.html
127 http://www.trolltech.com/faq/tech.html
128
130 Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
131 license file included in the distribution for a complete license
132 statement.
133
135 Generated automatically from the source code.
136
138 If you find a bug in Qt, please report it as described in
139 http://doc.trolltech.com/bughowto.html. Good bug reports help us to
140 help you. Thank you.
141
142 The definitive Qt documentation is provided in HTML format; it is
143 located at $QTDIR/doc/html and can be read using Qt Assistant or with a
144 web browser. This man page is provided as a convenience for those users
145 who prefer man pages, although this format is not officially supported
146 by Trolltech.
147
148 If you find errors in this manual page, please report them to qt-
149 bugs@trolltech.com. Please include the name of the manual page
150 (qmetaproperty.3qt) and the Qt version (3.3.8).
151
152
153
154Trolltech AS 2 February 2007 QMetaProperty(3qt)