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.
tqt3/doc/html/tqmetaproperty.html

173 lines
8.4 KiB

<!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>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&nbsp;Classes</font></a>
| <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
| <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
| <a href="groups.html">
<font color="#004faf">Grouped&nbsp;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 &lt;<a href="tqmetaobject-h.html">tqmetaobject.h</a>&gt;</tt>
<p><a href="tqmetaproperty-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&nbsp;char&nbsp;*&nbsp;key ) const</li>
<li class=fn>const char * <a href="#valueToKey"><b>valueToKey</b></a> ( int&nbsp;value ) const</li>
<li class=fn>int <a href="#keysToValue"><b>keysToValue</b></a> ( const&nbsp;TQStrList&nbsp;&amp;&nbsp;keys ) const</li>
<li class=fn>TQStrList <a href="#valueToKeys"><b>valueToKeys</b></a> ( int&nbsp;value ) const</li>
<li class=fn>bool <a href="#designable"><b>designable</b></a> ( TQObject&nbsp;*&nbsp;o = 0 ) const</li>
<li class=fn>bool <a href="#scriptable"><b>scriptable</b></a> ( TQObject&nbsp;*&nbsp;o = 0 ) const</li>
<li class=fn>bool <a href="#stored"><b>stored</b></a> ( TQObject&nbsp;*&nbsp;o = 0 ) const</li>
<li class=fn>bool <a href="#reset"><b>reset</b></a> ( TQObject&nbsp;*&nbsp;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="tqobject.html">TQObject</a>'s set
and get functions. See <a href="tqobject.html#setProperty">TQObject::setProperty</a>() and
<a href="tqobject.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="tqmetaobject.html#property">TQMetaObject::property</a>() and <a href="tqmetaobject.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="tqobject.html">TQObject</a>&nbsp;*&nbsp;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="tqstrlist.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&nbsp;char&nbsp;*&nbsp;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&nbsp;<a href="tqstrlist.html">TQStrList</a>&nbsp;&amp;&nbsp;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="tqobject.html">TQObject</a>&nbsp;*&nbsp;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="tqobject.html">TQObject</a>&nbsp;*&nbsp;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="tqobject.html">TQObject</a>&nbsp;*&nbsp;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&nbsp;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="tqstrlist.html">TQStrList</a> <a name="valueToKeys"></a>TQMetaProperty::valueToKeys ( int&nbsp;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 &copy; 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 &copy; 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>