source: trunk/doc/html/qeditorfactory.html

Last change on this file was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 5.2 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/sql/qeditorfactory.cpp:48 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>QEditorFactory Class</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { background: #ffffff; color: black; }
12--></style>
13</head>
14<body>
15
16<table border="0" cellpadding="0" cellspacing="0" width="100%">
17<tr bgcolor="#E5E5E5">
18<td valign=center>
19 <a href="index.html">
20<font color="#004faf">Home</font></a>
21 | <a href="classes.html">
22<font color="#004faf">All&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;Classes</font></a>
25 | <a href="annotated.html">
26<font color="#004faf">Annotated</font></a>
27 | <a href="groups.html">
28<font color="#004faf">Grouped&nbsp;Classes</font></a>
29 | <a href="functions.html">
30<font color="#004faf">Functions</font></a>
31</td>
32<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QEditorFactory Class Reference<br><small>[<a href="sql.html">sql module</a>]</small></h1>
33
34<p>The QEditorFactory class is used to create editor widgets
35for QVariant data types.
36<a href="#details">More...</a>
37<p><tt>#include &lt;<a href="qeditorfactory-h.html">qeditorfactory.h</a>&gt;</tt>
38<p>Inherits <a href="qobject.html">QObject</a>.
39<p>Inherited by <a href="qsqleditorfactory.html">QSqlEditorFactory</a>.
40<p><a href="qeditorfactory-members.html">List of all member functions.</a>
41<h2>Public Members</h2>
42<ul>
43<li class=fn><a href="#QEditorFactory"><b>QEditorFactory</b></a> ( QObject&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )</li>
44<li class=fn><a href="#~QEditorFactory"><b>~QEditorFactory</b></a> ()</li>
45<li class=fn>virtual QWidget * <a href="#createEditor"><b>createEditor</b></a> ( QWidget&nbsp;*&nbsp;parent, const&nbsp;QVariant&nbsp;&amp;&nbsp;v )</li>
46</ul>
47<h2>Static Public Members</h2>
48<ul>
49<li class=fn>QEditorFactory * <a href="#defaultFactory"><b>defaultFactory</b></a> ()</li>
50<li class=fn>void <a href="#installDefaultFactory"><b>installDefaultFactory</b></a> ( QEditorFactory&nbsp;*&nbsp;factory )</li>
51</ul>
52<hr><a name="details"></a><h2>Detailed Description</h2>
53
54
55The QEditorFactory class is used to create editor widgets
56for <a href="qvariant.html">QVariant</a> data types.
57<p>
58
59<p> Each editor factory provides the <a href="#createEditor">createEditor</a>() function which
60given a QVariant will create and return a <a href="qwidget.html">QWidget</a> that can edit
61that QVariant. For example if you have a QVariant::String type, a
62<a href="qlineedit.html">QLineEdit</a> would be the default editor returned, whereas a
63QVariant::Int's default editor would be a <a href="qspinbox.html">QSpinBox</a>.
64<p> If you want to create different editors for fields with the same
65data type, subclass QEditorFactory and reimplement the
66createEditor() function.
67<p>See also <a href="database.html">Database Classes</a>.
68
69<hr><h2>Member Function Documentation</h2>
70<h3 class=fn><a name="QEditorFactory"></a>QEditorFactory::QEditorFactory ( <a href="qobject.html">QObject</a>&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )
71</h3>
72Constructs an editor factory with parent <em>parent</em>, called <em>name</em>.
73
74<h3 class=fn><a name="~QEditorFactory"></a>QEditorFactory::~QEditorFactory ()
75</h3>
76Destroys the object and frees any allocated resources.
77
78<h3 class=fn><a href="qwidget.html">QWidget</a>&nbsp;* <a name="createEditor"></a>QEditorFactory::createEditor ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;parent, const&nbsp;<a href="qvariant.html">QVariant</a>&nbsp;&amp;&nbsp;v )<tt> [virtual]</tt>
79</h3>
80Creates and returns the appropriate editor for the <a href="qvariant.html">QVariant</a> <em>v</em>.
81If the QVariant is invalid, 0 is returned. The <em>parent</em> is passed
82to the appropriate editor's constructor.
83
84<p>Reimplemented in <a href="qsqleditorfactory.html#createEditor">QSqlEditorFactory</a>.
85<h3 class=fn><a href="qeditorfactory.html">QEditorFactory</a>&nbsp;* <a name="defaultFactory"></a>QEditorFactory::defaultFactory ()<tt> [static]</tt>
86</h3>
87Returns an instance of a default editor factory.
88
89<h3 class=fn>void <a name="installDefaultFactory"></a>QEditorFactory::installDefaultFactory ( <a href="qeditorfactory.html">QEditorFactory</a>&nbsp;*&nbsp;factory )<tt> [static]</tt>
90</h3>
91Replaces the default editor factory with <em>factory</em>.
92<em>QEditorFactory takes ownership of factory, and destroys it when it is no longer needed.</em>
93
94<!-- eof -->
95<hr><p>
96This file is part of the <a href="index.html">Qt toolkit</a>.
97Copyright &copy; 1995-2007
98<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
99<table width=100% cellspacing=0 border=0><tr>
100<td>Copyright &copy; 2007
101<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
102<td align=right><div align=right>Qt 3.3.8</div>
103</table></div></address></body>
104</html>
Note: See TracBrowser for help on using the repository browser.