You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
174 lines
8.4 KiB
174 lines
8.4 KiB
14 years ago
|
<!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>QMetaProperty 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>QMetaProperty Class Reference</h1>
|
||
|
|
||
|
<p>The QMetaProperty class stores meta data about a property.
|
||
|
<a href="#details">More...</a>
|
||
|
<p><tt>#include <<a href="qmetaobject-h.html">qmetaobject.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>QStrList <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 QStrList & keys ) const</li>
|
||
|
<li class=fn>QStrList <a href="#valueToKeys"><b>valueToKeys</b></a> ( int value ) const</li>
|
||
|
<li class=fn>bool <a href="#designable"><b>designable</b></a> ( QObject * o = 0 ) const</li>
|
||
|
<li class=fn>bool <a href="#scriptable"><b>scriptable</b></a> ( QObject * o = 0 ) const</li>
|
||
|
<li class=fn>bool <a href="#stored"><b>stored</b></a> ( QObject * o = 0 ) const</li>
|
||
|
<li class=fn>bool <a href="#reset"><b>reset</b></a> ( QObject * o ) const</li>
|
||
|
</ul>
|
||
|
<hr><a name="details"></a><h2>Detailed Description</h2>
|
||
|
|
||
|
|
||
|
<p> The QMetaProperty 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="qobject.html">QObject</a>'s set
|
||
|
and get functions. See <a href="qobject.html#setProperty">QObject::setProperty</a>() and
|
||
|
<a href="qobject.html#property">QObject::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="qmetaobject.html#property">QMetaObject::property</a>() and <a href="qmetaobject.html#propertyNames">QMetaObject::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>QMetaProperty::designable ( <a href="qobject.html">QObject</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="qstrlist.html">QStrList</a> <a name="enumKeys"></a>QMetaProperty::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>QMetaProperty::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>QMetaProperty::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>QMetaProperty::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>QMetaProperty::keysToValue ( const <a href="qstrlist.html">QStrList</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>QMetaProperty::name () const
|
||
|
</h3>
|
||
|
|
||
|
<p> Returns the name of the property.
|
||
|
|
||
|
<h3 class=fn>bool <a name="reset"></a>QMetaProperty::reset ( <a href="qobject.html">QObject</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>QMetaProperty::scriptable ( <a href="qobject.html">QObject</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>QMetaProperty::stored ( <a href="qobject.html">QObject</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>QMetaProperty::type () const
|
||
|
</h3>
|
||
|
|
||
|
<p> Returns the type of the property.
|
||
|
|
||
|
<h3 class=fn>const char * <a name="valueToKey"></a>QMetaProperty::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="qstrlist.html">QStrList</a> <a name="valueToKeys"></a>QMetaProperty::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>QMetaProperty::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">Qt 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>Qt 3.3.8</div>
|
||
|
</table></div></address></body>
|
||
|
</html>
|