KDbQueryColumnInfo
#include <KDbQueryColumnInfo.h>
Public Types | |
typedef QList< KDbQueryColumnInfo * > | List |
typedef QList< KDbQueryColumnInfo * >::ConstIterator | ListIterator |
typedef QVector< KDbQueryColumnInfo * > | Vector |
Public Member Functions | |
KDbQueryColumnInfo (KDbField *f, const QString &alias, bool visible, KDbQueryColumnInfo *foreignColumn=nullptr) | |
QString | alias () const |
QString | aliasOrName () const |
QString | captionOrAliasOrName () const |
KDbConnection * | connection () |
const KDbConnection * | connection () const |
KDbField * | field () |
const KDbField * | field () const |
KDbQueryColumnInfo * | foreignColumn () |
const KDbQueryColumnInfo * | foreignColumn () const |
int | indexForVisibleLookupValue () const |
bool | isVisible () const |
const KDbQuerySchema * | querySchema () const |
void | setAlias (const QString &alias) |
void | setField (KDbField *field) |
void | setIndexForVisibleLookupValue (int index) |
void | setVisible (bool set) |
Detailed Description
Helper class that assigns additional information for the column in a query.
The following information is assigned:
- alias
- visibility KDbQueryColumnInfo::Vector is created and returned by KDbQuerySchema::fieldsExpanded(). It is efficiently cached within the KDbQuerySchema object.
Definition at line 40 of file KDbQueryColumnInfo.h.
Member Typedef Documentation
◆ List
Definition at line 44 of file KDbQueryColumnInfo.h.
◆ ListIterator
QList<KDbQueryColumnInfo*>::ConstIterator KDbQueryColumnInfo::ListIterator |
Definition at line 45 of file KDbQueryColumnInfo.h.
◆ Vector
Definition at line 43 of file KDbQueryColumnInfo.h.
Constructor & Destructor Documentation
◆ KDbQueryColumnInfo()
KDbQueryColumnInfo::KDbQueryColumnInfo | ( | KDbField * | f, |
const QString & | alias, | ||
bool | visible, | ||
KDbQueryColumnInfo * | foreignColumn = nullptr ) |
Definition at line 27 of file KDbQueryColumnInfo.cpp.
◆ ~KDbQueryColumnInfo()
KDbQueryColumnInfo::~KDbQueryColumnInfo | ( | ) |
Definition at line 33 of file KDbQueryColumnInfo.cpp.
Member Function Documentation
◆ alias()
QString KDbQueryColumnInfo::alias | ( | ) | const |
- Returns
- alias for this column
Definition at line 53 of file KDbQueryColumnInfo.cpp.
◆ aliasOrName()
QString KDbQueryColumnInfo::aliasOrName | ( | ) | const |
- Returns
- alias if it is not empty, field's name otherwise.
Definition at line 63 of file KDbQueryColumnInfo.cpp.
◆ captionOrAliasOrName()
QString KDbQueryColumnInfo::captionOrAliasOrName | ( | ) | const |
- Returns
- field's caption if it is not empty, field's alias otherwise. If alias is also empty - returns field's name.
Definition at line 68 of file KDbQueryColumnInfo.cpp.
◆ connection() [1/2]
KDbConnection * KDbQueryColumnInfo::connection | ( | ) |
◆ connection() [2/2]
const KDbConnection * KDbQueryColumnInfo::connection | ( | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Since
- 3.2
Definition at line 113 of file KDbQueryColumnInfo.cpp.
◆ field() [1/2]
KDbField * KDbQueryColumnInfo::field | ( | ) |
- Returns
- field for this column
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 38 of file KDbQueryColumnInfo.cpp.
◆ field() [2/2]
const KDbField * KDbQueryColumnInfo::field | ( | ) | const |
Definition at line 43 of file KDbQueryColumnInfo.cpp.
◆ foreignColumn() [1/2]
KDbQueryColumnInfo * KDbQueryColumnInfo::foreignColumn | ( | ) |
- Returns
- non-nullptr if this column is a visible column for other column
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 93 of file KDbQueryColumnInfo.cpp.
◆ foreignColumn() [2/2]
const KDbQueryColumnInfo * KDbQueryColumnInfo::foreignColumn | ( | ) | const |
Definition at line 98 of file KDbQueryColumnInfo.cpp.
◆ indexForVisibleLookupValue()
int KDbQueryColumnInfo::indexForVisibleLookupValue | ( | ) | const |
- Returns
- index of column with visible lookup value within the 'fields expanded' vector. -1 means no visible lookup value is available because there is no lookup for the column defined. Cached for efficiency as we use this information frequently.
- See also
- KDbLookupFieldSchema::visibleVolumn()
Definition at line 83 of file KDbQueryColumnInfo.cpp.
◆ isVisible()
bool KDbQueryColumnInfo::isVisible | ( | ) | const |
- Returns
- true is this column is visible
Definition at line 73 of file KDbQueryColumnInfo.cpp.
◆ querySchema()
const KDbQuerySchema * KDbQueryColumnInfo::querySchema | ( | ) | const |
Returns query schema for this column.
- Since
- 3.2
Definition at line 103 of file KDbQueryColumnInfo.cpp.
◆ setAlias()
void KDbQueryColumnInfo::setAlias | ( | const QString & | alias | ) |
Sets the alias.
Definition at line 58 of file KDbQueryColumnInfo.cpp.
◆ setField()
void KDbQueryColumnInfo::setField | ( | KDbField * | field | ) |
Sets the field.
Definition at line 48 of file KDbQueryColumnInfo.cpp.
◆ setIndexForVisibleLookupValue()
void KDbQueryColumnInfo::setIndexForVisibleLookupValue | ( | int | index | ) |
Sets index of column with visible lookup value within the 'fields expanded' vector.
Definition at line 88 of file KDbQueryColumnInfo.cpp.
◆ setVisible()
void KDbQueryColumnInfo::setVisible | ( | bool | set | ) |
Sets the visible flag.
Definition at line 78 of file KDbQueryColumnInfo.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:32 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.