source: trunk/doc/html/qmetaproperty.html

Last change on this file was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 8.6 KB
RevLine 
[190]1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/kernel/qmetaobject.cpp:844 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>QMetaProperty Class</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { background: #ffffff; color: black; }
12--></style>
13</head>
14<body>
15
16<table border="0" cellpadding="0" cellspacing="0" width="100%">
17<tr bgcolor="#E5E5E5">
18<td valign=center>
19 <a href="index.html">
20<font color="#004faf">Home</font></a>
21 | <a href="classes.html">
22<font color="#004faf">All&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;Classes</font></a>
25 | <a href="annotated.html">
26<font color="#004faf">Annotated</font></a>
27 | <a href="groups.html">
28<font color="#004faf">Grouped&nbsp;Classes</font></a>
29 | <a href="functions.html">
30<font color="#004faf">Functions</font></a>
31</td>
32<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QMetaProperty Class Reference</h1>
33
34<p>The QMetaProperty class stores meta data about a property.
35<a href="#details">More...</a>
36<p><tt>#include &lt;<a href="qmetaobject-h.html">qmetaobject.h</a>&gt;</tt>
37<p><a href="qmetaproperty-members.html">List of all member functions.</a>
38<h2>Public Members</h2>
39<ul>
40<li class=fn>const char * <a href="#type"><b>type</b></a> () const</li>
41<li class=fn>const char * <a href="#name"><b>name</b></a> () const</li>
42<li class=fn>bool <a href="#writable"><b>writable</b></a> () const</li>
43<li class=fn>bool <a href="#isSetType"><b>isSetType</b></a> () const</li>
44<li class=fn>bool <a href="#isEnumType"><b>isEnumType</b></a> () const</li>
45<li class=fn>QStrList <a href="#enumKeys"><b>enumKeys</b></a> () const</li>
46<li class=fn>int <a href="#keyToValue"><b>keyToValue</b></a> ( const&nbsp;char&nbsp;*&nbsp;key ) const</li>
47<li class=fn>const char * <a href="#valueToKey"><b>valueToKey</b></a> ( int&nbsp;value ) const</li>
48<li class=fn>int <a href="#keysToValue"><b>keysToValue</b></a> ( const&nbsp;QStrList&nbsp;&amp;&nbsp;keys ) const</li>
49<li class=fn>QStrList <a href="#valueToKeys"><b>valueToKeys</b></a> ( int&nbsp;value ) const</li>
50<li class=fn>bool <a href="#designable"><b>designable</b></a> ( QObject&nbsp;*&nbsp;o = 0 ) const</li>
51<li class=fn>bool <a href="#scriptable"><b>scriptable</b></a> ( QObject&nbsp;*&nbsp;o = 0 ) const</li>
52<li class=fn>bool <a href="#stored"><b>stored</b></a> ( QObject&nbsp;*&nbsp;o = 0 ) const</li>
53<li class=fn>bool <a href="#reset"><b>reset</b></a> ( QObject&nbsp;*&nbsp;o ) const</li>
54</ul>
55<hr><a name="details"></a><h2>Detailed Description</h2>
56
57
58<p> The QMetaProperty class stores meta data about a property.
59<p>
60<p> Property meta data includes <a href="#type">type</a>(), <a href="#name">name</a>(), and whether a property
61is <a href="#writable">writable</a>(), <a href="#designable">designable</a>() and <a href="#stored">stored</a>().
62<p> The functions <a href="#isSetType">isSetType</a>(), <a href="#isEnumType">isEnumType</a>() and <a href="#enumKeys">enumKeys</a>() provide
63further information about a property's type. The conversion
64functions <a href="#keyToValue">keyToValue</a>(), <a href="#valueToKey">valueToKey</a>(), <a href="#keysToValue">keysToValue</a>() and
65<a href="#valueToKeys">valueToKeys</a>() allow conversion between the integer representation
66of an enumeration or set value and its literal representation.
67<p> Actual property values are set and received through <a href="qobject.html">QObject</a>'s set
68and get functions. See <a href="qobject.html#setProperty">QObject::setProperty</a>() and
69<a href="qobject.html#property">QObject::property</a>() for details.
70<p> You receive meta property data through an object's <a href="metaobjects.html#meta-object">meta object</a>.
71See <a href="qmetaobject.html#property">QMetaObject::property</a>() and <a href="qmetaobject.html#propertyNames">QMetaObject::propertyNames</a>() for
72details.
73<p>See also <a href="objectmodel.html">Object Model</a>.
74
75<hr><h2>Member Function Documentation</h2>
76<h3 class=fn>bool <a name="designable"></a>QMetaProperty::designable ( <a href="qobject.html">QObject</a>&nbsp;*&nbsp;o = 0 ) const
77</h3> Returns TRUE if the property is designable for object <em>o</em>;
78otherwise returns FALSE.
79<p> If no object <em>o</em> is given, the function returns a static
80approximation.
81
82<h3 class=fn><a href="qstrlist.html">QStrList</a> <a name="enumKeys"></a>QMetaProperty::enumKeys () const
83</h3>
84Returns the possible enumeration keys if this property is an
85enumeration type (or a set type).
86<p> <p>See also <a href="#isEnumType">isEnumType</a>().
87
88<h3 class=fn>bool <a name="isEnumType"></a>QMetaProperty::isEnumType () const
89</h3>
90
91<p> Returns TRUE if the property's type is an enumeration value;
92otherwise returns FALSE.
93<p> <p>See also <a href="#isSetType">isSetType</a>() and <a href="#enumKeys">enumKeys</a>().
94
95<h3 class=fn>bool <a name="isSetType"></a>QMetaProperty::isSetType () const
96</h3>
97
98<p> Returns TRUE if the property's type is an enumeration value that
99is used as set, i.e. if the enumeration values can be OR-ed
100together; otherwise returns FALSE. A set type is implicitly also
101an enum type.
102<p> <p>See also <a href="#isEnumType">isEnumType</a>() and <a href="#enumKeys">enumKeys</a>().
103
104<h3 class=fn>int <a name="keyToValue"></a>QMetaProperty::keyToValue ( const&nbsp;char&nbsp;*&nbsp;key ) const
105</h3>
106Converts the enumeration key <em>key</em> to its integer value.
107<p> For set types, use <a href="#keysToValue">keysToValue</a>().
108<p> <p>See also <a href="#valueToKey">valueToKey</a>(), <a href="#isSetType">isSetType</a>(), and <a href="#keysToValue">keysToValue</a>().
109
110<h3 class=fn>int <a name="keysToValue"></a>QMetaProperty::keysToValue ( const&nbsp;<a href="qstrlist.html">QStrList</a>&nbsp;&amp;&nbsp;keys ) const
111</h3>
112Converts the list of keys <em>keys</em> to their combined (OR-ed)
113integer value.
114<p> <p>See also <a href="#isSetType">isSetType</a>() and <a href="#valueToKey">valueToKey</a>().
115
116<h3 class=fn>const char * <a name="name"></a>QMetaProperty::name () const
117</h3>
118
119<p> Returns the name of the property.
120
121<h3 class=fn>bool <a name="reset"></a>QMetaProperty::reset ( <a href="qobject.html">QObject</a>&nbsp;*&nbsp;o ) const
122</h3>
123Tries to reset the property for object <em>o</em> with a reset method.
124On success, returns TRUE; otherwise returns FALSE.
125<p> Reset methods are optional, usually only a few properties support
126them.
127
128<h3 class=fn>bool <a name="scriptable"></a>QMetaProperty::scriptable ( <a href="qobject.html">QObject</a>&nbsp;*&nbsp;o = 0 ) const
129</h3>
130Returns TRUE if the property is scriptable for object <em>o</em>;
131otherwise returns FALSE.
132<p> If no object <em>o</em> is given, the function returns a static
133approximation.
134
135<h3 class=fn>bool <a name="stored"></a>QMetaProperty::stored ( <a href="qobject.html">QObject</a>&nbsp;*&nbsp;o = 0 ) const
136</h3>
137Returns TRUE if the property shall be stored for object <em>o</em>;
138otherwise returns FALSE.
139<p> If no object <em>o</em> is given, the function returns a static
140approximation.
141
142<h3 class=fn>const char * <a name="type"></a>QMetaProperty::type () const
143</h3>
144
145<p> Returns the type of the property.
146
147<h3 class=fn>const char * <a name="valueToKey"></a>QMetaProperty::valueToKey ( int&nbsp;value ) const
148</h3>
149Converts the enumeration value <em>value</em> to its literal key.
150<p> For set types, use <a href="#valueToKeys">valueToKeys</a>().
151<p> <p>See also <a href="#isSetType">isSetType</a>() and <a href="#valueToKeys">valueToKeys</a>().
152
153<h3 class=fn><a href="qstrlist.html">QStrList</a> <a name="valueToKeys"></a>QMetaProperty::valueToKeys ( int&nbsp;value ) const
154</h3>
155Converts the set value <em>value</em> to a list of keys.
156<p> <p>See also <a href="#isSetType">isSetType</a>() and <a href="#valueToKey">valueToKey</a>().
157
158<h3 class=fn>bool <a name="writable"></a>QMetaProperty::writable () const
159</h3>
160
161<p> Returns TRUE if the property is writable; otherwise returns FALSE.
162<p>
163<!-- eof -->
164<hr><p>
165This file is part of the <a href="index.html">Qt toolkit</a>.
166Copyright &copy; 1995-2007
167<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
168<table width=100% cellspacing=0 border=0><tr>
169<td>Copyright &copy; 2007
170<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
171<td align=right><div align=right>Qt 3.3.8</div>
172</table></div></address></body>
173</html>
Note: See TracBrowser for help on using the repository browser.