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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/kernel/qmetaobject.cpp:844 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>TQMetaProperty Class</title>
<style type="text/css"><!--
fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
--></style>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#E5E5E5">
<td valign=center>
<a href="index.html">
<font color="#004faf">Home</font></a>
| <a href="classes.html">
<font color="#004faf">All Classes</font></a>
| <a href="mainclasses.html">
<font color="#004faf">Main Classes</font></a>
| <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
| <a href="groups.html">
<font color="#004faf">Grouped Classes</font></a>
| <a href="functions.html">
<font color="#004faf">Functions</font></a>
</td>
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>TQMetaProperty Class Reference</h1>
<p>The TQMetaProperty class stores meta data about a property.
<a href="#details">More...</a>
<p><tt>#include <<a href="qmetaobject-h.html">ntqmetaobject.h</a>></tt>
<p><a href="qmetaproperty-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li class=fn>const char * <a href="#type"><b>type</b></a> () const</li>
<li class=fn>const char * <a href="#name"><b>name</b></a> () const</li>
<li class=fn>bool <a href="#writable"><b>writable</b></a> () const</li>
<li class=fn>bool <a href="#isSetType"><b>isSetType</b></a> () const</li>
<li class=fn>bool <a href="#isEnumType"><b>isEnumType</b></a> () const</li>
<li class=fn>TQStrList <a href="#enumKeys"><b>enumKeys</b></a> () const</li>
<li class=fn>int <a href="#keyToValue"><b>keyToValue</b></a> ( const char * key ) const</li>
<li class=fn>const char * <a href="#valueToKey"><b>valueToKey</b></a> ( int value ) const</li>
<li class=fn>int <a href="#keysToValue"><b>keysToValue</b></a> ( const TQStrList & keys ) const</li>
<li class=fn>TQStrList <a href="#valueToKeys"><b>valueToKeys</b></a> ( int value ) const</li>
<li class=fn>bool <a href="#designable"><b>designable</b></a> ( TQObject * o = 0 ) const</li>
<li class=fn>bool <a href="#scriptable"><b>scriptable</b></a> ( TQObject * o = 0 ) const</li>
<li class=fn>bool <a href="#stored"><b>stored</b></a> ( TQObject * o = 0 ) const</li>
<li class=fn>bool <a href="#reset"><b>reset</b></a> ( TQObject * o ) const</li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>
<p> The TQMetaProperty class stores meta data about a property.
<p>
<p> Property meta data includes <a href="#type">type</a>(), <a href="#name">name</a>(), and whether a property
is <a href="#writable">writable</a>(), <a href="#designable">designable</a>() and <a href="#stored">stored</a>().
<p> The functions <a href="#isSetType">isSetType</a>(), <a href="#isEnumType">isEnumType</a>() and <a href="#enumKeys">enumKeys</a>() provide
further information about a property's type. The conversion
functions <a href="#keyToValue">keyToValue</a>(), <a href="#valueToKey">valueToKey</a>(), <a href="#keysToValue">keysToValue</a>() and
<a href="#valueToKeys">valueToKeys</a>() allow conversion between the integer representation
of an enumeration or set value and its literal representation.
<p> Actual property values are set and received through <a href="ntqobject.html">TQObject</a>'s set
and get functions. See <a href="ntqobject.html#setProperty">TQObject::setProperty</a>() and
<a href="ntqobject.html#property">TQObject::property</a>() for details.
<p> You receive meta property data through an object's <a href="metaobjects.html#meta-object">meta object</a>.
See <a href="ntqmetaobject.html#property">TQMetaObject::property</a>() and <a href="ntqmetaobject.html#propertyNames">TQMetaObject::propertyNames</a>() for
details.
<p>See also <a href="objectmodel.html">Object Model</a>.
<hr><h2>Member Function Documentation</h2>
<h3 class=fn>bool <a name="designable"></a>TQMetaProperty::designable ( <a href="ntqobject.html">TQObject</a> * o = 0 ) const
</h3> Returns TRUE if the property is designable for object <em>o</em>;
otherwise returns FALSE.
<p> If no object <em>o</em> is given, the function returns a static
approximation.
<h3 class=fn><a href="ntqstrlist.html">TQStrList</a> <a name="enumKeys"></a>TQMetaProperty::enumKeys () const
</h3>
Returns the possible enumeration keys if this property is an
enumeration type (or a set type).
<p> <p>See also <a href="#isEnumType">isEnumType</a>().
<h3 class=fn>bool <a name="isEnumType"></a>TQMetaProperty::isEnumType () const
</h3>
<p> Returns TRUE if the property's type is an enumeration value;
otherwise returns FALSE.
<p> <p>See also <a href="#isSetType">isSetType</a>() and <a href="#enumKeys">enumKeys</a>().
<h3 class=fn>bool <a name="isSetType"></a>TQMetaProperty::isSetType () const
</h3>
<p> 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.
<p> <p>See also <a href="#isEnumType">isEnumType</a>() and <a href="#enumKeys">enumKeys</a>().
<h3 class=fn>int <a name="keyToValue"></a>TQMetaProperty::keyToValue ( const char * key ) const
</h3>
Converts the enumeration key <em>key</em> to its integer value.
<p> For set types, use <a href="#keysToValue">keysToValue</a>().
<p> <p>See also <a href="#valueToKey">valueToKey</a>(), <a href="#isSetType">isSetType</a>(), and <a href="#keysToValue">keysToValue</a>().
<h3 class=fn>int <a name="keysToValue"></a>TQMetaProperty::keysToValue ( const <a href="ntqstrlist.html">TQStrList</a> & keys ) const
</h3>
Converts the list of keys <em>keys</em> to their combined (OR-ed)
integer value.
<p> <p>See also <a href="#isSetType">isSetType</a>() and <a href="#valueToKey">valueToKey</a>().
<h3 class=fn>const char * <a name="name"></a>TQMetaProperty::name () const
</h3>
<p> Returns the name of the property.
<h3 class=fn>bool <a name="reset"></a>TQMetaProperty::reset ( <a href="ntqobject.html">TQObject</a> * o ) const
</h3>
Tries to reset the property for object <em>o</em> with a reset method.
On success, returns TRUE; otherwise returns FALSE.
<p> Reset methods are optional, usually only a few properties support
them.
<h3 class=fn>bool <a name="scriptable"></a>TQMetaProperty::scriptable ( <a href="ntqobject.html">TQObject</a> * o = 0 ) const
</h3>
Returns TRUE if the property is scriptable for object <em>o</em>;
otherwise returns FALSE.
<p> If no object <em>o</em> is given, the function returns a static
approximation.
<h3 class=fn>bool <a name="stored"></a>TQMetaProperty::stored ( <a href="ntqobject.html">TQObject</a> * o = 0 ) const
</h3>
Returns TRUE if the property shall be stored for object <em>o</em>;
otherwise returns FALSE.
<p> If no object <em>o</em> is given, the function returns a static
approximation.
<h3 class=fn>const char * <a name="type"></a>TQMetaProperty::type () const
</h3>
<p> Returns the type of the property.
<h3 class=fn>const char * <a name="valueToKey"></a>TQMetaProperty::valueToKey ( int value ) const
</h3>
Converts the enumeration value <em>value</em> to its literal key.
<p> For set types, use <a href="#valueToKeys">valueToKeys</a>().
<p> <p>See also <a href="#isSetType">isSetType</a>() and <a href="#valueToKeys">valueToKeys</a>().
<h3 class=fn><a href="ntqstrlist.html">TQStrList</a> <a name="valueToKeys"></a>TQMetaProperty::valueToKeys ( int value ) const
</h3>
Converts the set value <em>value</em> to a list of keys.
<p> <p>See also <a href="#isSetType">isSetType</a>() and <a href="#valueToKey">valueToKey</a>().
<h3 class=fn>bool <a name="writable"></a>TQMetaProperty::writable () const
</h3>
<p> Returns TRUE if the property is writable; otherwise returns FALSE.
<p>
<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">TQt toolkit</a>.
Copyright © 1995-2007
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright © 2007
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
<td align=right><div align=right>TQt 3.3.8</div>
</table></div></address></body>
</html>
|