28 lines
619 B
C++
28 lines
619 B
C++
#ifndef GENRES_MODEL_H
|
|
#define GENRES_MODEL_H
|
|
|
|
#include "base_sql_table_model.h"
|
|
|
|
class GenresModel : public BaseSqlTableModel {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
// Enum for columns
|
|
enum GenresColumns { Id, Name };
|
|
|
|
public:
|
|
explicit GenresModel(QObject *parent, const QSqlDatabase &database);
|
|
|
|
// Initialize 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 // GENRES_MODEL_H
|