Eneboo - Documentación para desarrolladores
Métodos públicos | Métodos públicos estáticos
Referencia de la Clase QSqlEditorFactory

The QSqlEditorFactory class is used to create the editors used by QDataTable and QSqlForm. Más...

#include <qsqleditorfactory.h>

Diagrama de herencias de QSqlEditorFactory
QEditorFactory QEditorFactory QObject QObject QObject QObject Qt Qt Qt Qt Qt Qt Qt Qt

Lista de todos los miembros.

Métodos públicos

 QSqlEditorFactory (QObject *parent=0, const char *name=0)
 ~QSqlEditorFactory ()
virtual QWidgetcreateEditor (QWidget *parent, const QVariant &variant)
virtual QWidgetcreateEditor (QWidget *parent, const QSqlField *field)
 QSqlEditorFactory (QObject *parent=0, const char *name=0)
 ~QSqlEditorFactory ()
virtual QWidgetcreateEditor (QWidget *parent, const QVariant &variant)
virtual QWidgetcreateEditor (QWidget *parent, const QSqlField *field)

Métodos públicos estáticos

static QSqlEditorFactorydefaultFactory ()
static void installDefaultFactory (QSqlEditorFactory *factory)
static QSqlEditorFactorydefaultFactory ()
static void installDefaultFactory (QSqlEditorFactory *factory)

Descripción detallada

The QSqlEditorFactory class is used to create the editors used by QDataTable and QSqlForm.

sql

QSqlEditorFactory is used by QDataTable and QSqlForm to automatically create appropriate editors for a given QSqlField. For example if the field is a QVariant::String a QLineEdit would be the default editor, whereas a QVariant::Int's default editor would be a QSpinBox.

If you want to create different editors for fields with the same data type, subclass QSqlEditorFactory and reimplement the createEditor() function.

Ver también:
QDataTable, QSqlForm

Documentación del constructor y destructor

QSqlEditorFactory::QSqlEditorFactory ( QObject parent = 0,
const char *  name = 0 
)

Constructs a SQL editor factory with parent parent, called name.

QSqlEditorFactory::~QSqlEditorFactory ( )

Destroys the object and frees any allocated resources.

QSqlEditorFactory::QSqlEditorFactory ( QObject parent = 0,
const char *  name = 0 
)
QSqlEditorFactory::~QSqlEditorFactory ( )

Documentación de las funciones miembro

QWidget * QSqlEditorFactory::createEditor ( QWidget parent,
const QVariant variant 
) [virtual]

Creates and returns the appropriate editor widget for the QVariant variant.

The widget that is returned has the parent parent (which may be zero). If variant is invalid, 0 is returned.

Reimplementado de QEditorFactory.

QWidget * QSqlEditorFactory::createEditor ( QWidget parent,
const QSqlField field 
) [virtual]

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Creates and returns the appropriate editor for the QSqlField field.

virtual QWidget* QSqlEditorFactory::createEditor ( QWidget parent,
const QVariant v 
) [virtual]

Creates and returns the appropriate editor for the QVariant v. If the QVariant is invalid, 0 is returned. The parent is passed to the appropriate editor's constructor.

Reimplementado de QEditorFactory.

virtual QWidget* QSqlEditorFactory::createEditor ( QWidget parent,
const QSqlField field 
) [virtual]
static QSqlEditorFactory* QSqlEditorFactory::defaultFactory ( ) [static]

Returns an instance of a default editor factory.

Reimplementado de QEditorFactory.

QSqlEditorFactory * QSqlEditorFactory::defaultFactory ( ) [static]

Returns an instance of a default editor factory.

Reimplementado de QEditorFactory.

void QSqlEditorFactory::installDefaultFactory ( QSqlEditorFactory factory) [static]

Replaces the default editor factory with factory. All QDataTable and QSqlForm instantiations will use this new factory for creating field editors. {QSqlEditorFactory takes ownership of factory, and destroys it when it is no longer needed.}

static void QSqlEditorFactory::installDefaultFactory ( QSqlEditorFactory factory) [static]

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'