Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 867

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QMetaProperty Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QMetaProperty Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QMetaProperty class provides meta-data about a property.
<a href="#details">More...</a></p>

<h3>Methods</h3><ul><li><div class="fn" /><b><a href="qmetaproperty.html#QMetaProperty">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmetaproperty.html#QMetaProperty-2">__init__</a></b> (<i>self</i>, QMetaProperty)</li><li><div class="fn" />QMetaEnum <b><a href="qmetaproperty.html#enumerator">enumerator</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmetaproperty.html#hasNotifySignal">hasNotifySignal</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmetaproperty.html#hasStdCppSet">hasStdCppSet</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmetaproperty.html#isConstant">isConstant</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmetaproperty.html#isDesignable">isDesignable</a></b> (<i>self</i>, QObject&#160;<i>object</i>&#160;=&#160;None)</li><li><div class="fn" />bool <b><a href="qmetaproperty.html#isEditable">isEditable</a></b> (<i>self</i>, QObject&#160;<i>object</i>&#160;=&#160;None)</li><li><div class="fn" />bool <b><a href="qmetaproperty.html#isEnumType">isEnumType</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmetaproperty.html#isFinal">isFinal</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmetaproperty.html#isFlagType">isFlagType</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmetaproperty.html#isReadable">isReadable</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmetaproperty.html#isResettable">isResettable</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmetaproperty.html#isScriptable">isScriptable</a></b> (<i>self</i>, QObject&#160;<i>object</i>&#160;=&#160;None)</li><li><div class="fn" />bool <b><a href="qmetaproperty.html#isStored">isStored</a></b> (<i>self</i>, QObject&#160;<i>object</i>&#160;=&#160;None)</li><li><div class="fn" />bool <b><a href="qmetaproperty.html#isUser">isUser</a></b> (<i>self</i>, QObject&#160;<i>object</i>&#160;=&#160;None)</li><li><div class="fn" />bool <b><a href="qmetaproperty.html#isValid">isValid</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmetaproperty.html#isWritable">isWritable</a></b> (<i>self</i>)</li><li><div class="fn" />str <b><a href="qmetaproperty.html#name">name</a></b> (<i>self</i>)</li><li><div class="fn" />QMetaMethod <b><a href="qmetaproperty.html#notifySignal">notifySignal</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qmetaproperty.html#notifySignalIndex">notifySignalIndex</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qmetaproperty.html#propertyIndex">propertyIndex</a></b> (<i>self</i>)</li><li><div class="fn" />QVariant <b><a href="qmetaproperty.html#read">read</a></b> (<i>self</i>, QObject&#160;<i>obj</i>)</li><li><div class="fn" />bool <b><a href="qmetaproperty.html#reset">reset</a></b> (<i>self</i>, QObject&#160;<i>obj</i>)</li><li><div class="fn" />Type <b><a href="qmetaproperty.html#type">type</a></b> (<i>self</i>)</li><li><div class="fn" />str <b><a href="qmetaproperty.html#typeName">typeName</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qmetaproperty.html#userType">userType</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmetaproperty.html#write">write</a></b> (<i>self</i>, QObject&#160;<i>obj</i>, QVariant&#160;<i>value</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QMetaProperty class provides meta-data about a property.</p>
<p>Property meta-data is obtained from an object's meta-object. See
<a href="qmetaobject.html#property">QMetaObject.property</a>() and
<a href="qmetaobject.html#propertyCount">QMetaObject.propertyCount</a>()
for details.</p>
<a id="property-meta-data" name="property-meta-data" />
<h3>Property Meta-Data</h3>
<p>A property has a <a href="qmetaproperty.html#name">name</a>()
and a <a href="qmetaproperty.html#type">type</a>(), as well as
various attributes that specify its behavior: <a href="qmetaproperty.html#isReadable">isReadable</a>(), <a href="qmetaproperty.html#isWritable">isWritable</a>(), <a href="qmetaproperty.html#isDesignable">isDesignable</a>(), <a href="qmetaproperty.html#isScriptable">isScriptable</a>(), and <a href="qmetaproperty.html#isStored">isStored</a>().</p>
<p>If the property is an enumeration, <a href="qmetaproperty.html#isEnumType">isEnumType</a>() returns true; if
the property is an enumeration that is also a flag (i.e. its values
can be combined using the OR operator), <a href="qmetaproperty.html#isEnumType">isEnumType</a>() and <a href="qmetaproperty.html#isFlagType">isFlagType</a>() both return true.
The enumerator for these types is available from <a href="qmetaproperty.html#enumerator">enumerator</a>().</p>
<p>The property's values are set and retrieved with <a href="qmetaproperty.html#read">read</a>(), <a href="qmetaproperty.html#write">write</a>(), and <a href="qmetaproperty.html#reset">reset</a>(); they can also be changed
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>
<a id="copying-and-assignment" name="copying-and-assignment" />
<h3>Copying and Assignment</h3>
<p>QMetaProperty objects can be copied by value. However, each copy
will refer to the same underlying property meta-data.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QMetaProperty" />QMetaProperty.__init__ (<i>self</i>)</h3><h3 class="fn"><a name="QMetaProperty-2" />QMetaProperty.__init__ (<i>self</i>, <a href="qmetaproperty.html">QMetaProperty</a>)</h3><h3 class="fn"><a name="enumerator" /><a href="qmetaenum.html">QMetaEnum</a> QMetaProperty.enumerator (<i>self</i>)</h3><p>Returns the enumerator if this property's type is an enumerator
type; otherwise the returned value is undefined.</p>
<p><b>See also</b> <a href="qmetaproperty.html#isEnumType">isEnumType</a>() and <a href="qmetaproperty.html#isFlagType">isFlagType</a>().</p>


<h3 class="fn"><a name="hasNotifySignal" />bool QMetaProperty.hasNotifySignal (<i>self</i>)</h3><p>Returns true if this property has a corresponding change notify
signal; otherwise returns false.</p>
<p><b>See also</b> <a href="qmetaproperty.html#notifySignal">notifySignal</a>().</p>


<h3 class="fn"><a name="hasStdCppSet" />bool QMetaProperty.hasStdCppSet (<i>self</i>)</h3><h3 class="fn"><a name="isConstant" />bool QMetaProperty.isConstant (<i>self</i>)</h3><p>Returns true if the property is constant; otherwise returns
false.</p>
<p>A property is constant if the <tt>Q_PROPERTY()</tt>'s
<tt>CONSTANT</tt> attribute is set.</p>
<p>This function was introduced in Qt 4.6.</p>


<h3 class="fn"><a name="isDesignable" />bool QMetaProperty.isDesignable (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>object</i>&#160;=&#160;None)</h3><p>Returns true if this property is designable for the given
<i>object</i>; otherwise returns false.</p>
<p>If no <i>object</i> is given, the function returns false if the
<tt>Q_PROPERTY()</tt>'s <tt>DESIGNABLE</tt> attribute is false;
otherwise returns true (if the attribute is true or is a function
or expression).</p>
<p><b>See also</b> <a href="qmetaproperty.html#isScriptable">isScriptable</a>() and <a href="qmetaproperty.html#isStored">isStored</a>().</p>


<h3 class="fn"><a name="isEditable" />bool QMetaProperty.isEditable (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>object</i>&#160;=&#160;None)</h3><h3 class="fn"><a name="isEnumType" />bool QMetaProperty.isEnumType (<i>self</i>)</h3><p>Returns true if the property's type is an enumeration value;
otherwise returns false.</p>
<p><b>See also</b> <a href="qmetaproperty.html#enumerator">enumerator</a>() and <a href="qmetaproperty.html#isFlagType">isFlagType</a>().</p>


<h3 class="fn"><a name="isFinal" />bool QMetaProperty.isFinal (<i>self</i>)</h3><p>Returns true if the property is final; otherwise returns
false.</p>
<p>A property is final if the <tt>Q_PROPERTY()</tt>'s
<tt>FINAL</tt> attribute is set.</p>
<p>This function was introduced in Qt 4.6.</p>


<h3 class="fn"><a name="isFlagType" />bool QMetaProperty.isFlagType (<i>self</i>)</h3><p>Returns true if the property's type is an enumeration value that
is used as a flag; otherwise returns false.</p>
<p>Flags can be combined using the OR operator. A flag type is
implicitly also an enum type.</p>
<p><b>See also</b> <a href="qmetaproperty.html#isEnumType">isEnumType</a>(), <a href="qmetaproperty.html#enumerator">enumerator</a>(), and <a href="qmetaenum.html#isFlag">QMetaEnum.isFlag</a>().</p>


<h3 class="fn"><a name="isReadable" />bool QMetaProperty.isReadable (<i>self</i>)</h3><p>Returns true if this property is readable; otherwise returns
false.</p>
<p><b>See also</b> <a href="qmetaproperty.html#isWritable">isWritable</a>(), <a href="qmetaproperty.html#read">read</a>(), and <a href="qmetaproperty.html#isValid">isValid</a>().</p>


<h3 class="fn"><a name="isResettable" />bool QMetaProperty.isResettable (<i>self</i>)</h3><p>Returns true if this property can be reset to a default value;
otherwise returns false.</p>
<p><b>See also</b> <a href="qmetaproperty.html#reset">reset</a>().</p>


<h3 class="fn"><a name="isScriptable" />bool QMetaProperty.isScriptable (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>object</i>&#160;=&#160;None)</h3><p>Returns true if the property is scriptable for the given
<i>object</i>; otherwise returns false.</p>
<p>If no <i>object</i> is given, the function returns false if the
<tt>Q_PROPERTY()</tt>'s <tt>SCRIPTABLE</tt> attribute is false;
otherwise returns true (if the attribute is true or is a function
or expression).</p>
<p><b>See also</b> <a href="qmetaproperty.html#isDesignable">isDesignable</a>() and <a href="qmetaproperty.html#isStored">isStored</a>().</p>


<h3 class="fn"><a name="isStored" />bool QMetaProperty.isStored (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>object</i>&#160;=&#160;None)</h3><p>Returns true if the property is stored for <i>object</i>;
otherwise returns false.</p>
<p>If no <i>object</i> is given, the function returns false if the
<tt>Q_PROPERTY()</tt>'s <tt>STORED</tt> attribute is false;
otherwise returns true (if the attribute is true or is a function
or expression).</p>
<p><b>See also</b> <a href="qmetaproperty.html#isDesignable">isDesignable</a>() and <a href="qmetaproperty.html#isScriptable">isScriptable</a>().</p>


<h3 class="fn"><a name="isUser" />bool QMetaProperty.isUser (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>object</i>&#160;=&#160;None)</h3><p>Returns true if this property is designated as the <tt>USER</tt>
property, i.e., the one that the user can edit for <i>object</i> or
that is significant in some other way. Otherwise it returns false.
e.g., the <tt>text</tt> property is the <tt>USER</tt> editable
property of a <a href="qlineedit.html">QLineEdit</a>.</p>
<p>If <i>object</i> is null, the function returns false if the
<tt>Q_PROPERTY()</tt>'s <tt>USER</tt> attribute is false. Otherwise
it returns true.</p>
<p><b>See also</b> <a href="qmetaobject.html#userProperty">QMetaObject.userProperty</a>(),
<a href="qmetaproperty.html#isDesignable">isDesignable</a>(), and
<a href="qmetaproperty.html#isScriptable">isScriptable</a>().</p>


<h3 class="fn"><a name="isValid" />bool QMetaProperty.isValid (<i>self</i>)</h3><p>Returns true if this property is valid (readable); otherwise
returns false.</p>
<p><b>See also</b> <a href="qmetaproperty.html#isReadable">isReadable</a>().</p>


<h3 class="fn"><a name="isWritable" />bool QMetaProperty.isWritable (<i>self</i>)</h3><p>Returns true if this property is writable; otherwise returns
false.</p>
<p><b>See also</b> <a href="qmetaproperty.html#isReadable">isReadable</a>() and <a href="qmetaproperty.html#write">write</a>().</p>


<h3 class="fn"><a name="name" />str QMetaProperty.name (<i>self</i>)</h3><p>Returns this property's name.</p>
<p><b>See also</b> <a href="qmetaproperty.html#type">type</a>() and
<a href="qmetaproperty.html#typeName">typeName</a>().</p>


<h3 class="fn"><a name="notifySignal" /><a href="qmetamethod.html">QMetaMethod</a> QMetaProperty.notifySignal (<i>self</i>)</h3><p>Returns the <a href="qmetamethod.html">QMetaMethod</a> instance
of the property change notifying signal if one was specified,
otherwise returns an invalid <a href="qmetamethod.html">QMetaMethod</a>.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qmetaproperty.html#hasNotifySignal">hasNotifySignal</a>().</p>


<h3 class="fn"><a name="notifySignalIndex" />int QMetaProperty.notifySignalIndex (<i>self</i>)</h3><p>Returns the index of the property change notifying signal if one
was specified, otherwise returns -1.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also</b> <a href="qmetaproperty.html#hasNotifySignal">hasNotifySignal</a>().</p>


<h3 class="fn"><a name="propertyIndex" />int QMetaProperty.propertyIndex (<i>self</i>)</h3><p>Returns this property's index.</p>
<p>This function was introduced in Qt 4.6.</p>


<h3 class="fn"><a name="read" />QVariant QMetaProperty.read (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>obj</i>)</h3><p>Reads the property's value from the given <i>object</i>. Returns
the value if it was able to read it; otherwise returns an invalid
variant.</p>
<p><b>See also</b> <a href="qmetaproperty.html#write">write</a>(),
<a href="qmetaproperty.html#reset">reset</a>(), and <a href="qmetaproperty.html#isReadable">isReadable</a>().</p>


<h3 class="fn"><a name="reset" />bool QMetaProperty.reset (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>obj</i>)</h3><p>Resets the property for the given <i>object</i> with a reset
method. Returns true if the reset worked; otherwise returns
false.</p>
<p>Reset methods are optional; only a few properties support
them.</p>
<p><b>See also</b> <a href="qmetaproperty.html#read">read</a>() and
<a href="qmetaproperty.html#write">write</a>().</p>


<h3 class="fn"><a name="type" /><a href="qtcore.html#Type-enum">Type</a> QMetaProperty.type (<i>self</i>)</h3><p>Returns this property's type. The return value is one of the
values of the <a href="qvariant.html#Type-enum">QVariant.Type</a>
enumeration.</p>
<p><b>See also</b> <a href="qmetaproperty.html#userType">userType</a>(), <a href="qmetaproperty.html#typeName">typeName</a>(), and <a href="qmetaproperty.html#name">name</a>().</p>


<h3 class="fn"><a name="typeName" />str QMetaProperty.typeName (<i>self</i>)</h3><p>Returns the name of this property's type.</p>
<p><b>See also</b> <a href="qmetaproperty.html#type">type</a>() and
<a href="qmetaproperty.html#name">name</a>().</p>


<h3 class="fn"><a name="userType" />int QMetaProperty.userType (<i>self</i>)</h3><p>Returns this property's user type. The return value is one of
the values that are registered with <a href="qmetatype.html">QMetaType</a>, or 0 if the type is not
registered.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qmetaproperty.html#type">type</a>(),
<a href="qmetatype.html">QMetaType</a>, and <a href="qmetaproperty.html#typeName">typeName</a>().</p>


<h3 class="fn"><a name="write" />bool QMetaProperty.write (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>obj</i>, QVariant&#160;<i>value</i>)</h3><p>Writes <i>value</i> as the property's value to the given
<i>object</i>. Returns true if the write succeeded; otherwise
returns false.</p>
<p><b>See also</b> <a href="qmetaproperty.html#read">read</a>(),
<a href="qmetaproperty.html#reset">reset</a>(), and <a href="qmetaproperty.html#isWritable">isWritable</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>