Sophie

Sophie

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

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>QItemEditorFactory 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">QItemEditorFactory Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QItemEditorFactory class provides widgets for editing item
data in views and delegates. <a href="#details">More...</a></p>

<h3>Methods</h3><ul><li><div class="fn" /><b><a href="qitemeditorfactory.html#QItemEditorFactory">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qitemeditorfactory.html#QItemEditorFactory-2">__init__</a></b> (<i>self</i>, QItemEditorFactory)</li><li><div class="fn" />QWidget <b><a href="qitemeditorfactory.html#createEditor">createEditor</a></b> (<i>self</i>, Type&#160;<i>type</i>, QWidget&#160;<i>parent</i>)</li><li><div class="fn" /><b><a href="qitemeditorfactory.html#registerEditor">registerEditor</a></b> (<i>self</i>, Type&#160;<i>type</i>, QItemEditorCreatorBase&#160;<i>creator</i>)</li><li><div class="fn" />QByteArray <b><a href="qitemeditorfactory.html#valuePropertyName">valuePropertyName</a></b> (<i>self</i>, Type&#160;<i>type</i>)</li></ul><h3>Static Methods</h3><ul><li><div class="fn" />QItemEditorFactory <b><a href="qitemeditorfactory.html#defaultFactory">defaultFactory</a></b> ()</li><li><div class="fn" /><b><a href="qitemeditorfactory.html#setDefaultFactory">setDefaultFactory</a></b> (QItemEditorFactory&#160;<i>factory</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QItemEditorFactory class provides widgets for editing item
data in views and delegates.</p>
<p>When editing data in an item view, editors are created and
displayed by a delegate. <a href="qitemdelegate.html">QItemDelegate</a>, which is the delegate by
default installed on Qt's item views, uses a QItemEditorFactory to
create editors for it. A default unique instance provided by
QItemEditorFactory is used by all item delegates. If you set a new
default factory with <a href="qitemeditorfactory.html#setDefaultFactory">setDefaultFactory</a>(),
the new factory will be used by existing and new delegates.</p>
<p>A factory keeps a collection of <a href="qitemeditorcreatorbase.html">QItemEditorCreatorBase</a> instances,
which are specialized editors that produce editors for one
particular <a href="qvariant.html">QVariant</a> data type (All Qt
models store their data in <a href="qvariant.html">QVariant</a>s).</p>
<a id="standard-editing-widgets" name="standard-editing-widgets" />
<h3>Standard Editing Widgets</h3>
<p>The standard factory implementation provides editors for a
variety of data types. These are created whenever a delegate needs
to provide an editor for data supplied by a model. The following
table shows the relationship between types and the standard editors
provided.</p>
<table class="generic">
<thead>
<tr class="qt-style">
<th>Type</th>
<th>Editor Widget</th>
</tr>
</thead>
<tr class="odd" valign="top">
<td>bool</td>
<td><a href="qcombobox.html">QComboBox</a></td>
</tr>
<tr class="even" valign="top">
<td>double</td>
<td><a href="qdoublespinbox.html">QDoubleSpinBox</a></td>
</tr>
<tr class="odd" valign="top">
<td>int</td>
<td rowspan="2"><a href="qspinbox.html">QSpinBox</a></td>
</tr>
<tr class="even" valign="top">
<td>unsigned int</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qdate.html">QDate</a></td>
<td><a href="qdateedit.html">QDateEdit</a></td>
</tr>
<tr class="even" valign="top">
<td><a href="qdatetime.html">QDateTime</a></td>
<td><a href="qdatetimeedit.html">QDateTimeEdit</a></td>
</tr>
<tr class="odd" valign="top">
<td><a href="qpixmap.html">QPixmap</a></td>
<td><a href="qlabel.html">QLabel</a></td>
</tr>
<tr class="even" valign="top">
<td><a href="qstring.html">QString</a></td>
<td><a href="qlineedit.html">QLineEdit</a></td>
</tr>
<tr class="odd" valign="top">
<td><a href="qtime.html">QTime</a></td>
<td><a href="qtimeedit.html">QTimeEdit</a></td>
</tr>
</table>
<p>Additional editors can be registered with the <a href="qitemeditorfactory.html#registerEditor">registerEditor</a>()
function.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QItemEditorFactory" />QItemEditorFactory.__init__ (<i>self</i>)</h3><p>Constructs a new item editor factory.</p>


<h3 class="fn"><a name="QItemEditorFactory-2" />QItemEditorFactory.__init__ (<i>self</i>, <a href="qitemeditorfactory.html">QItemEditorFactory</a>)</h3><h3 class="fn"><a name="createEditor" /><a href="qwidget.html">QWidget</a> QItemEditorFactory.createEditor (<i>self</i>, <a href="qtcore.html#Type-enum">Type</a>&#160;<i>type</i>, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Creates an editor widget with the given <i>parent</i> for the
specified <i>type</i> of data, and returns it as a <a href="qwidget.html">QWidget</a>.</p>
<p><b>See also</b> <a href="qitemeditorfactory.html#registerEditor">registerEditor</a>().</p>


<h3 class="fn"><a name="defaultFactory" /><a href="qitemeditorfactory.html">QItemEditorFactory</a> QItemEditorFactory.defaultFactory ()</h3><p>Returns the default item editor factory.</p>
<p><b>See also</b> <a href="qitemeditorfactory.html#setDefaultFactory">setDefaultFactory</a>().</p>


<h3 class="fn"><a name="registerEditor" />QItemEditorFactory.registerEditor (<i>self</i>, <a href="qtcore.html#Type-enum">Type</a>&#160;<i>type</i>, <a href="qitemeditorcreatorbase.html">QItemEditorCreatorBase</a>&#160;<i>creator</i>)</h3><p>The <i>creator</i> argument has it's ownership transferred to Qt.</p><p>Registers an item editor creator specified by <i>creator</i> for
the given <i>type</i> of data.</p>
<p><b>Note:</b> The factory takes ownership of the item editor
creator and will destroy it if a new creator for the same type is
registered later.</p>
<p><b>See also</b> <a href="qitemeditorfactory.html#createEditor">createEditor</a>().</p>


<h3 class="fn"><a name="setDefaultFactory" />QItemEditorFactory.setDefaultFactory (<a href="qitemeditorfactory.html">QItemEditorFactory</a>&#160;<i>factory</i>)</h3><p>The <i>factory</i> argument has it's ownership transferred to Qt.</p><p>Sets the default item editor factory to the given
<i>factory</i>. Both new and existing delegates will use the new
factory.</p>
<p><b>See also</b> <a href="qitemeditorfactory.html#defaultFactory">defaultFactory</a>().</p>


<h3 class="fn"><a name="valuePropertyName" /><a href="qbytearray.html">QByteArray</a> QItemEditorFactory.valuePropertyName (<i>self</i>, <a href="qtcore.html#Type-enum">Type</a>&#160;<i>type</i>)</h3><p>Returns the property name used to access data for the given
<i>type</i> of data.</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>