Qt:Документация 4.3.2/q3dataview

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

Содержание

Q3DataView Class Reference
[ Qt3Support module]

The Q3DataView class provides read-only SQL forms. Далее...

 #include <Q3DataView>

This class is part of the Qt 3 support library. It is provided to keep old source code working. Мы настоятельно не рекомендуем использовать этот класс в новом коде. See Porting to Qt 4 for more information.

Note to Qt Desktop Light Edition users: This class is only available in the Qt Desktop Edition.

Наследует QWidget.

Открытые функции

  • 201 свойство, унаследованное от QWidget
  • 29 открытых функций, унаследованных от QObject
  • 12 открытых функций, унаследованных от QPaintDevice

Открытые слоты

  • 19 открытых слотов, унаследованных от QWidget
  • 1 открытый слот, унаследованный от QObject

Дополнительные унаследованные члены

  • 56 свойств, унаследованных от QWidget
  • 1 свойство, унаследованное от QObject
  • 1 сигнал, унаследованный от QWidget
  • 1 сигнал, унаследованный от QObject
  • 4 статических открытых члена, унаследованных от QWidget
  • 5 статических открытых членов, унаследованных от QObject
  • 38 защищенных функций, унаследованных от QWidget
  • 7 защищенных функций, унаследованных от QObject
  • 1 защищенная функция, унаследованных от QPaintDevice
  • 1 защищенный слот, унаследованый от QWidget

Подробное описание

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.


Описание функций-членов

Q3DataView::Q3DataView ( QWidget * parent = 0, const char * name = 0, Qt::WindowFlags fl = 0 )

Constructs a data view which is a child of parent, called name, and with widget flags fl.

Q3DataView::~Q3DataView ()

Удаляет объект и очищает любые выделенные ресурсы.

void Q3DataView::clearValues () [virtual slot]

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.

Q3SqlForm * Q3DataView::form ()

Returns the default form used by the data view, or 0 if there is none.

See also setForm().

void Q3DataView::readFields () [virtual slot]

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().

QSqlRecord * Q3DataView::record ()

Returns the default record used by the data view, or 0 if there is none.

See also setRecord().

void Q3DataView::refresh ( QSqlRecord * buf ) [virtual slot]

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().

void Q3DataView::setForm ( Q3SqlForm * form ) [virtual]

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().

void Q3DataView::setRecord ( QSqlRecord * record ) [virtual]

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.

Смотрите также record().

void Q3DataView::writeFields () [virtual slot]

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().



Copyright © 2007 Trolltech Trademarks
Qt 4.3.2