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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Qt Toolkit - QMetaProperty Class</title><style type="text/css"><!--
h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }body { background: white; color: black; }
--></style>
</head><body bgcolor="#ffffff">
<table width="100%">
<tr><td><a href="index.html">
<img width="100" height="100" src="qtlogo.png"
alt="Home" border="0"><img width="100"
height="100" src="face.png" alt="Home" border="0">
</a><td valign=top><div align=right><img src="dochead.png" width="472" height="27"><br>
<a href="classes.html"><b>Classes</b></a>
-<a href="annotated.html">Annotated</a>
- <a href="hierarchy.html">Tree</a>
-<a href="functions.html">Functions</a>
-<a href="index.html">Home</a>
-<a href="topicals.html"><b>Structure</b></a>
</div>
</table>
<h1 align=center>QMetaProperty Class Reference</h1><br clear="all">
<p>
The QMetaProperty class stores meta data about a property.
<a href="#details">More...</a>
<p>
<code>#include <<a href="qmetaobject-h.html">qmetaobject.h</a>></code>
<p><a href="qmetaproperty-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li><div class="fn"><b>QMetaProperty</b>()(internal)</div>
<li><div class="fn"><b>~QMetaProperty</b>()(internal)</div>
<li><div class="fn">constchar*<a href="#53b6f5"><b>type</b></a>()const</div>
<li><div class="fn">constchar*<a href="#7cd19b"><b>name</b></a>()const</div>
<li><div class="fn">bool<a href="#321ceb"><b>writable</b></a>()const</div>
<li><div class="fn">bool<b>writeable</b>()const</div>
<li><div class="fn">bool<b>isValid</b>()const(internal)</div>
<li><div class="fn">bool<a href="#714204"><b>isSetType</b></a>()const</div>
<li><div class="fn">bool<a href="#a4ef0b"><b>isEnumType</b></a>()const</div>
<li><div class="fn">QStrList<a href="#b5f959"><b>enumKeys</b></a>()const</div>
<li><div class="fn">int<a href="#bce997"><b>keyToValue</b></a>(constchar*key)const</div>
<li><div class="fn">constchar*<a href="#0110d3"><b>valueToKey</b></a>(intvalue)const</div>
<li><div class="fn">int<a href="#c82d03"><b>keysToValue</b></a>(constQStrList&keys)const</div>
<li><div class="fn">QStrList<a href="#03038c"><b>valueToKeys</b></a>(intvalue)const</div>
<li><div class="fn">bool<a href="#a694ca"><b>stored</b></a>(QObject*)const</div>
<li><div class="fn">bool<a href="#d5aedf"><b>designable</b></a>()const</div>
<li><div class="fn">enum<a href="#Specification"><b>Specification</b></a>{Unspecified, Class, Reference, Pointer, ConstCharStar}</div>
<li><div class="fn">enum<a href="#Flags"><b>Flags</b></a>{UnresolvedEnum=0x00000001, UnresolvedSet=0x00000002, UnresolvedEnumOrSet=0x00000004, UnresolvedStored=0x00000008, UnresolvedDesignable=0x00000010, NotDesignable=0x00000020, NotStored=0x00000040, StdSet=0x00000080}</div>
<li><div class="fn">bool<a href="#caa3ce"><b>testFlags</b></a>(uintf)const</div>
<li><div class="fn">void<a href="#fe9ab3"><b>setFlags</b></a>(uintf)</div>
<li><div class="fn">void<a href="#90e616"><b>clearFlags</b></a>(uintf)</div>
</ul>
<hr><h2><a name="details"></a>Detailed Description</h2>
The QMetaProperty class stores meta data about a property.
<p>
Property meta data mainly consists of a <a href="#53b6f5">type</a>(), a <a href="#7cd19b">name</a>() and the
fact, whether a property is <a href="#321ceb">writable</a>(), <a href="#d5aedf">designable</a>() or <a href="#a694ca">stored</a>().
<p>The functions <a href="#714204">isSetType</a>(), <a href="#a4ef0b">isEnumType</a>() and <a href="#b5f959">enumKeys</a>() provide
further information about a property's type. The conversion
functions <a href="#bce997">keyToValue</a>(), <a href="#0110d3">valueToKey</a>(), <a href="#c82d03">keysToValue</a>() and
<a href="#03038c">valueToKeys</a>() allow to convert 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="qobject.html">QObject</a>'s set
and get functions. See <a href="qobject.html#72ec3f">QObject::setProperty</a>() and
<a href="qobject.html#a110be">QObject::property</a>() for details.
<p>You receive meta property data through an object's meta object. See
<a href="qmetaobject.html#843ead">QMetaObject::property</a>() and <a href="qmetaobject.html#8c9b9c">QMetaObject::propertyNames</a>() for details.
<hr><h2>Member Type Documentation</h2>
<h3 class="fn"><a name="Flags">QMetaProperty::Flags</a></h3>
For internal use only.
<h3 class="fn"><a name="Specification">QMetaProperty::Specification</a></h3>
For internal use only.
<hr><h2>Member Function Documentation</h2>
<h3 class="fn">void<a name="90e616"></a>QMetaProperty::clearFlags(uintf)</h3>
<p>For internal use only.
<h3 class="fn">bool<a name="d5aedf"></a>QMetaProperty::designable()const</h3>
<p>Returns whether the property is considered to be designable or not.
<h3 class="fn"><a href="qstrlist.html">QStrList</a><a name="b5f959"></a>QMetaProperty::enumKeys()const</h3>
<p>Returns the possible enumeration keys if this property is an
enumeration type (or a set type).
<p>See also <a href="#a4ef0b">isEnumType</a>().
<h3 class="fn">bool<a name="a4ef0b"></a>QMetaProperty::isEnumType()const</h3>
<p>Returns whether the property's type is an enumeration value.
<p>See also <a href="#714204">isSetType</a>() and <a href="#b5f959">enumKeys</a>().
<h3 class="fn">bool<a name="714204"></a>QMetaProperty::isSetType()const</h3>
<p>Returns whether the property's type is an enumeration value that is
used as set, i.e. the enumeration values can be or'ed together. A
set type is implicitely also an enum type.
<p>See also <a href="#a4ef0b">isEnumType</a>() and <a href="#b5f959">enumKeys</a>().
<h3 class="fn">int<a name="bce997"></a>QMetaProperty::keyToValue(constchar*key)const</h3>
<p>Converts the enumeration key <em>key</em> to its integer
value.
<p>For set types, use <a href="#c82d03">keysToValue</a>().
<p>See also <a href="#0110d3">valueToKey</a>(), <a href="#714204">isSetType</a>() and <a href="#c82d03">keysToValue</a>().
<h3 class="fn">int<a name="c82d03"></a>QMetaProperty::keysToValue(const<a href="qstrlist.html">QStrList</a>&keys)const</h3>
<p>Converts the list of keys <em>keys</em> to their combined integer
value.
<p>See also <a href="#714204">isSetType</a>(), <a href="#0110d3">valueToKey</a>() and keysToValue().
<h3 class="fn">constchar*<a name="7cd19b"></a>QMetaProperty::name()const</h3>
<p>Returns the name of the property.
<h3 class="fn">void<a name="fe9ab3"></a>QMetaProperty::setFlags(uintf)</h3>
<p>For internal use only.
<h3 class="fn">bool<a name="a694ca"></a>QMetaProperty::stored(<a href="qobject.html">QObject</a>*o)const</h3>
<p>Returns whether the property shall be stored for object <em>o</em> or
not.
<h3 class="fn">bool<a name="caa3ce"></a>QMetaProperty::testFlags(uintf)const</h3>
<p>For internal use only.
<h3 class="fn">constchar*<a name="53b6f5"></a>QMetaProperty::type()const</h3>
<p>Returns the type of the property.
<h3 class="fn">constchar*<a name="0110d3"></a>QMetaProperty::valueToKey(intvalue)const</h3>
<p>Converts the enumeration value <em>value</em> to its literal key.
<p>For set types, use <a href="#03038c">valueToKeys</a>().
<p>See also valueToKey(), <a href="#714204">isSetType</a>() and <a href="#03038c">valueToKeys</a>().
<h3 class="fn"><a href="qstrlist.html">QStrList</a><a name="03038c"></a>QMetaProperty::valueToKeys(intvalue)const</h3>
<p>Converts the set value <em>value</em> to a list of keys.
<p>See also <a href="#714204">isSetType</a>(), <a href="#0110d3">valueToKey</a>() and valueToKeys().
<h3 class="fn">bool<a name="321ceb"></a>QMetaProperty::writable()const</h3>
<p>Returns whether the property is writable or not.
<p>See also <a href="#af964d">isValid</a>().
<h3 class="fn"><a name="1ef13f"></a>QMetaProperty::QMetaProperty()</h3>
<p>For internal use only.
<h3 class="fn"><a name="b86f69"></a>QMetaProperty::~QMetaProperty()</h3>
<p>For internal use only.
<h3 class="fn">bool<a name="af964d"></a>QMetaProperty::isValid()const</h3>
<p>For internal use only.
<hr><p>
Search the documentation, FAQ, qt-interest archive and more (uses
<a href="http://www.trolltech.com">www.trolltech.com</a>):<br>
<form method=post action="http://www.trolltech.com/search.cgi">
<input type=hidden name="version" value="2.3.2"><nobr>
<input size="50" name="search"><input type=submit value="Search">
</nobr></form><hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>,
copyright © 1995-2001
<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 2001 Trolltech<td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align="right"><div align="right">Qt version 2.3.2</div>
</table></div></address></body></html>
|