kexi
KexiTableViewColumn Class Reference
#include <kexitableviewdata.h>
Detailed Description
Single column definition.
Definition at line 52 of file kexitableviewdata.h.
Public Types | |
typedef QPtrList< KexiTableViewColumn > | List |
typedef QPtrListIterator< KexiTableViewColumn > | ListIterator |
Public Member Functions | |
KexiTableViewColumn (KexiDB::Field &f, bool owner=false) | |
KexiTableViewColumn (const QString &name, KexiDB::Field::Type ctype, uint cconst=KexiDB::Field::NoConstraints, uint options=KexiDB::Field::NoOptions, uint length=0, uint precision=0, QVariant defaultValue=QVariant(), const QString &caption=QString::null, const QString &description=QString::null, uint width=0) | |
KexiTableViewColumn (const QString &name, KexiDB::Field::Type ctype, const QString &caption, const QString &description=QString::null) | |
KexiTableViewColumn (const KexiDB::QuerySchema &query, KexiDB::QueryColumnInfo &fi) | |
virtual | ~KexiTableViewColumn () |
virtual bool | acceptsFirstChar (const QChar &ch) const |
bool | isReadOnly () const |
void | setReadOnly (bool ro) |
bool | visible () const |
void | setVisible (bool v) |
QString | captionAliasOrName () const |
void | setValidator (KexiUtils::Validator *v) |
KexiUtils::Validator * | validator () const |
void | setRelatedData (KexiTableViewData *data) |
KexiTableViewData * | relatedData () const |
KexiDB::Field * | field () const |
void | setRelatedDataEditable (bool set) |
bool | relatedDataEditable () const |
Public Attributes | |
KexiDB::QueryColumnInfo * | fieldinfo |
bool | isDBAware: 1 |
Protected Member Functions | |
KexiTableViewColumn (bool) | |
void | init () |
Protected Attributes | |
QString | m_captionAliasOrName |
KexiUtils::Validator * | m_validator |
KexiTableViewData * | m_data |
KexiTableViewData * | m_relatedData |
uint | m_relatedDataPKeyID |
KexiDB::Field * | m_field |
bool | m_readOnly: 1 |
bool | m_fieldOwned: 1 |
bool | m_visible: 1 |
bool | m_relatedDataEditable: 1 |
Friends | |
class | KexiTableViewData |
Constructor & Destructor Documentation
KexiTableViewColumn::KexiTableViewColumn | ( | KexiDB::Field & | f, | |
bool | owner = false | |||
) |
Not db-aware ctor. if owner is true, the field will be owned by this column, so you shouldn't care about destroying this field.
Definition at line 46 of file kexitableviewdata.cpp.
KexiTableViewColumn::KexiTableViewColumn | ( | const QString & | name, | |
KexiDB::Field::Type | ctype, | |||
uint | cconst = KexiDB::Field::NoConstraints , |
|||
uint | options = KexiDB::Field::NoOptions , |
|||
uint | length = 0 , |
|||
uint | precision = 0 , |
|||
QVariant | defaultValue = QVariant() , |
|||
const QString & | caption = QString::null , |
|||
const QString & | description = QString::null , |
|||
uint | width = 0 | |||
) |
Convenience ctor, like above. The field is created using specifed parameters that are equal to these accepted by KexiDB::Field ctor. The column will be the owner of this automatically generated field.
Definition at line 56 of file kexitableviewdata.cpp.
KexiTableViewColumn::KexiTableViewColumn | ( | const QString & | name, | |
KexiDB::Field::Type | ctype, | |||
const QString & | caption, | |||
const QString & | description = QString::null | |||
) |
Convenience ctor, simplified version of the above.
Definition at line 79 of file kexitableviewdata.cpp.
KexiTableViewColumn::KexiTableViewColumn | ( | const KexiDB::QuerySchema & | query, | |
KexiDB::QueryColumnInfo & | fi | |||
) |
KexiTableViewColumn::KexiTableViewColumn | ( | bool | ) | [protected] |
Member Function Documentation
QString KexiTableViewColumn::captionAliasOrName | ( | ) | const [inline] |
- Returns:
- whatever is available:
- field's caption
- or field's alias (from query)
- or finally - field's name
Definition at line 105 of file kexitableviewdata.h.
KexiDB::Field* KexiTableViewColumn::field | ( | ) | const [inline] |
- Returns:
- field for this column. For db-aware information is taken from fieldinfo member.
Definition at line 131 of file kexitableviewdata.h.
bool KexiTableViewColumn::isReadOnly | ( | ) | const [inline] |
- Returns:
- true if the column is read-only For db-aware column this can depend on whether the column is in parent table of this query.
- See also:
- setReadOnly()
Definition at line 88 of file kexitableviewdata.h.
KexiTableViewData* KexiTableViewColumn::relatedData | ( | ) | const [inline] |
For not-db-aware data only: Related data data for this column, what defines simple one-field. NULL by default.
- See also:
- setRelatedData()
Definition at line 127 of file kexitableviewdata.h.
bool KexiTableViewColumn::relatedDataEditable | ( | ) | const [inline] |
Only usable if related data is set (ie. this is for combo boxes).
- Returns:
- 'editable' flag for this column. False by default.
- See also:
- setRelatedDataEditable(bool).
Definition at line 141 of file kexitableviewdata.h.
void KexiTableViewColumn::setReadOnly | ( | bool | ro | ) | [inline] |
void KexiTableViewColumn::setRelatedData | ( | KexiTableViewData * | data | ) |
For not-db-aware data only: Sets related data data for this column, what defines simple one-field, one-to-many relationship between this column and the primary key in data. The relationship will be used to generate a popup editor instead of just regular editor. This assignment has no result if data has no primary key defined. data is owned, so is will be destroyed when needed. It is also destroyed when another data (or NULL) is set for the same column.
Definition at line 165 of file kexitableviewdata.cpp.
void KexiTableViewColumn::setRelatedDataEditable | ( | bool | set | ) |
Only usable if related data is set (ie. this is for combo boxes). Sets 'editable' flag for this column, what means a new value can be entered by hand. This is similar to QComboBox::setEditable().
Definition at line 186 of file kexitableviewdata.cpp.
void KexiTableViewColumn::setValidator | ( | KexiUtils::Validator * | v | ) |
Assigns validator v for this column. If the validator has no parent object, it will be owned by the column, so you shouldn't care about destroying it.
Definition at line 156 of file kexitableviewdata.cpp.
void KexiTableViewColumn::setVisible | ( | bool | v | ) | [inline] |
KexiUtils::Validator* KexiTableViewColumn::validator | ( | ) | const [inline] |
- Returns:
- validator assigned for this column of 0 if there is no validator assigned.
Definition at line 113 of file kexitableviewdata.h.
bool KexiTableViewColumn::visible | ( | ) | const [inline] |
Member Data Documentation
A rich field information for db-aware data. For not-db-aware data it is always 0 (use field() instead.
Definition at line 145 of file kexitableviewdata.h.
true if data is stored in DB, not only in memeory
Definition at line 147 of file kexitableviewdata.h.
KexiTableViewData* KexiTableViewColumn::m_data [protected] |
The documentation for this class was generated from the following files: