Kexi API Documentation (2.0 alpha)

KexiCellEditorFactory Class Reference

#include <kexicelleditorfactory.h>

List of all members.


Detailed Description

A singleton class providing access to cell editor factories.

Definition at line 33 of file kexicelleditorfactory.h.

Public Member Functions

 KexiCellEditorFactory ()
virtual ~KexiCellEditorFactory ()

Static Public Member Functions

static void registerItem (KexiCellEditorFactoryItem &item, uint type, const QString &subType=QString::null)
static KexiCellEditorFactoryItemitem (uint type, const QString &subType=QString::null)
static KexiTableEditcreateEditor (KexiTableViewColumn &column, QWidget *parent=0)

Static Protected Member Functions

static void init ()


Constructor & Destructor Documentation

KexiCellEditorFactory::KexiCellEditorFactory  ) 
 

Definition at line 100 of file kexicelleditorfactory.cpp.

KexiCellEditorFactory::~KexiCellEditorFactory  )  [virtual]
 

Definition at line 104 of file kexicelleditorfactory.cpp.


Member Function Documentation

KexiTableEdit * KexiCellEditorFactory::createEditor KexiTableViewColumn column,
QWidget parent = 0
[static]
 

Creates a new editor for column. If parent is of QScrollView, the new editor will be created inside parent->viewport() instead.

Definition at line 133 of file kexicelleditorfactory.cpp.

References KexiCellEditorFactoryItem::createEditor(), KexiDB::IndexSchema::detailsRelationships(), KexiDB::Field::Enum, KexiDB::FieldList::fields(), KexiDB::TableSchema::indicesIterator(), init(), item(), KexiDB::Field::subType(), and KexiDB::Field::type().

Referenced by KexiComboBoxTableEdit::createInternalEditor(), and KexiTableView::editor().

void KexiCellEditorFactory::init  )  [static, protected]
 

Definition at line 110 of file kexicelleditorfactory.cpp.

References KexiDB::Field::BLOB, KexiDB::Field::Boolean, KexiDB::Field::Date, KexiDB::Field::DateTime, KexiDB::Field::Enum, KexiDB::Field::InvalidType, KexiDB::Field::Text, and KexiDB::Field::Time.

Referenced by createEditor(), item(), and registerItem().

KexiCellEditorFactoryItem * KexiCellEditorFactory::item uint  type,
const QString subType = QString::null
[static]
 

Returns:
item for type and (optional) subType. If no item found, the one with empty subtype is tried. If still no item found, the default is tried. Eventually, may return NULL.

Definition at line 178 of file kexicelleditorfactory.cpp.

References init().

Referenced by KexiTableView::adjustColumnWidthToContents(), createEditor(), and KexiComboBoxTableEdit::createInternalEditor().

void KexiCellEditorFactory::registerItem KexiCellEditorFactoryItem item,
uint  type,
const QString subType = QString::null
[static]
 

Registers factory item for type and (optional) subType. subType is usually obtained (e.g. in KexiTableView) from KexiDB::Field::subType(). Passing KexiDB::Field::Invalid as type will set default item, i.e. the one that will be used when no other item is defined for given data type. You can register the same item many times for different types and subtypes. Once registered, item object will be owned by the factory, so you shouldn't care about deleting it.

Definition at line 127 of file kexicelleditorfactory.cpp.

References init().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:49:46 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003