Sophie

Sophie

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

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>QMetaEnum 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">QMetaEnum Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QMetaEnum class provides meta-data about an enumerator.
<a href="#details">More...</a></p>

<h3>Methods</h3><ul><li><div class="fn" /><b><a href="qmetaenum.html#QMetaEnum">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmetaenum.html#QMetaEnum-2">__init__</a></b> (<i>self</i>, QMetaEnum)</li><li><div class="fn" />bool <b><a href="qmetaenum.html#isFlag">isFlag</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmetaenum.html#isValid">isValid</a></b> (<i>self</i>)</li><li><div class="fn" />str <b><a href="qmetaenum.html#key">key</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />int <b><a href="qmetaenum.html#keyCount">keyCount</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qmetaenum.html#keysToValue">keysToValue</a></b> (<i>self</i>, str&#160;<i>keys</i>)</li><li><div class="fn" />int <b><a href="qmetaenum.html#keyToValue">keyToValue</a></b> (<i>self</i>, str&#160;<i>key</i>)</li><li><div class="fn" />str <b><a href="qmetaenum.html#name">name</a></b> (<i>self</i>)</li><li><div class="fn" />str <b><a href="qmetaenum.html#scope">scope</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qmetaenum.html#value">value</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />str <b><a href="qmetaenum.html#valueToKey">valueToKey</a></b> (<i>self</i>, int&#160;<i>value</i>)</li><li><div class="fn" />QByteArray <b><a href="qmetaenum.html#valueToKeys">valueToKeys</a></b> (<i>self</i>, int&#160;<i>value</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QMetaEnum class provides meta-data about an enumerator.</p>
<p>Use <a href="qmetaenum.html#name">name</a>() for the
enumerator's name. The enumerator's keys (names of each enumerated
item) are returned by <a href="qmetaenum.html#key">key</a>(); use
<a href="qmetaenum.html#keyCount">keyCount</a>() to find the number
of keys. <a href="qmetaenum.html#isFlag">isFlag</a>() returns
whether the enumerator is meant to be used as a flag, meaning that
its values can be combined using the OR operator.</p>
<p>The conversion functions <a href="qmetaenum.html#keyToValue">keyToValue</a>(), <a href="qmetaenum.html#valueToKey">valueToKey</a>(), <a href="qmetaenum.html#keysToValue">keysToValue</a>(), and <a href="qmetaenum.html#valueToKeys">valueToKeys</a>() allow conversion
between the integer representation of an enumeration or set value
and its literal representation. The <a href="qmetaenum.html#scope">scope</a>() function returns the class scope
this enumerator was declared in.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QMetaEnum" />QMetaEnum.__init__ (<i>self</i>)</h3><h3 class="fn"><a name="QMetaEnum-2" />QMetaEnum.__init__ (<i>self</i>, <a href="qmetaenum.html">QMetaEnum</a>)</h3><h3 class="fn"><a name="isFlag" />bool QMetaEnum.isFlag (<i>self</i>)</h3><p>Returns true if this enumerator is used as a flag; otherwise
returns false.</p>
<p>When used as flags, enumerators can be combined using the OR
operator.</p>
<p><b>See also</b> <a href="qmetaenum.html#keysToValue">keysToValue</a>() and <a href="qmetaenum.html#valueToKeys">valueToKeys</a>().</p>


<h3 class="fn"><a name="isValid" />bool QMetaEnum.isValid (<i>self</i>)</h3><p>Returns true if this enum is valid (has a name); otherwise
returns false.</p>
<p><b>See also</b> <a href="qmetaenum.html#name">name</a>().</p>


<h3 class="fn"><a name="key" />str QMetaEnum.key (<i>self</i>, int&#160;<i>index</i>)</h3><p>Returns the key with the given <i>index</i>, or 0 if no such key
exists.</p>
<p><b>See also</b> <a href="qmetaenum.html#keyCount">keyCount</a>(), <a href="qmetaenum.html#value">value</a>(), and <a href="qmetaenum.html#valueToKey">valueToKey</a>().</p>


<h3 class="fn"><a name="keyCount" />int QMetaEnum.keyCount (<i>self</i>)</h3><p>Returns the number of keys.</p>
<p><b>See also</b> <a href="qmetaenum.html#key">key</a>().</p>


<h3 class="fn"><a name="keysToValue" />int QMetaEnum.keysToValue (<i>self</i>, str&#160;<i>keys</i>)</h3><p>Returns the value derived from combining together the values of
the <i>keys</i> using the OR operator, or -1 if <i>keys</i> is not
defined. Note that the strings in <i>keys</i> must be
'|'-separated.</p>
<p><b>See also</b> <a href="qmetaenum.html#isFlag">isFlag</a>(),
<a href="qmetaenum.html#valueToKey">valueToKey</a>(), and <a href="qmetaenum.html#valueToKeys">valueToKeys</a>().</p>


<h3 class="fn"><a name="keyToValue" />int QMetaEnum.keyToValue (<i>self</i>, str&#160;<i>key</i>)</h3><p>Returns the integer value of the given enumeration <i>key</i>,
or -1 if <i>key</i> is not defined.</p>
<p>For flag types, use <a href="qmetaenum.html#keysToValue">keysToValue</a>().</p>
<p><b>See also</b> <a href="qmetaenum.html#valueToKey">valueToKey</a>(), <a href="qmetaenum.html#isFlag">isFlag</a>(), and <a href="qmetaenum.html#keysToValue">keysToValue</a>().</p>


<h3 class="fn"><a name="name" />str QMetaEnum.name (<i>self</i>)</h3><p>Returns the name of the enumerator (without the scope).</p>
<p>For example, the <a href="qt.html#AlignmentFlag-enum">Qt.AlignmentFlag</a> enumeration has
<tt>AlignmentFlag</tt> as the name and <a href="qt.html">Qt</a> as
the scope.</p>
<p><b>See also</b> <a href="qmetaenum.html#isValid">isValid</a>()
and <a href="qmetaenum.html#scope">scope</a>().</p>


<h3 class="fn"><a name="scope" />str QMetaEnum.scope (<i>self</i>)</h3><p>Returns the scope this enumerator was declared in.</p>
<p>For example, the <a href="qt.html#AlignmentFlag-enum">Qt.AlignmentFlag</a> enumeration has
<tt>Qt</tt> as the scope and <tt>AlignmentFlag</tt> as the
name.</p>
<p><b>See also</b> <a href="qmetaenum.html#name">name</a>().</p>


<h3 class="fn"><a name="value" />int QMetaEnum.value (<i>self</i>, int&#160;<i>index</i>)</h3><p>Returns the value with the given <i>index</i>; or returns -1 if
there is no such value.</p>
<p><b>See also</b> <a href="qmetaenum.html#keyCount">keyCount</a>(), <a href="qmetaenum.html#key">key</a>(), and <a href="qmetaenum.html#keyToValue">keyToValue</a>().</p>


<h3 class="fn"><a name="valueToKey" />str QMetaEnum.valueToKey (<i>self</i>, int&#160;<i>value</i>)</h3><p>Returns the string that is used as the name of the given
enumeration <i>value</i>, or 0 if <i>value</i> is not defined.</p>
<p>For flag types, use <a href="qmetaenum.html#valueToKeys">valueToKeys</a>().</p>
<p><b>See also</b> <a href="qmetaenum.html#isFlag">isFlag</a>() and
<a href="qmetaenum.html#valueToKeys">valueToKeys</a>().</p>


<h3 class="fn"><a name="valueToKeys" /><a href="qbytearray.html">QByteArray</a> QMetaEnum.valueToKeys (<i>self</i>, int&#160;<i>value</i>)</h3><p>Returns a byte array of '|'-separated keys that represents the
given <i>value</i>.</p>
<p><b>See also</b> <a href="qmetaenum.html#isFlag">isFlag</a>(),
<a href="qmetaenum.html#valueToKey">valueToKey</a>(), and <a href="qmetaenum.html#keysToValue">keysToValue</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>