1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
'\" t
.TH TQDataView 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
.\" license file included in the distribution for a complete license
.\" statement.
.\"
.ad l
.nh
.SH NAME
TQDataView \- Read-only SQL forms
.SH SYNOPSIS
\fC#include <tqdataview.h>\fR
.PP
Inherits TQWidget.
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "\fBQDataView\fR ( TQWidget * parent = 0, const char * name = 0, WFlags fl = 0 )"
.br
.ti -1c
.BI "\fB~TQDataView\fR ()"
.br
.ti -1c
.BI "virtual void \fBsetForm\fR ( TQSqlForm * form )"
.br
.ti -1c
.BI "TQSqlForm * \fBform\fR ()"
.br
.ti -1c
.BI "virtual void \fBsetRecord\fR ( TQSqlRecord * record )"
.br
.ti -1c
.BI "TQSqlRecord * \fBrecord\fR ()"
.br
.in -1c
.SS "Public Slots"
.in +1c
.ti -1c
.BI "virtual void \fBrefresh\fR ( TQSqlRecord * buf )"
.br
.ti -1c
.BI "virtual void \fBreadFields\fR ()"
.br
.ti -1c
.BI "virtual void \fBwriteFields\fR ()"
.br
.ti -1c
.BI "virtual void \fBclearValues\fR ()"
.br
.in -1c
.SH DESCRIPTION
The TQDataView class provides read-only SQL forms.
.PP
This class provides a form which displays SQL field data from a record buffer. Because TQDataView does not support editing it uses less resources than a TQDataBrowser. This class is well suited for displaying read-only data from a SQL database.
.PP
If you want a to present your data in an editable form use TQDataBrowser; if you want a table-based presentation of your data use TQDataTable.
.PP
The form is associated with the data view with setForm() and the record is associated with setRecord(). You can also pass a TQSqlRecord to the refresh() function which will set the record to the given record and read the record's fields into the form.
.PP
See also Database Classes.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "TQDataView::TQDataView ( TQWidget * parent = 0, const char * name = 0, WFlags fl = 0 )"
Constructs a data view which is a child of \fIparent\fR, called \fIname\fR, and with widget flags \fIfl\fR.
.SH "TQDataView::~TQDataView ()"
Destroys the object and frees any allocated resources.
.SH "void TQDataView::clearValues ()\fC [virtual slot]\fR"
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, "" for string fields.
.SH "TQSqlForm * TQDataView::form ()"
Returns the default form used by the data view, or 0 if there is none.
.PP
See also setForm().
.SH "void TQDataView::readFields ()\fC [virtual slot]\fR"
Causes the default form to read its fields from the record buffer. If there is no default form, or no record, nothing happens.
.PP
See also setForm().
.SH "TQSqlRecord * TQDataView::record ()"
Returns the default record used by the data view, or 0 if there is none.
.PP
See also setRecord().
.SH "void TQDataView::refresh ( TQSqlRecord * buf )\fC [virtual slot]\fR"
Causes the default form to display the contents of \fIbuf\fR. If there is no default form, nothing happens.The \fIbuf\fR also becomes the default record for all subsequent calls to readFields() and writefields(). This slot is equivalant to calling:
.PP
.nf
.br
myView.setRecord( record );
.br
myView.readFields();
.br
.fi
.PP
See also setRecord() and readFields().
.SH "void TQDataView::setForm ( TQSqlForm * form )\fC [virtual]\fR"
Sets the form used by the data view to \fIform\fR. If a record has already been assigned to the data view, the form will display that record's data.
.PP
See also form().
.SH "void TQDataView::setRecord ( TQSqlRecord * record )\fC [virtual]\fR"
Sets the record used by the data view to \fIrecord\fR. If a form has already been assigned to the data view, the form will display the data from \fIrecord\fR in that form.
.PP
See also record().
.SH "void TQDataView::writeFields ()\fC [virtual slot]\fR"
Causes the default form to write its fields to the record buffer. If there is no default form, or no record, nothing happens.
.PP
See also setForm().
.SH "SEE ALSO"
.BR http://doc.trolltech.com/tqdataview.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If you find a bug in Qt, please report it as described in
.BR http://doc.trolltech.com/bughowto.html .
Good bug reports help us to help you. Thank you.
.P
The definitive TQt documentation is provided in HTML format; it is
located at $TQTDIR/doc/html and can be read using TQt Assistant or with
a web browser. This man page is provided as a convenience for those
users who prefer man pages, although this format is not officially
supported by Trolltech.
.P
If you find errors in this manual page, please report them to
.BR [email protected] .
Please include the name of the manual page (tqdataview.3qt) and the Qt
version (3.3.8).
|