12namespace ehm_dal::column_data {
69 POINTER_BITMASK_FLAG_TABLE,
71 POINTER_DATABASE_TABLE,
96 const quint16 settings = NO_SETTINGS);
107 std::shared_ptr<ehm_dal::tables::AbstractTable> table,
108 const quint16 settings = NO_SETTINGS);
118 inline qint32
id()
const {
return position_; }
122 inline QString
name()
const {
return name_; }
123 Q_DECL_DEPRECATED
inline qint32 position()
const
136 inline bool isCheckable()
const {
return type_ == ColumnType::BOOL; }
140 inline bool isContainer()
const {
return type_ == ColumnType::CONTAINER; }
218 enum ENUM_FLAGS { NO_COLUMN_INDEX = -1 };
221 qint32 position_{NO_COLUMN_INDEX};
222 QString name_{QStringLiteral(
"No column name")};
223 quint16 settings_{NO_SETTINGS};
227 std::shared_ptr<ehm_dal::tables::AbstractTable> table_;
228 void initTablePointer();
The Column class represents a column of data in a Table.
Definition: column.h:19
bool hiddenFromUi() const
Returns whether the column is hidden from the user interface.
Definition: column.h:207
QString name() const
Returns the column name.
Definition: column.h:122
qint32 id() const
Returns the column position/index.
Definition: column.h:118
bool isContainer() const
Returns whether the column represents a container.
Definition: column.h:140
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.
ColumnType
The ColumnType enum represents the data type of the Column.
Definition: column.h:44
bool isDatabaseTablePointer() const
Returns whether the column points to a ehm_dal::Database table. This is only applicable to columns re...
bool isReadOnly() const
Returns whether the column contains read only data.
Definition: column.h:144
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.
bool visibleToFilters() const
Returns whether the column is visible to filters.
Definition: column.h:215
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.
Definition: column.h:188
bool isFlagTablePointer() const
Returns whether the column points to a ehm_dal::flag::FlagDatabase table. This is only applicable to ...
COLUMN_SETTINGS
The COLUMN_SETTINGS enum represents settings for a Column.
Definition: column.h:25
@ HIDE_FROM_TABLES
Definition: column.h:29
@ HIDE_EVERYWHERE
Definition: column.h:27
@ HIDE_FROM_UI_AND_TABLES
Definition: column.h:31
@ NAME_STRING_POINTER
Definition: column.h:34
@ COLOUR_POINTER
Definition: column.h:33
@ HIDE_FROM_UI
Definition: column.h:30
@ READ_ONLY
Definition: column.h:32
@ CACHED_COLUMN
Definition: column.h:37
@ HIDE_FROM_FILTERS
Definition: column.h:28
@ POINTER_LIST
Definition: column.h:35
@ RAW_POINTER
Definition: column.h:36
bool hiddenFromFilters() const
Returns whether the column is hidden from filters.
Definition: column.h:192
bool isPointerList() const
Returns whether the column represents a list of pointers.
Definition: column.h:170
bool isCached() const
Returns whether the column is cached.
Definition: column.h:132
bool isRawPointer() const
Returns whether the column represents a raw pointer to point to data.
Definition: column.h:174
Qt::ItemFlags flags() const
Returns the Qt::ItemFlags in respect of the column.
bool isColourPointer() const
Returns whether the column points to a ehm_dal::schema::Colour. This is only applicable to columns re...
Definition: column.h:151
bool hiddenFromTables() const
Returns whether the column is hidden from tables.
Definition: column.h:199
bool isNameStringPointer() const
Returns whether the column points to a ehm_dal::data_types::NamePointer. This is only applicable to c...
Definition: column.h:166
bool isCheckable() const
Returns whether the column is checkable.
Definition: column.h:136
The Table class represents a database table and provides access to rows of data.
Definition: abstract_table.h:29
namespace ehm_dal::tables
Definition: column.h:4
TableIndex
The TableIndex enum represents the id number of each table within the database.
Definition: table_index.h:14