kexi
KexiDB::LookupFieldSchema Class Reference
#include <lookupfieldschema.h>
Detailed Description
Provides information about lookup field's setup.LookupFieldSchema object is owned by TableSchema and created upon creating or retrieving the table schema from the database metadata.
- See also:
- LookupFieldSchema *TableSchemalookupFieldSchema( Field& field ) const
Definition at line 54 of file lookupfieldschema.h.
Public Types | |
enum | DisplayWidget { ComboBox, ListBox } |
Public Member Functions | |
LookupFieldSchema () | |
~LookupFieldSchema () | |
RowSource & | rowSource () |
void | setRowSource (const RowSource &rowSource) |
int | boundColumn () const |
void | setBoundColumn (int column) |
int | visibleColumn () const |
void | setVisibleColumn (int column) |
const QValueList< int > | columnWidths () const |
void | setColumnWidths (const QValueList< int > &widths) |
bool | columnHeadersVisible () const |
void | setColumnHeadersVisible (bool set) |
uint | maximumListRows () const |
void | setMaximumListRows (uint rows) |
bool | limitToList () const |
void | setLimitToList (bool set) |
DisplayWidget | displayWidget () const |
void | setDisplayWidget (DisplayWidget widget) |
QString | debugString () const |
void | debug () const |
Static Public Member Functions | |
static LookupFieldSchema * | loadFromDom (const QDomElement &lookupEl) |
static void | saveToDom (LookupFieldSchema &lookupSchema, QDomDocument &doc, QDomElement &parentEl) |
Protected Attributes | |
RowSource | m_rowSource |
int | m_boundColumn |
int | m_visibleColumn |
QValueList< int > | m_columnWidths |
uint | m_maximumListRows |
DisplayWidget | m_displayWidget |
bool | m_columnHeadersVisible: 1 |
bool | m_limitToList: 1 |
Classes | |
class | RowSource |
Row source information that can be specified for the lookup field schema. More... |
Member Enumeration Documentation
used in displayWidget()
- Enumerator:
-
ComboBox (the default) combobox widget should be displayed in forms for this lookup field ListBox listbox widget should be displayed in forms for this lookup field
Definition at line 177 of file lookupfieldschema.h.
Member Function Documentation
RowSource& KexiDB::LookupFieldSchema::rowSource | ( | ) | [inline] |
- Returns:
- row source information for the lookup field schema
Definition at line 122 of file lookupfieldschema.h.
void KexiDB::LookupFieldSchema::setRowSource | ( | const RowSource & | rowSource | ) | [inline] |
Sets row source for the lookup field schema
Definition at line 125 of file lookupfieldschema.h.
int KexiDB::LookupFieldSchema::boundColumn | ( | ) | const [inline] |
- Returns:
- bound column: an integer specifying a column that is bound (counted from 0). -1 means unspecified value.
- Todo:
- in later implementation there can be more columns
Definition at line 130 of file lookupfieldschema.h.
void KexiDB::LookupFieldSchema::setBoundColumn | ( | int | column | ) | [inline] |
Sets bound column number to column.
- See also:
- boundColumn()
Definition at line 133 of file lookupfieldschema.h.
int KexiDB::LookupFieldSchema::visibleColumn | ( | ) | const [inline] |
- Returns:
- visible column: an integer specifying a column that has to be visible in the combo box (counted from 0). -1 means unspecified value.
- Todo:
- in later implementation there can be more columns
Definition at line 139 of file lookupfieldschema.h.
void KexiDB::LookupFieldSchema::setVisibleColumn | ( | int | column | ) | [inline] |
Sets visible column number to column.
- See also:
- visibleColumn()
Definition at line 142 of file lookupfieldschema.h.
const QValueList<int> KexiDB::LookupFieldSchema::columnWidths | ( | ) | const [inline] |
- Returns:
- a number of ordered integers specifying column widths; -1 means 'default width' for a given column.
Definition at line 146 of file lookupfieldschema.h.
void KexiDB::LookupFieldSchema::setColumnWidths | ( | const QValueList< int > & | widths | ) | [inline] |
bool KexiDB::LookupFieldSchema::columnHeadersVisible | ( | ) | const [inline] |
- Returns:
- true if column headers are visible in the associated combo box popup or the list view. The default is false.
Definition at line 153 of file lookupfieldschema.h.
void KexiDB::LookupFieldSchema::setColumnHeadersVisible | ( | bool | set | ) | [inline] |
Sets "column headers visibility" flag.
- See also:
- columnHeadersVisible()
Definition at line 156 of file lookupfieldschema.h.
uint KexiDB::LookupFieldSchema::maximumListRows | ( | ) | const [inline] |
- Returns:
- integer property specifying a maximum number of rows that can be displayed in a combo box popup or a list box. The default is equal to KEXIDB_LOOKUP_FIELD_DEFAULT_LIST_ROWS constant.
Definition at line 161 of file lookupfieldschema.h.
void LookupFieldSchema::setMaximumListRows | ( | uint | rows | ) |
Sets maximum number of rows that can be displayed in a combo box popup or a list box. If rows is 0, KEXIDB_LOOKUP_FIELD_DEFAULT_LIST_ROWS is set. If rows is greater than KEXIDB_LOOKUP_FIELD_MAX_LIST_ROWS, KEXIDB_LOOKUP_FIELD_MAX_LIST_ROWS is set.
Definition at line 118 of file lookupfieldschema.cpp.
bool KexiDB::LookupFieldSchema::limitToList | ( | ) | const [inline] |
- Returns:
- true if , only values present on the list can be selected using the combo box. The default is true.
Definition at line 171 of file lookupfieldschema.h.
void KexiDB::LookupFieldSchema::setLimitToList | ( | bool | set | ) | [inline] |
Sets "limit to list" flag.
- See also:
- limitToList()
Definition at line 174 of file lookupfieldschema.h.
DisplayWidget KexiDB::LookupFieldSchema::displayWidget | ( | ) | const [inline] |
- Returns:
- the widget type that should be displayed within the forms for this lookup field. The default is ComboBox. For the Table View, combo box is always displayed.
Definition at line 185 of file lookupfieldschema.h.
void KexiDB::LookupFieldSchema::setDisplayWidget | ( | DisplayWidget | widget | ) | [inline] |
Sets type of widget to display within the forms for this lookup field.
- See also:
- displayWidget()
Definition at line 188 of file lookupfieldschema.h.
QString LookupFieldSchema::debugString | ( | ) | const |
void LookupFieldSchema::debug | ( | ) | const |
Shows debug information.
Definition at line 151 of file lookupfieldschema.cpp.
LookupFieldSchema * LookupFieldSchema::loadFromDom | ( | const QDomElement & | lookupEl | ) | [static] |
Loads data of lookup column schema from DOM tree. The data can be outdated or invalid, so the app should handle such cases.
- Returns:
- a new LookupFieldSchema object even if lookupEl contains no valid contents.
- Todo:
- handle fieldlist (retrieve from external table or so?), use lookupFieldSchema.rowSource().setValues()
Definition at line 157 of file lookupfieldschema.cpp.
void LookupFieldSchema::saveToDom | ( | LookupFieldSchema & | lookupSchema, | |
QDomDocument & | doc, | |||
QDomElement & | parentEl | |||
) | [static] |
Saves data of lookup column schema to parentEl DOM element of doc document.
Definition at line 248 of file lookupfieldschema.cpp.
The documentation for this class was generated from the following files: