1QDataView(3qt) QDataView(3qt)
2
3
4
6 QDataView - Read-only SQL forms
7
9 #include <qdataview.h>
10
11 Inherits QWidget.
12
13 Public Members
14 QDataView ( QWidget * parent = 0, const char * name = 0, WFlags fl = 0
15 )
16 ~QDataView ()
17 virtual void setForm ( QSqlForm * form )
18 QSqlForm * form ()
19 virtual void setRecord ( QSqlRecord * record )
20 QSqlRecord * record ()
21
22 Public Slots
23 virtual void refresh ( QSqlRecord * buf )
24 virtual void readFields ()
25 virtual void writeFields ()
26 virtual void clearValues ()
27
29 The QDataView class provides read-only SQL forms.
30
31 This class provides a form which displays SQL field data from a record
32 buffer. Because QDataView does not support editing it uses less
33 resources than a QDataBrowser. This class is well suited for displaying
34 read-only data from a SQL database.
35
36 If you want a to present your data in an editable form use
37 QDataBrowser; if you want a table-based presentation of your data use
38 QDataTable.
39
40 The form is associated with the data view with setForm() and the record
41 is associated with setRecord(). You can also pass a QSqlRecord to the
42 refresh() function which will set the record to the given record and
43 read the record's fields into the form.
44
45 See also Database Classes.
46
49 = 0 )
50 Constructs a data view which is a child of parent, called name, and
51 with widget flags fl.
52
54 Destroys the object and frees any allocated resources.
55
57 Clears the default form's values. If there is no default form, nothing
58 happens. All the values are set to their 'zero state', e.g. 0 for
59 numeric fields, "" for string fields.
60
62 Returns the default form used by the data view, or 0 if there is none.
63
64 See also setForm().
65
67 Causes the default form to read its fields from the record buffer. If
68 there is no default form, or no record, nothing happens.
69
70 See also setForm().
71
73 Returns the default record used by the data view, or 0 if there is
74 none.
75
76 See also setRecord().
77
79 Causes the default form to display the contents of buf. If there is no
80 default form, nothing happens.The buf also becomes the default record
81 for all subsequent calls to readFields() and writefields(). This slot
82 is equivalant to calling:
83
84 myView.setRecord( record );
85 myView.readFields();
86
87 See also setRecord() and readFields().
88
90 Sets the form used by the data view to form. If a record has already
91 been assigned to the data view, the form will display that record's
92 data.
93
94 See also form().
95
97 Sets the record used by the data view to record. If a form has already
98 been assigned to the data view, the form will display the data from
99 record in that form.
100
101 See also record().
102
104 Causes the default form to write its fields to the record buffer. If
105 there is no default form, or no record, nothing happens.
106
107 See also setForm().
108
109
111 http://doc.trolltech.com/qdataview.html
112 http://www.trolltech.com/faq/tech.html
113
115 Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
116 license file included in the distribution for a complete license
117 statement.
118
120 Generated automatically from the source code.
121
123 If you find a bug in Qt, please report it as described in
124 http://doc.trolltech.com/bughowto.html. Good bug reports help us to
125 help you. Thank you.
126
127 The definitive Qt documentation is provided in HTML format; it is
128 located at $QTDIR/doc/html and can be read using Qt Assistant or with a
129 web browser. This man page is provided as a convenience for those users
130 who prefer man pages, although this format is not officially supported
131 by Trolltech.
132
133 If you find errors in this manual page, please report them to qt-
134 bugs@trolltech.com. Please include the name of the manual page
135 (qdataview.3qt) and the Qt version (3.3.8).
136
137
138
139Trolltech AS 2 February 2007 QDataView(3qt)