EHM DAL 0.2.3
Data abstraction layer for Eastside Hockey Manager
|
The Column class represents a column of data in a Table
.
More...
#include <column.h>
Public Types | |
enum | COLUMN_SETTINGS { NO_SETTINGS = 1 << 0 , HIDE_EVERYWHERE = 1 << 1 , HIDE_FROM_FILTERS = 1 << 2 , HIDE_FROM_TABLES = 1 << 3 , HIDE_FROM_UI = 1 << 4 , HIDE_FROM_UI_AND_TABLES = 1 << 5 , READ_ONLY = 1 << 6 , COLOUR_POINTER = 1 << 7 , NAME_STRING_POINTER = 1 << 8 , POINTER_LIST = 1 << 9 , RAW_POINTER = 1 << 10 , CACHED_COLUMN = 1 << 11 } |
The COLUMN_SETTINGS enum represents settings for a Column . More... | |
enum class | ColumnType : quint8 { BOOL , CONTAINER , DATE , YEAR , ATTRIBUTE_20 , ATTRIBUTE_99 , ATTRIBUTE_200 , ATTRIBUTE_POTENTIAL , CHAR , UCHAR , CURRENCY , DOUBLE , FLOAT , INT , UINT , SHORT , USHORT , FLAG , POINTER , POINTER_BITMASK_FLAG_TABLE , POINTER_COLOUR_TABLE , POINTER_DATABASE_TABLE , POINTER_FLAG_TABLE , POINTER_LIST , RAW_POINTER , PRIMARY_KEY_ID , PRIMARY_KEY_UID , EXTRA_RULES , STRING } |
The ColumnType enum represents the data type of the Column . | |
Public Member Functions | |
Column (const qint32 position, const QString &name, const ColumnType type, const quint16 settings=NO_SETTINGS) | |
Constructs a Column representing a data type other than an ehm_dal::data_types::AbstractPointer . | |
Column (const qint32 position, const QString &name, std::shared_ptr< ehm_dal::tables::AbstractTable > table, const quint16 settings=NO_SETTINGS) | |
Constructs a Column representing an ehm_dal::data_types::AbstractPointer data type. | |
Qt::ItemFlags | flags () const |
Returns the Qt::ItemFlags in respect of the column. | |
qint32 | id () const |
Returns the column position/index. | |
QString | name () const |
Returns the column name. | |
Q_DECL_DEPRECATED qint32 | position () const |
bool | isCached () const |
Returns whether the column is cached. | |
bool | isCheckable () const |
Returns whether the column is checkable. | |
bool | isContainer () const |
Returns whether the column represents a container. | |
bool | isReadOnly () const |
Returns whether the column contains read only data. | |
bool | isColourPointer () const |
Returns whether the column points to a ehm_dal::schema::Colour . This is only applicable to columns representing an ehm_dal::data_types::AbstractPointer data type. | |
bool | isDatabaseTablePointer () const |
Returns whether the column points to a ehm_dal::Database table. This is only applicable to columns representing an ehm_dal::data_types::AbstractPointer data type. | |
bool | isFlagTablePointer () const |
Returns whether the column points to a ehm_dal::flag::FlagDatabase table. This is only applicable to columns representing an ehm_dal::data_types::AbstractPointer data type. | |
bool | isNameStringPointer () const |
Returns whether the column points to a ehm_dal::data_types::NamePointer . This is only applicable to columns representing an ehm_dal::data_types::AbstractPointer data type. | |
bool | isPointerList () const |
Returns whether the column represents a list of pointers. | |
bool | isRawPointer () const |
Returns whether the column represents a raw pointer to point to data. | |
ehm_dal::tables::TableIndex | relatedTableIndex () const |
Returns the ehm_dal::tables::TableIndex of the source ehm_dal::tables::AbstractTable . | |
QString | relatedTableName () const |
Returns the table name of the source ehm_dal::tables::AbstractTable . | |
bool | hiddenEverywhere () const |
Returns whether the column is hidden everywhere. | |
bool | hiddenFromFilters () const |
Returns whether the column is hidden from filters. | |
bool | hiddenFromTables () const |
Returns whether the column is hidden from tables. | |
bool | hiddenFromUi () const |
Returns whether the column is hidden from the user interface. | |
bool | visibleToFilters () const |
Returns whether the column is visible to filters. | |
The Column class represents a column of data in a Table
.
The COLUMN_SETTINGS enum represents settings for a Column
.
Enumerator | |
---|---|
HIDE_EVERYWHERE | Hide from filters, ui and tables |
HIDE_FROM_FILTERS | Hide from filters, but visible on ui and tables |
HIDE_FROM_TABLES | Hide from tables, but visible on filters |
HIDE_FROM_UI | Hide from the UI, but visible on filters and tables |
HIDE_FROM_UI_AND_TABLES | Hide from the UI and tables, but visible on filters |
READ_ONLY | Read only |
COLOUR_POINTER | Colour pointer |
NAME_STRING_POINTER | Name string pointer |
POINTER_LIST | QSet<qint32> of pointers |
RAW_POINTER | Raw pointer |
CACHED_COLUMN | Uses a Cached Column Manager to generate data |
ehm_dal::column_data::Column::Column | ( | const qint32 | position, |
const QString & | name, | ||
const ColumnType | type, | ||
const quint16 | settings = NO_SETTINGS |
||
) |
Constructs a Column representing a data type other than an ehm_dal::data_types::AbstractPointer
.
position | Position index of the column within the table (starting at zero) |
name | Name of the column |
type | Type of data held by the column |
settings | The Column::COLUMN_SETTINGS of the column |
ehm_dal::column_data::Column::Column | ( | const qint32 | position, |
const QString & | name, | ||
std::shared_ptr< ehm_dal::tables::AbstractTable > | table, | ||
const quint16 | settings = NO_SETTINGS |
||
) |
Constructs a Column representing an ehm_dal::data_types::AbstractPointer
data type.
position | Position index of the column within the table (starting at zero) |
name | Name of the column |
table | The source ehm_dal::tables::AbstractTable to which the column points |
settings | The Column::COLUMN_SETTINGS of the column |