Initial commit
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#ifndef HALLS_MODEL_H
|
||||
#define HALLS_MODEL_H
|
||||
|
||||
#include "base_sql_table_model.h"
|
||||
|
||||
class HallsModel : public BaseSqlTableModel {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
// Enum for columns
|
||||
enum HallsColumns { Id, Name, Capacity };
|
||||
|
||||
public:
|
||||
explicit HallsModel(QObject *parent, const QSqlDatabase &database);
|
||||
|
||||
// Initealize the model
|
||||
void initialize();
|
||||
|
||||
// Overlooking class BaseSqlTableModel methods
|
||||
|
||||
QVariant headerData(int section, Qt::Orientation orientation,
|
||||
int role = Qt::DisplayRole) const override;
|
||||
|
||||
inline bool isCompleteDatabaseFiltering() const final { return true; };
|
||||
};
|
||||
|
||||
#endif // HALLS_MODEL_H
|
||||
Reference in New Issue
Block a user