00001 #ifndef USERMODEL_H
00002 #define USERMODEL_H
00003 
00004 #include "domainmodel.h"
00005 
00006 namespace domain
00007 {
00008 class User;
00009 }
00010 
00011 namespace control
00012 {
00013 
00014 class CONTROL_EXPORT UserModel : public DomainModel
00015 {
00016     public:
00017 
00018         enum Columns
00019         {
00020             Name,
00021             Type,
00022             LastColumn 
00023         };
00024 
00025         UserModel(domain::TaskManagerData* data);
00026 
00027         int columnCount(const QModelIndex& parent = QModelIndex()) const;
00028         int rowCount(const QModelIndex& parent = QModelIndex()) const;
00029         QVariant headerData(int section, Qt::Orientation orientation,
00030                             int role = Qt::DisplayRole) const;
00031         QVariant data(const QModelIndex& index,
00032                       int role = Qt::DisplayRole) const;
00033 
00034         const domain::User* userForIndex(const QModelIndex& index) const;
00035         QModelIndex indexForUser(const domain::User* user) const;
00036 
00037     private:
00038 
00039         
00040 };
00041 
00042 }
00043 
00044 #endif