source: trunk/doc/html/qsqleditorfactory.html

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

reference documentation added

File size: 6.1 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/qsqleditorfactory.cpp:49 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>QSqlEditorFactory 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>QSqlEditorFactory Class Reference<br><small>[<a href="sql.html">sql module</a>]</small></h1>
33
34<p>The QSqlEditorFactory class is used to create the editors
35used by QDataTable and QSqlForm.
36<a href="#details">More...</a>
37<p><tt>#include &lt;<a href="qsqleditorfactory-h.html">qsqleditorfactory.h</a>&gt;</tt>
38<p>Inherits <a href="qeditorfactory.html">QEditorFactory</a>.
39<p><a href="qsqleditorfactory-members.html">List of all member functions.</a>
40<h2>Public Members</h2>
41<ul>
42<li class=fn><a href="#QSqlEditorFactory"><b>QSqlEditorFactory</b></a> ( QObject&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )</li>
43<li class=fn><a href="#~QSqlEditorFactory"><b>~QSqlEditorFactory</b></a> ()</li>
44<li class=fn>virtual QWidget * <a href="#createEditor"><b>createEditor</b></a> ( QWidget&nbsp;*&nbsp;parent, const&nbsp;QVariant&nbsp;&amp;&nbsp;variant )</li>
45<li class=fn>virtual QWidget * <a href="#createEditor-2"><b>createEditor</b></a> ( QWidget&nbsp;*&nbsp;parent, const&nbsp;QSqlField&nbsp;*&nbsp;field )</li>
46</ul>
47<h2>Static Public Members</h2>
48<ul>
49<li class=fn>QSqlEditorFactory * <a href="#defaultFactory"><b>defaultFactory</b></a> ()</li>
50<li class=fn>void <a href="#installDefaultFactory"><b>installDefaultFactory</b></a> ( QSqlEditorFactory&nbsp;*&nbsp;factory )</li>
51</ul>
52<hr><a name="details"></a><h2>Detailed Description</h2>
53
54
55The QSqlEditorFactory class is used to create the editors
56used by <a href="qdatatable.html">QDataTable</a> and <a href="qsqlform.html">QSqlForm</a>.
57<p>
58
59<p> QSqlEditorFactory is used by QDataTable and QSqlForm to
60automatically create appropriate editors for a given <a href="qsqlfield.html">QSqlField</a>.
61For example if the field is a QVariant::String a <a href="qlineedit.html">QLineEdit</a> would
62be the default editor, whereas a QVariant::Int's default editor
63would 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 QSqlEditorFactory and reimplement the
66<a href="#createEditor">createEditor</a>() function.
67<p> <p>See also <a href="qdatatable.html">QDataTable</a>, <a href="qsqlform.html">QSqlForm</a>, and <a href="database.html">Database Classes</a>.
68
69<hr><h2>Member Function Documentation</h2>
70<h3 class=fn><a name="QSqlEditorFactory"></a>QSqlEditorFactory::QSqlEditorFactory ( <a href="qobject.html">QObject</a>&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )
71</h3>
72Constructs a SQL editor factory with parent <em>parent</em>, called <em>name</em>.
73
74<h3 class=fn><a name="~QSqlEditorFactory"></a>QSqlEditorFactory::~QSqlEditorFactory ()
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>QSqlEditorFactory::createEditor ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;parent, const&nbsp;<a href="qvariant.html">QVariant</a>&nbsp;&amp;&nbsp;variant )<tt> [virtual]</tt>
79</h3>
80Creates and returns the appropriate editor widget for the <a href="qvariant.html">QVariant</a>
81<em>variant</em>.
82<p> The widget that is returned has the parent <em>parent</em> (which may be
83zero). If <em>variant</em> is invalid, 0 is returned.
84
85<p>Reimplemented from <a href="qeditorfactory.html#createEditor">QEditorFactory</a>.
86<h3 class=fn><a href="qwidget.html">QWidget</a>&nbsp;* <a name="createEditor-2"></a>QSqlEditorFactory::createEditor ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;parent, const&nbsp;<a href="qsqlfield.html">QSqlField</a>&nbsp;*&nbsp;field )<tt> [virtual]</tt>
87</h3>
88This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
89<p> Creates and returns the appropriate editor for the <a href="qsqlfield.html">QSqlField</a> <em>field</em>.
90
91<h3 class=fn><a href="qsqleditorfactory.html">QSqlEditorFactory</a>&nbsp;* <a name="defaultFactory"></a>QSqlEditorFactory::defaultFactory ()<tt> [static]</tt>
92</h3>
93Returns an instance of a default editor factory.
94
95<h3 class=fn>void <a name="installDefaultFactory"></a>QSqlEditorFactory::installDefaultFactory ( <a href="qsqleditorfactory.html">QSqlEditorFactory</a>&nbsp;*&nbsp;factory )<tt> [static]</tt>
96</h3>
97Replaces the default editor factory with <em>factory</em>. All
98<a href="qdatatable.html">QDataTable</a> and <a href="qsqlform.html">QSqlForm</a> instantiations will use this new factory
99for creating field editors. <em>QSqlEditorFactory takes ownership of &#92;a factory, and destroys it when it is no longer needed.</em>
100
101<!-- eof -->
102<hr><p>
103This file is part of the <a href="index.html">Qt toolkit</a>.
104Copyright &copy; 1995-2007
105<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
106<table width=100% cellspacing=0 border=0><tr>
107<td>Copyright &copy; 2007
108<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
109<td align=right><div align=right>Qt 3.3.8</div>
110</table></div></address></body>
111</html>
Note: See TracBrowser for help on using the repository browser.