~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/qitemeditorfactory.html

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<!DOCTYPE html
3
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
 
<!-- /fasttmp/mkdist-qt-4.5.2-1245473805/qt-x11-opensource-src-4.5.2/src/gui/itemviews/qitemeditorfactory.cpp -->
 
5
<!-- qitemeditorfactory.cpp -->
6
6
<head>
7
 
  <title>Qt 4.5: QItemEditorFactory Class Reference</title>
 
7
  <title>Qt 4.6: QItemEditorFactory Class Reference</title>
8
8
  <link href="classic.css" rel="stylesheet" type="text/css" />
9
9
</head>
10
10
<body>
 
11
<a name="//apple_ref/cpp/cl//QItemEditorFactory" />
11
12
<table border="0" cellpadding="0" cellspacing="0" width="100%">
12
13
<tr>
13
 
<td align="left" valign="top" width="32"><a href="http://qtsoftware.com/products/qt"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
14
 
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="namespaces.html"><font color="#004faf">All&nbsp;Namespaces</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
15
 
<td align="right" valign="top" width="230"></td></tr></table><h1 class="title">QItemEditorFactory Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span>
 
14
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
 
15
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td><td class="searchBar" align="right" valign="center"><form action="http://www.google.com/cse" id="cse-search-box"><div><input type="hidden" name="cx" value="000136343326384750312:dhbxnqlakyu" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" size="31" /><input type="submit" name="sa" value="Search" /></div></form></td>
 
16
</tr></table><h1 class="title">QItemEditorFactory Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span>
16
17
</h1>
17
18
<p>The QItemEditorFactory class provides widgets for editing item data in views and delegates. <a href="#details">More...</a></p>
18
19
<pre> #include &lt;QItemEditorFactory&gt;</pre><p>This class was introduced in Qt 4.2.</p>
19
20
<ul>
20
21
<li><a href="qitemeditorfactory-members.html">List of all members, including inherited members</a></li>
21
22
</ul>
 
23
<hr />
22
24
<a name="public-functions"></a>
23
 
<h3>Public Functions</h3>
24
 
<ul>
25
 
<li><div class="fn"></div><b><a href="qitemeditorfactory.html#QItemEditorFactory">QItemEditorFactory</a></b> ()</li>
26
 
<li><div class="fn"></div>virtual <b><a href="qitemeditorfactory.html#dtor.QItemEditorFactory">~QItemEditorFactory</a></b> ()</li>
27
 
<li><div class="fn"></div>virtual QWidget * <b><a href="qitemeditorfactory.html#createEditor">createEditor</a></b> ( QVariant::Type <i>type</i>, QWidget * <i>parent</i> ) const</li>
28
 
<li><div class="fn"></div>void <b><a href="qitemeditorfactory.html#registerEditor">registerEditor</a></b> ( QVariant::Type <i>type</i>, QItemEditorCreatorBase * <i>creator</i> )</li>
29
 
<li><div class="fn"></div>virtual QByteArray <b><a href="qitemeditorfactory.html#valuePropertyName">valuePropertyName</a></b> ( QVariant::Type <i>type</i> ) const</li>
30
 
</ul>
 
25
<h2>Public Functions</h2>
 
26
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
27
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qitemeditorfactory.html#QItemEditorFactory">QItemEditorFactory</a></b> ()</td></tr>
 
28
<tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><b><a href="qitemeditorfactory.html#dtor.QItemEditorFactory">~QItemEditorFactory</a></b> ()</td></tr>
 
29
<tr><td class="memItemLeft" align="right" valign="top">virtual QWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qitemeditorfactory.html#createEditor">createEditor</a></b> ( QVariant::Type <i>type</i>, QWidget * <i>parent</i> ) const</td></tr>
 
30
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qitemeditorfactory.html#registerEditor">registerEditor</a></b> ( QVariant::Type <i>type</i>, QItemEditorCreatorBase * <i>creator</i> )</td></tr>
 
31
<tr><td class="memItemLeft" align="right" valign="top">virtual QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qitemeditorfactory.html#valuePropertyName">valuePropertyName</a></b> ( QVariant::Type <i>type</i> ) const</td></tr>
 
32
</table>
 
33
<hr />
31
34
<a name="static-public-members"></a>
32
 
<h3>Static Public Members</h3>
33
 
<ul>
34
 
<li><div class="fn"></div>const QItemEditorFactory * <b><a href="qitemeditorfactory.html#defaultFactory">defaultFactory</a></b> ()</li>
35
 
<li><div class="fn"></div>void <b><a href="qitemeditorfactory.html#setDefaultFactory">setDefaultFactory</a></b> ( QItemEditorFactory * <i>factory</i> )</li>
36
 
</ul>
 
35
<h2>Static Public Members</h2>
 
36
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
37
<tr><td class="memItemLeft" align="right" valign="top">const QItemEditorFactory * </td><td class="memItemRight" valign="bottom"><b><a href="qitemeditorfactory.html#defaultFactory">defaultFactory</a></b> ()</td></tr>
 
38
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qitemeditorfactory.html#setDefaultFactory">setDefaultFactory</a></b> ( QItemEditorFactory * <i>factory</i> )</td></tr>
 
39
</table>
37
40
<a name="details"></a>
38
41
<hr />
39
42
<h2>Detailed Description</h2>
43
46
<a name="standard-editing-widgets"></a>
44
47
<h3>Standard Editing Widgets</h3>
45
48
<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>
46
 
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
 
49
<p><table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
47
50
<thead><tr valign="top" class="qt-style"><th>Type</th><th>Editor Widget</th></tr></thead>
48
51
<tr valign="top" class="odd"><td>bool</td><td><a href="qcombobox.html">QComboBox</a></td></tr>
49
52
<tr valign="top" class="even"><td>double</td><td><a href="qdoublespinbox.html">QDoubleSpinBox</a></td></tr>
59
62
<p>See also <a href="qitemdelegate.html">QItemDelegate</a>, <a href="model-view-programming.html">Model/View Programming</a>, and <a href="itemviews-coloreditorfactory.html">Color Editor Factory Example</a>.</p>
60
63
<hr />
61
64
<h2>Member Function Documentation</h2>
 
65
<a name="//apple_ref/cpp/instm/QItemEditorFactory/QItemEditorFactory" />
62
66
<h3 class="fn"><a name="QItemEditorFactory"></a>QItemEditorFactory::QItemEditorFactory ()</h3>
63
67
<p>Constructs a new item editor factory.</p>
 
68
<a name="//apple_ref/cpp/instm/QItemEditorFactory/~QItemEditorFactory" />
64
69
<h3 class="fn"><a name="dtor.QItemEditorFactory"></a>QItemEditorFactory::~QItemEditorFactory ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
65
70
<p>Destroys the item editor factory.</p>
 
71
<a name="//apple_ref/cpp/instm/QItemEditorFactory/createEditor" />
66
72
<h3 class="fn"><a name="createEditor"></a><a href="qwidget.html">QWidget</a> * QItemEditorFactory::createEditor ( <a href="qvariant.html#Type-enum">QVariant::Type</a> <i>type</i>, <a href="qwidget.html">QWidget</a> * <i>parent</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
67
73
<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>
68
74
<p>See also <a href="qitemeditorfactory.html#registerEditor">registerEditor</a>().</p>
 
75
<a name="//apple_ref/cpp/clm/QItemEditorFactory/defaultFactory" />
69
76
<h3 class="fn"><a name="defaultFactory"></a>const QItemEditorFactory * QItemEditorFactory::defaultFactory ()&nbsp;&nbsp;<tt> [static]</tt></h3>
70
77
<p>Returns the default item editor factory.</p>
71
78
<p>See also <a href="qitemeditorfactory.html#setDefaultFactory">setDefaultFactory</a>().</p>
 
79
<a name="//apple_ref/cpp/instm/QItemEditorFactory/registerEditor" />
72
80
<h3 class="fn"><a name="registerEditor"></a>void QItemEditorFactory::registerEditor ( <a href="qvariant.html#Type-enum">QVariant::Type</a> <i>type</i>, <a href="qitemeditorcreatorbase.html">QItemEditorCreatorBase</a> * <i>creator</i> )</h3>
73
81
<p>Registers an item editor creator specified by <i>creator</i> for the given <i>type</i> of data.</p>
74
82
<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>
75
83
<p>See also <a href="qitemeditorfactory.html#createEditor">createEditor</a>().</p>
 
84
<a name="//apple_ref/cpp/clm/QItemEditorFactory/setDefaultFactory" />
76
85
<h3 class="fn"><a name="setDefaultFactory"></a>void QItemEditorFactory::setDefaultFactory ( QItemEditorFactory * <i>factory</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
77
86
<p>Sets the default item editor factory to the given <i>factory</i>. Both new and existing delegates will use the new factory.</p>
78
87
<p>See also <a href="qitemeditorfactory.html#defaultFactory">defaultFactory</a>().</p>
 
88
<a name="//apple_ref/cpp/instm/QItemEditorFactory/valuePropertyName" />
79
89
<h3 class="fn"><a name="valuePropertyName"></a><a href="qbytearray.html">QByteArray</a> QItemEditorFactory::valuePropertyName ( <a href="qvariant.html#Type-enum">QVariant::Type</a> <i>type</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
80
90
<p>Returns the property name used to access data for the given <i>type</i> of data.</p>
81
91
<p /><address><hr /><div align="center">
82
92
<table width="100%" cellspacing="0" border="0"><tr class="address">
83
 
<td width="30%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
84
 
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
85
 
<td width="30%" align="right"><div align="right">Qt 4.5.2</div></td>
86
 
</tr></table></div></address></body>
 
93
<td width="40%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
 
94
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
95
<td width="40%" align="right"><div align="right">Qt 4.6.0</div></td>
 
96
<script type="text/javascript" src="http://www.google.com/jsapi"></script><script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script><script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en"></script><script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script></tr></table></div></address></body>
87
97
</html>