Q3DataView Class Reference |
Q3DataView ( QWidget * parent = 0, const char * name = 0, Qt::WindowFlags fl = 0 ) | |
~Q3DataView () | |
Q3SqlForm * | form () |
QSqlRecord * | record () |
virtual void | setForm ( Q3SqlForm * form ) |
virtual void | setRecord ( QSqlRecord * record ) |
virtual void | clearValues () |
virtual void | readFields () |
virtual void | refresh ( QSqlRecord * buf ) |
virtual void | writeFields () |
The Q3DataView class provides read-only SQL forms.
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 Q3DataBrowser. This class is well suited for displaying read-only data from a SQL database.
If you want a to present your data in an editable form use Q3DataBrowser; if you want a table-based presentation of your data use Q3DataTable.
The form is associated with the data view with setForm() and the record is associated with setRecord(). You can also pass a QSqlRecord to the refresh() function which will set the record to the given record and read the record's fields into the form.
Constructs a data view which is a child of parent, called name, and with widget flags fl.
Destroys the object and frees any allocated resources.
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.
Returns the default form used by the data view, or 0 if there is none.
See also setForm().
Causes the default form to read its fields from the record buffer. If there is no default form, or no record, nothing happens.
See also setForm().
Returns the default record used by the data view, or 0 if there is none.
See also setRecord().
Causes the default form to display the contents of buf. If there is no default form, nothing happens.The buf also becomes the default record for all subsequent calls to readFields() and writefields(). This slot is equivalant to calling:
myView.setRecord(record); myView.readFields();
See also setRecord() and readFields().
Sets the form used by the data view to form. If a record has already been assigned to the data view, the form will display that record's data.
See also form().
Sets the record used by the data view to record. If a form has already been assigned to the data view, the form will display the data from record in that form.
See also record().
Causes the default form to write its fields to the record buffer. If there is no default form, or no record, nothing happens.
See also setForm().
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.6 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com