Aller à la documentation de ce fichier.00001 #ifndef USERSTABLEMODEL_H
00002 #define USERSTABLEMODEL_H
00003
00004 #include <QAbstractTableModel>
00005
00006 #include "../../modele/user.h"
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 class UsersTableModel : public QAbstractTableModel
00025 {
00026 Q_OBJECT
00027 public:
00028 explicit UsersTableModel(QObject *parent = 0);
00029 UsersTableModel(QList< User >* listUsers, QObject *parent=0);
00030 ~UsersTableModel();
00031
00032 int rowCount(const QModelIndex &parent) const;
00033 int columnCount(const QModelIndex &parent) const;
00034 QVariant data(const QModelIndex &index, int role) const;
00035 QVariant headerData(int section, Qt::Orientation orientation, int role) const;
00036 Qt::ItemFlags flags(const QModelIndex &index) const;
00037 bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole);
00038 bool insertRows(int position, int rows, const QModelIndex &index=QModelIndex());
00039 bool removeRows(int position, int rows, const QModelIndex &index=QModelIndex());
00040 int ligneId(int row);
00041 User userLigne(int row);
00042 QList< User >* getList();
00043
00044 private:
00045 QList< User >* listUsers;
00046
00047 };
00048
00049 #endif // USERSTABLEMODEL_H