Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

Q3SqlPropertyMap Class Reference

List of all members.

Detailed Description

The Q3SqlPropertyMap class is used to map widgets to SQL fields.

The SQL module uses Qt object properties to insert and extract values from editor widgets.

This class is used to map editors to SQL fields. This works by associating SQL editor class names to the properties used to insert and extract values to/from the editor.

For example, a QLineEdit can be used to edit text strings and other data types in Q3DataTables or Q3SqlForms. Several properties are defined in QLineEdit, but only the text property is used to insert and extract text from a QLineEdit. Both Q3DataTable and Q3SqlForm use the global Q3SqlPropertyMap for inserting and extracting values to and from an editor widget. The global property map defines several common widgets and properties that are suitable for many applications. You can add and remove widget properties to suit your specific needs.

If you want to use custom editors with your Q3DataTable or Q3SqlForm, you must install your own Q3SqlPropertyMap for that table or form. Example:

doc/src/snippets/code/src_qt3support_sql_q3sqlpropertymap.cpp 0

You can also replace the global Q3SqlPropertyMap that is used by default. (Bear in mind that Q3SqlPropertyMap takes ownership of the new default map.)

doc/src/snippets/code/src_qt3support_sql_q3sqlpropertymap.cpp 1

See also:
Q3DataTable, Q3SqlForm, Q3SqlEditorFactory

Definition at line 55 of file q3sqlpropertymap.h.

Public Member Functions

void insert (const QString &classname, const QString &property)
QVariant property (QWidget *widget)
 Q3SqlPropertyMap ()
void remove (const QString &classname)
virtual void setProperty (QWidget *widget, const QVariant &value)
virtual ~Q3SqlPropertyMap ()

Static Public Member Functions

static Q3SqlPropertyMapdefaultMap ()
static void installDefaultMap (Q3SqlPropertyMap *map)

Private Attributes

Q3SqlPropertyMapPrivate * d

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index