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

« back to all changes in this revision

Viewing changes to doc/html/q3dataview.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/qt3support/sql/q3dataview.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: Q3DataView Class Reference</title>
 
8
    <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
 
9
a:link { color: #004faf; text-decoration: none }
 
10
a:visited { color: #672967; text-decoration: none }
 
11
td.postheader { font-family: sans-serif }
 
12
tr.address { font-family: sans-serif }
 
13
body { background: #ffffff; color: black; }</style>
 
14
</head>
 
15
<body>
 
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
17
<tr>
 
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
 
19
<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="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="annotated.html"><font color="#004faf">Annotated</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
 
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">Q3DataView Class Reference</h1>
 
21
<p>The Q3DataView class provides read-only SQL forms. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;Q3DataView&gt;</pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See the <a href="porting4.html">Porting Guide</a> for more information.</p>
 
23
<p>Part of the <a href="qt3support.html">Qt3Support</a> module.</p>
 
24
<p>Inherits <a href="qwidget.html">QWidget</a>.</p>
 
25
<ul>
 
26
<li><a href="q3dataview-members.html">List of all members, including inherited members</a></li>
 
27
</ul>
 
28
<a name="public-functions"></a>
 
29
<h3>Public Functions</h3>
 
30
<ul>
 
31
<li><div class="fn"/><b><a href="q3dataview.html#Q3DataView">Q3DataView</a></b> ( QWidget * <i>parent</i> = 0, const char * <i>name</i> = 0, Qt::WFlags <i>fl</i> = 0 )</li>
 
32
<li><div class="fn"/><b><a href="q3dataview.html#dtor.Q3DataView">~Q3DataView</a></b> ()</li>
 
33
<li><div class="fn"/>Q3SqlForm * <b><a href="q3dataview.html#form">form</a></b> ()</li>
 
34
<li><div class="fn"/>QSqlRecord * <b><a href="q3dataview.html#record">record</a></b> ()</li>
 
35
<li><div class="fn"/>virtual void <b><a href="q3dataview.html#setForm">setForm</a></b> ( Q3SqlForm * <i>form</i> )</li>
 
36
<li><div class="fn"/>virtual void <b><a href="q3dataview.html#setRecord">setRecord</a></b> ( QSqlRecord * <i>record</i> )</li>
 
37
</ul>
 
38
<ul>
 
39
<li><div class="fn"/>183 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
 
40
<li><div class="fn"/>28 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
 
41
<li><div class="fn"/>10 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
 
42
</ul>
 
43
<a name="public-slots"></a>
 
44
<h3>Public Slots</h3>
 
45
<ul>
 
46
<li><div class="fn"/>virtual void <b><a href="q3dataview.html#clearValues">clearValues</a></b> ()</li>
 
47
<li><div class="fn"/>virtual void <b><a href="q3dataview.html#readFields">readFields</a></b> ()</li>
 
48
<li><div class="fn"/>virtual void <b><a href="q3dataview.html#refresh">refresh</a></b> ( QSqlRecord * <i>buf</i> )</li>
 
49
<li><div class="fn"/>virtual void <b><a href="q3dataview.html#writeFields">writeFields</a></b> ()</li>
 
50
</ul>
 
51
<ul>
 
52
<li><div class="fn"/>17 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
 
53
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
 
54
</ul>
 
55
<h3>Additional Inherited Members</h3>
 
56
<ul>
 
57
<li><div class="fn"/>52 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
 
58
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
 
59
<li><div class="fn"/>1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
 
60
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
 
61
<li><div class="fn"/>4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
 
62
<li><div class="fn"/>4 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
 
63
<li><div class="fn"/>39 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
 
64
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
65
</ul>
 
66
<a name="details"></a>
 
67
<hr />
 
68
<h2>Detailed Description</h2>
 
69
<p>The Q3DataView class provides read-only SQL forms.</p>
 
70
<p>This class provides a form which displays SQL field data from a record buffer. Because Q3DataView does not support editing it uses less resources than a <a href="q3databrowser.html">Q3DataBrowser</a>. This class is well suited for displaying read-only data from a SQL database.</p>
 
71
<p>If you want a to present your data in an editable form use <a href="q3databrowser.html">Q3DataBrowser</a>; if you want a table-based presentation of your data use <a href="q3datatable.html">Q3DataTable</a>.</p>
 
72
<p>The form is associated with the data view with <a href="q3dataview.html#setForm">setForm</a>() and the record is associated with <a href="q3dataview.html#setRecord">setRecord</a>(). You can also pass a <a href="qsqlrecord.html">QSqlRecord</a> to the <a href="q3dataview.html#refresh">refresh</a>() function which will set the record to the given record and read the record's fields into the form.</p>
 
73
<hr />
 
74
<h2>Member Function Documentation</h2>
 
75
<h3 class="fn"><a name="Q3DataView"></a>Q3DataView::Q3DataView ( <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0, const char * <i>name</i> = 0, <a href="qt.html#WFlags-typedef">Qt::WFlags</a> <i>fl</i> = 0 )</h3>
 
76
<p>Constructs a data view which is a child of <i>parent</i>, called <i>name</i>, and with widget flags <i>fl</i>.</p>
 
77
<h3 class="fn"><a name="dtor.Q3DataView"></a>Q3DataView::~Q3DataView ()</h3>
 
78
<p>Destroys the object and frees any allocated resources.</p>
 
79
<h3 class="fn"><a name="clearValues"></a>void Q3DataView::clearValues ()&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
 
80
<p>Clears the default form's values. If there is no default form, nothing happens. All the values are set to their 'zero state', e.g. 0 for numeric fields, &quot;&quot; for string fields.</p>
 
81
<h3 class="fn"><a name="form"></a><a href="q3sqlform.html">Q3SqlForm</a> * Q3DataView::form ()</h3>
 
82
<p>Returns the default form used by the data view, or 0 if there is none.</p>
 
83
<p>See also <a href="q3dataview.html#setForm">setForm</a>().</p>
 
84
<h3 class="fn"><a name="readFields"></a>void Q3DataView::readFields ()&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
 
85
<p>Causes the default form to read its fields from the record buffer. If there is no default form, or no record, nothing happens.</p>
 
86
<p>See also <a href="q3dataview.html#setForm">setForm</a>().</p>
 
87
<h3 class="fn"><a name="record"></a><a href="qsqlrecord.html">QSqlRecord</a> * Q3DataView::record ()</h3>
 
88
<p>Returns the default record used by the data view, or 0 if there is none.</p>
 
89
<p>See also <a href="q3dataview.html#setRecord">setRecord</a>().</p>
 
90
<h3 class="fn"><a name="refresh"></a>void Q3DataView::refresh ( <a href="qsqlrecord.html">QSqlRecord</a> * <i>buf</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
 
91
<p>Causes the default form to display the contents of <i>buf</i>. If there is no default form, nothing happens.The <i>buf</i> also becomes the default record for all subsequent calls to <a href="q3dataview.html#readFields">readFields</a>() and writefields(). This slot is equivalant to calling:</p>
 
92
<pre>&nbsp;   myView.setRecord(record);
 
93
    myView.readFields();</pre>
 
94
<p>See also <a href="q3dataview.html#setRecord">setRecord</a>() and <a href="q3dataview.html#readFields">readFields</a>().</p>
 
95
<h3 class="fn"><a name="setForm"></a>void Q3DataView::setForm ( <a href="q3sqlform.html">Q3SqlForm</a> * <i>form</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
96
<p>Sets the form used by the data view to <i>form</i>. If a record has already been assigned to the data view, the form will display that record's data.</p>
 
97
<p>See also <a href="q3dataview.html#form">form</a>().</p>
 
98
<h3 class="fn"><a name="setRecord"></a>void Q3DataView::setRecord ( <a href="qsqlrecord.html">QSqlRecord</a> * <i>record</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
99
<p>Sets the record used by the data view to <i>record</i>. If a form has already been assigned to the data view, the form will display the data from <i>record</i> in that form.</p>
 
100
<p>See also <a href="q3dataview.html#record">record</a>().</p>
 
101
<h3 class="fn"><a name="writeFields"></a>void Q3DataView::writeFields ()&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
 
102
<p>Causes the default form to write its fields to the record buffer. If there is no default form, or no record, nothing happens.</p>
 
103
<p>See also <a href="q3dataview.html#setForm">setForm</a>().</p>
 
104
<p /><address><hr /><div align="center">
 
105
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
106
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
107
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
108
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
109
</tr></table></div></address></body>
 
110
</html>