1 #ifndef CUSTOMERSTABLEMODEL_H
2 #define CUSTOMERSTABLEMODEL_H
4 #include <QAbstractTableModel>
6 #include "models/customer.h"
9 using namespace Models;
10 using namespace Utils;
37 int rowCount(
const QModelIndex &)
const;
43 int columnCount(
const QModelIndex &)
const;
51 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const;
60 QVariant headerData(
int section,
61 Qt::Orientation orientation,
62 int role = Qt::DisplayRole)
const;
71 bool setData(
const QModelIndex & index,
const QVariant & value,
72 int role = Qt::EditRole);
78 void append(
const Customer &customer);
84 void remove(
const int i);
91 Qt::ItemFlags flags(
const QModelIndex & index)
const ;
103 QList<Customer> getCustomers()
const;
106 QList<Customer> _customers;
111 #endif // CUSTOMERSTABLEMODEL_H
The Customer class Customer.
Definition: customer.h:15