⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qdatabrowser.3qt

📁 linux下GUI编程工具qt的在线连接帮助手册
💻 3QT
📖 第 1 页 / 共 3 页
字号:
If the browser is positioned on the last record nothing happens..SH "void QDataBrowser::nextRecordAvailable ( bool available )\fC [signal]\fR"This signal is emitted whenever the position of the cursor changes. The \fIavailable\fR parameter indicates whether or not the next record in the default cursor is available..SH "void QDataBrowser::prev ()\fC [virtual slot]\fR"Moves the default cursor to the previous record and refreshes the default form to display this record. If there is no default form or no default cursor, nothing happens. If the data browser successfully navigated to the previous record, the default cursor is primed for update and the primeUpdate() signal is emitted..PPIf the browser is positioned on the first record nothing happens..SH "void QDataBrowser::prevRecordAvailable ( bool available )\fC [signal]\fR"This signal is emitted whenever the position of the cursor changes. The \fIavailable\fR parameter indicates whether or not the previous record in the default cursor is available..SH "void QDataBrowser::primeDelete ( QSqlRecord * buf )\fC [signal]\fR"This signal is emitted when the data browser enters deletion mode. The \fIbuf\fR parameter points to the record buffer being deleted. (Note that QSqlCursor::primeDelete() is \fInot\fR called on the default cursor, as this would corrupt values in the form.) Connect to this signal in order to, for example, save a copy of the deleted record for auditing purposes..PPSee also del()..SH "void QDataBrowser::primeInsert ( QSqlRecord * buf )\fC [signal]\fR"This signal is emitted when the data browser enters insertion mode. The \fIbuf\fR parameter points to the record buffer that is to be inserted. Connect to this signal to, for example, prime the record buffer with default data values, auto-numbered fields etc. (Note that QSqlCursor::primeInsert() is \fInot\fR called on the default cursor, as this would corrupt values in the form.).PPSee also insert()..SH "void QDataBrowser::primeUpdate ( QSqlRecord * buf )\fC [signal]\fR"This signal is emitted when the data browser enters update mode. Note that during naviagtion (first(), last(), next(), prev()), each record that is shown in the default form is primed for update. The \fIbuf\fR parameter points to the record buffer being updated. (Note that QSqlCursor::primeUpdate() is \fInot\fR called on the default cursor, as this would corrupt values in the form.) Connect to this signal in order to, for example, keep track of which records have been updated, perhaps for auditing purposes..PPSee also update()..SH "void QDataBrowser::readFields ()\fC [virtual slot]\fR"Reads the fields from the default cursor's edit buffer and displays them in the form. If there is no default cursor or no default form, nothing happens..SH "void QDataBrowser::refresh ()\fC [virtual slot]\fR"Refreshes the data browser's data using the default cursor. The browser's current filter and sort are applied if they have been set..PPSee also filter and sort..SH "bool QDataBrowser::seek ( int i, bool relative = FALSE )\fC [virtual]\fR"Moves the default cursor to the record specified by the index \fIi\fR and refreshes the default form to display this record. If there is no default form or no default cursor, nothing happens. If \fIrelative\fR is TRUE (the default is FALSE), the cursor is moved relative to its current position. If the data browser successfully navigated to the desired record, the default cursor is primed for update and the primeUpdate() signal is emitted..PPIf the browser is already positioned on the desired record nothing happens..SH "void QDataBrowser::setAutoEdit ( bool autoEdit )\fC [virtual]\fR"Sets whether the browser automatically applies edits to \fIautoEdit\fR. See the "autoEdit" property for details..SH "void QDataBrowser::setBoundaryChecking ( bool active )"Sets whether boundary checking is active to \fIactive\fR. See the "boundaryChecking" property for details..SH "void QDataBrowser::setConfirmCancels ( bool confirm )\fC [virtual]\fR"Sets whether the browser confirms cancel operations to \fIconfirm\fR. See the "confirmCancels" property for details..SH "void QDataBrowser::setConfirmDelete ( bool confirm )\fC [virtual]\fR"Sets whether the browser confirms deletions to \fIconfirm\fR. See the "confirmDelete" property for details..SH "void QDataBrowser::setConfirmEdits ( bool confirm )\fC [virtual]\fR"Sets whether the browser confirms edit operations to \fIconfirm\fR. See the "confirmEdits" property for details..SH "void QDataBrowser::setConfirmInsert ( bool confirm )\fC [virtual]\fR"Sets whether the data browser confirms insertions to \fIconfirm\fR. See the "confirmInsert" property for details..SH "void QDataBrowser::setConfirmUpdate ( bool confirm )\fC [virtual]\fR"Sets whether the browser confirms updates to \fIconfirm\fR. See the "confirmUpdate" property for details..SH "void QDataBrowser::setFilter ( const QString & filter )"Sets the data browser's filter to \fIfilter\fR. See the "filter" property for details..SH "void QDataBrowser::setForm ( QSqlForm * form )\fC [virtual]\fR"Sets the browser's default form to \fIform\fR. The cursor and all navigation and data manipulation functions that the browser provides become available to the \fIform\fR..SH "void QDataBrowser::setReadOnly ( bool active )\fC [virtual]\fR"Sets whether the browser is read-only to \fIactive\fR. See the "readOnly" property for details..SH "void QDataBrowser::setSort ( const QStringList & sort )"Sets the data browser's sort to \fIsort\fR. See the "sort" property for details..SH "void QDataBrowser::setSort ( const QSqlIndex & sort )"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPSets the data browser's sort to the QSqlIndex \fIsort\fR. To apply the new sort, use refresh()..SH "void QDataBrowser::setSqlCursor ( QSqlCursor * cursor, bool autoDelete = FALSE )\fC [virtual]\fR"Sets the default cursor used by the data browser to \fIcursor\fR. If \fIautoDelete\fR is TRUE (the default is FALSE), the data browser takes ownership of the \fIcursor\fR pointer, which will be deleted when the browser is destroyed, or when setSqlCursor() is called again. To activate the \fIcursor\fR use refresh(). The cursor's edit buffer is used in the default form to browse and edit records..PPSee also sqlCursor(), form() and setForm()..SH "QStringList QDataBrowser::sort () const"Returns the data browser's sort. See the "sort" property for details..SH "QSqlCursor * QDataBrowser::sqlCursor () const"Returns a pointer to the default cursor used for navigation, or 0 if there is no default cursor..PPSee also setSqlCursor()..SH "void QDataBrowser::update ()\fC [virtual slot]\fR"Performs an update operation on the data browser's cursor..PPIf there is no default cursor or no default form, nothing happens. Otherwise, the following happens:.PPIf the data browser is actively inserting a record (see insert()), that record is inserted into the database using insertCurrent(). Otherwise, the database is updated with the current form's data using updateCurrent(). If there is an error handling either action, handleError() is called..SH "void QDataBrowser::updateBoundary ()\fC [slot]\fR"If boundaryChecking() is TRUE, checks the boundary of the current default cursor and emits signals which indicate the position of the cursor..SH "bool QDataBrowser::updateCurrent ()\fC [virtual protected]\fR"Reads the fields from the default form into the default cursor and performs an update on the default cursor. If there is no default form or no default cursor, nothing happens. If an error occurred during the update on the database, handleError() is called and FALSE is returned. If the update was successfull, the cursor is refreshed and relocated to the updated record, the cursorChanged() signal is emitted, and TRUE is returned..PPSee also cursor, form() and handleError()..SH "void QDataBrowser::writeFields ()\fC [virtual slot]\fR"Writes the form's data to the default cursor's edit buffer. If there is no default cursor or no default form, nothing happens..PP.SS "Property Documentation".SH "bool autoEdit"This property holds whether the browser automatically applies edits..PPThe default value for this property is TRUE. When the user begins an insertion or an update on a form there are two possible outcomes when they navigate to another record:.TPthe insert or update is is performed -- this occurs if autoEdit is TRUE.TPthe insert or update is discarded -- this occurs if autoEdit is FALSE.PPSet this property's value with setAutoEdit() and get this property's value with autoEdit()..SH "bool boundaryChecking"This property holds whether boundary checking is active..PPWhen boundary checking is active (the default), signals are emitted indicating the current position of the default cursor..PPSee also boundary()..PPSet this property's value with setBoundaryChecking() and get this property's value with boundaryChecking()..SH "bool confirmCancels"This property holds whether the browser confirms cancel operations..PPIf this property is TRUE, all cancels must be confirmed by the user through a message box (this behavior can be changed by overriding the confirmCancel() function), otherwise all cancels occur immediately. The default is FALSE..PPSee also confirmEdits and confirmCancel()..PPSet this property's value with setConfirmCancels() and get this property's value with confirmCancels()..SH "bool confirmDelete"This property holds whether the browser confirms deletions..PPIf this property is TRUE, the browser confirms deletions, otherwise deletions happen immediately..PPSee also confirmCancels, confirmEdits, confirmUpdate, confirmInsert and confirmEdit()..PPSet this property's value with setConfirmDelete() and get this property's value with confirmDelete()..SH "bool confirmEdits"This property holds whether the browser confirms edit operations..PPIf this property is TRUE, the browser confirms all edit operations (insertions, updates and deletions), otherwise all edit operations happen immediately. Confirmation is achieved by presenting the user with a message box -- this behavior can be changed by reimplementing the confirmEdit() function,.PPSee also confirmEdit(), confirmCancels, confirmInsert, confirmUpdate and confirmDelete..PPSet this property's value with setConfirmEdits() and get this property's value with confirmEdits()..SH "bool confirmInsert"This property holds whether the data browser confirms insertions..PPIf this property is TRUE, the browser confirms insertions, otherwise insertions happen immediately..PPSee also confirmCancels, confirmEdits, confirmUpdate, confirmDelete and confirmEdit()..PPSet this property's value with setConfirmInsert() and get this property's value with confirmInsert()..SH "bool confirmUpdate"This property holds whether the browser confirms updates..PPIf this property is TRUE, the browser confirms updates, otherwise updates happen immediately..PPSee also confirmCancels, confirmEdits, confirmInsert, confirmDelete and confirmEdit()..PPSet this property's value with setConfirmUpdate() and get this property's value with confirmUpdate()..SH "QString filter"This property holds the data browser's filter..PPThe filter applies to the data shown in the browser. Call refresh() to apply the new filter. A filter is a string containing a SQL WHERE clause without the WHERE keyword, e.g. "id>1000", "name LIKE 'A%'"..PPSee also sort..PPSet this property's value with setFilter() and get this property's value with filter()..SH "bool readOnly"This property holds whether the browser is read-only..PPThe default is FALSE, i.e. data can be edited. If the data browser is read-only, no database edits will be allowed..PPSet this property's value with setReadOnly() and get this property's value with isReadOnly()..SH "QStringList sort"This property holds the data browser's sort..PPThe data browser's sort affects the order in which records are viewed in the browser. Call refresh() to apply the new sort..PPWhen retrieving the sort property, a string list is returned in the form 'fieldname order', e.g. 'id ASC', 'surname DESC'..PPSee also filter and refresh()..PPSet this property's value with setSort() and get this property's value with sort()..SH "SEE ALSO".BR http://doc.trolltech.com/qdatabrowser.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com.  See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf 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..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qdatabrowser.3qt) and the Qtversion (3.0.0).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -