| 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"><!--
|
|---|
| 8 | fn { margin-left: 1cm; text-indent: -1cm; }
|
|---|
| 9 | a:link { color: #004faf; text-decoration: none }
|
|---|
| 10 | a:visited { color: #672967; text-decoration: none }
|
|---|
| 11 | body { 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 Classes</font></a>
|
|---|
| 23 | | <a href="mainclasses.html">
|
|---|
| 24 | <font color="#004faf">Main 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 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
|
|---|
| 35 | for QVariant data types.
|
|---|
| 36 | <a href="#details">More...</a>
|
|---|
| 37 | <p><tt>#include <<a href="qeditorfactory-h.html">qeditorfactory.h</a>></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 * parent = 0, const char * 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 * parent, const QVariant & 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 * factory )</li>
|
|---|
| 51 | </ul>
|
|---|
| 52 | <hr><a name="details"></a><h2>Detailed Description</h2>
|
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 | The QEditorFactory class is used to create editor widgets
|
|---|
| 56 | for <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
|
|---|
| 60 | given a QVariant will create and return a <a href="qwidget.html">QWidget</a> that can edit
|
|---|
| 61 | that 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
|
|---|
| 63 | QVariant::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
|
|---|
| 65 | data type, subclass QEditorFactory and reimplement the
|
|---|
| 66 | createEditor() 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> * parent = 0, const char * name = 0 )
|
|---|
| 71 | </h3>
|
|---|
| 72 | Constructs 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>
|
|---|
| 76 | Destroys the object and frees any allocated resources.
|
|---|
| 77 |
|
|---|
| 78 | <h3 class=fn><a href="qwidget.html">QWidget</a> * <a name="createEditor"></a>QEditorFactory::createEditor ( <a href="qwidget.html">QWidget</a> * parent, const <a href="qvariant.html">QVariant</a> & v )<tt> [virtual]</tt>
|
|---|
| 79 | </h3>
|
|---|
| 80 | Creates and returns the appropriate editor for the <a href="qvariant.html">QVariant</a> <em>v</em>.
|
|---|
| 81 | If the QVariant is invalid, 0 is returned. The <em>parent</em> is passed
|
|---|
| 82 | to 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> * <a name="defaultFactory"></a>QEditorFactory::defaultFactory ()<tt> [static]</tt>
|
|---|
| 86 | </h3>
|
|---|
| 87 | Returns 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> * factory )<tt> [static]</tt>
|
|---|
| 90 | </h3>
|
|---|
| 91 | Replaces 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>
|
|---|
| 96 | This file is part of the <a href="index.html">Qt toolkit</a>.
|
|---|
| 97 | Copyright © 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 © 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>
|
|---|