EHM DAL 0.2.3
Data abstraction layer for Eastside Hockey Manager
Loading...
Searching...
No Matches
staff_award_history.h
1#pragma once
2
3
4// Application headers
5#include "include/schema/abstract_table_item.h"
6
7// Qt headers
8class QDataStream;
9#include <memory>
10
11namespace ehm_dal::schema {
12
13// --- Staff award history --- //
15{
16public:
19
20 // File i/o
21 bool read(QDataStream &in, ehm_dal::database::DatabaseVersion &version) override;
22 bool write(QDataStream &out, ehm_dal::database::DatabaseVersion &version) override;
23
24 // Get data
25 QString text() const override;
26
27 // Initialisation
28 bool init() override;
29
30 // Parent data
31 qint32 parentItemId() const override;
32
33private:
34 struct Data;
35 std::unique_ptr<Data> data_;
36
37 // Get data
38 QVariant internalData(const qint32 column, const qint32 role) const override;
39
40 // Set data
41 bool setInternalData(const qint32 column,
42 const QVariant &value,
43 const qint32 role,
44 std::vector<qint32> &modified_columns) override;
45};
46
47} // namespace ehm_dal::schema
48
The DatabaseVersion class represents the database version number.
Definition: database_version.h:12
The AbstractTableItem class represents a row in a Table with an id field.
Definition: abstract_table_item.h:31
Definition: staff_award_history.h:15
bool init() override
Initialises the table item members. This only needs to be called once per item.
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.
qint32 parentItemId() const override
Returns the item id of the items parent item. Applies to tree structures only.
QString text() const override
Returns the row's display text. This provides a convenient way to obtain a simple description of the ...