EHM DAL 0.2.3
Data abstraction layer for Eastside Hockey Manager
Loading...
Searching...
No Matches
player_rights.h
1#pragma once
2
3// Application headers
4#include "include/schema/abstract_table_item.h"
5
6// Qt headers
7class QDataStream;
8#include <memory>
9
10namespace ehm_dal::schema {
11
12// --- Retired numbers --- //
14{
15public:
18
19 // File i/o
20 bool read(QDataStream &in, ehm_dal::database::DatabaseVersion &version) override;
21 bool write(QDataStream &out, ehm_dal::database::DatabaseVersion &version) override;
22
23 // Get data
24 QString text() const override;
25
26 // Initialisation
27 bool init() override;
28
29 // Operator overloading
30 bool operator<(const PlayerRights &rhs) const;
31
32 // Parent data
33 qint32 parentItemId() const override;
34
35private:
36 struct Data;
37 std::unique_ptr<Data> data_;
38
39 // Get data
40 bool deletable() const override;
41 QVariant internalData(const qint32 column, const qint32 role) const override;
42
43 // Set data
44 bool setInternalData(const qint32 column,
45 const QVariant &value,
46 const qint32 role,
47 std::vector<qint32> &modified_columns) override;
48};
49
50} // namespace ehm_dal::schema
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: player_rights.h:14
bool read(QDataStream &in, ehm_dal::database::DatabaseVersion &version) override
Reads a table row from the QDataStream.
bool init() override
Initialises the table item members. This only needs to be called once per item.
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 ...
qint32 parentItemId() const override
Returns the item id of the items parent item. Applies to tree structures only.