EHM DAL 0.2.3
Data abstraction layer for Eastside Hockey Manager
Loading...
Searching...
No Matches
ehm_dal::schema::StaffPreferences Class Reference
Inheritance diagram for ehm_dal::schema::StaffPreferences:

Public Member Functions

bool read (QDataStream &in, ehm_dal::database::DatabaseVersion &version) override
 Reads a table row from the QDataStream.
 
bool write (QDataStream &out, ehm_dal::database::DatabaseVersion &version) override
 Writes a table row to the QDataStream.
 
QString text () const override
 Returns the row's display text. This provides a convenient way to obtain a simple description of the row.
 
bool init () override
 Initialises the table item members. This only needs to be called once per item.
 
StaffPreferencesoperator= (StaffPreferences &&rhs)
 
- Public Member Functions inherited from ehm_dal::schema::AbstractTableItem
 AbstractTableItem ()
 Default constructor.
 
virtual ~AbstractTableItem ()
 Default destructor.
 
virtual void addChildItem (std::shared_ptr< AbstractTableItem > item, const ehm_dal::tables::TableIndex child_table)
 Adds the child item item from the child_table to the present tree table. This represents a tree relationship between the child 'item' from the child table and the present table.
 
virtual QVariant childData (const QModelIndex &index, qint32 role, ehm_dal::column_data::ColumnData *column_data, const ehm_dal::tables::TableIndex child_table) const
 Returns child data stored under the given role for the selected index.
 
virtual qint32 childItemId (const ehm_dal::tables::TableIndex child_table) const
 Returns the item id number for the child data under the related child_table.
 
virtual qint32 childRowCount (const ehm_dal::tables::TableIndex child_table) const
 Returns the number of related child items in respect of child_table.
 
virtual bool setChildData (const QModelIndex &index, const QVariant &value, const qint32 role, std::vector< qint32 > &modified_columns, ehm_dal::column_data::ColumnData *column_data, const ehm_dal::tables::TableIndex child_table)
 Sets the role data for the child item at index to value.
 
virtual bool read (QDataStream &in, ehm_dal::database::DatabaseVersion &version)
 Reads a table row from the QDataStream.
 
virtual bool write (QDataStream &out, ehm_dal::database::DatabaseVersion &version)
 Writes a table row to the QDataStream.
 
qint32 id () const
 Returns the row id. The first row of a table is 0, the second row is 1, etc.
 
QVariant id (const qint32 role)
 Returns the row id in a manner compatible with QAbstractTableModel item roles. This is generally unecessary and qint32 AbstractTableItem::id() should be used where possible.
 
virtual QString text () const =0
 Returns the row's display text. This provides a convenient way to obtain a simple description of the row.
 
Q_DECL_DEPRECATED QString displayText () const
 
virtual qint32 uid () const
 Returns the row's unique database id. Not all tables use a uid.
 
QVariant data (const qint32 column, qint32 role, ehm_dal::column_data::ColumnData *column_data) const
 Returns the row's data stored under the given role for the column.
 
virtual QVariant data (const QModelIndex &index, qint32 role, ehm_dal::column_data::ColumnData *column_data) const
 Returns the row's data stored under the given role for the column referred to by the index.
 
virtual QString identifier () const
 Returns the item's text identifier for matching against.
 
virtual QStringList identifierList () const
 Returns a list of all of the item's identifiers for matching against. This includes the main identifier() string as well as any alternatives.
 
virtual bool init ()=0
 Initialises the table item members. This only needs to be called once per item.
 
bool alloc (const qint32 new_id)
 Initialises the table item and allocates and item id to new_id and a uid (if applicable) and then calls init(). This should be called whenever adding a new item to a table. This should not be called during file i/o.
 
virtual qint32 parentItemId () const
 Returns the item id of the items parent item. Applies to tree structures only.
 
bool setData (const qint32 column, const QVariant &value, qint32 role, std::vector< qint32 > &modified_columns, ehm_dal::column_data::ColumnData *column_data)
 Sets the role data for the item at column to value.
 
virtual bool setData (const QModelIndex &index, const QVariant &value, qint32 role, std::vector< qint32 > &modified_columns, ehm_dal::column_data::ColumnData *column_data)
 Sets the role data for the item at index to value.
 
virtual void fixErrors ()
 Fixes any known errors with the item. E.g. errors introduced with a prior version of EHM DAL or the Editor.
 

Additional Inherited Members

- Protected Member Functions inherited from ehm_dal::schema::AbstractTableItem
virtual bool deletable () const
 
template<IntegralNumber T>
QVariant fromHexVector (const std::vector< T > &raw_data, const qint32 role) const
 
QVariant fromValue (const QVariant &value, const qint32 role) const
 Returns a value as a QVariant if the role is Qt::DisplayRole or Qt::EditRole. A blank QVariant is returned if another role is selected.
 
- Protected Attributes inherited from ehm_dal::schema::AbstractTableItem
qint32 id_
 

Member Function Documentation

◆ init()

bool ehm_dal::schema::StaffPreferences::init ( )
overridevirtual

Initialises the table item members. This only needs to be called once per item.

Returns
true if members were initialised or false if nothing requires initialising.

Implements ehm_dal::schema::AbstractTableItem.

◆ read()

bool ehm_dal::schema::StaffPreferences::read ( QDataStream &  in,
ehm_dal::database::DatabaseVersion version 
)
overridevirtual

Reads a table row from the QDataStream.

Parameters
inQDataStream to be parsed
versionEHM database version
Returns
whether or not the parsing was successful

Reimplemented from ehm_dal::schema::AbstractTableItem.

◆ text()

QString ehm_dal::schema::StaffPreferences::text ( ) const
overridevirtual

Returns the row's display text. This provides a convenient way to obtain a simple description of the row.

Returns
the row display text.

Implements ehm_dal::schema::AbstractTableItem.

◆ write()

bool ehm_dal::schema::StaffPreferences::write ( QDataStream &  out,
ehm_dal::database::DatabaseVersion version 
)
overridevirtual

Writes a table row to the QDataStream.

Parameters
outQDataStream to be output to
versionEHM database version
Returns
whether or not the out was successful

Reimplemented from ehm_dal::schema::AbstractTableItem.