Masterctrl/Sources/ContactRepository.h
J-F Martel 2139293944 Dev...
2016-02-29 07:42:20 -05:00

28 lines
618 B
C++

#ifndef CCONTACTREPOSITORY_H
#define CCONTACTREPOSITORY_H
#include "Contact.h"
#include <QList>
class CContactRepository
{
public:
CContactRepository();
int LoadContacts();
int SaveContacts();
int AddContact(CContact Contact);
int ChangeContact(int index, CContact Contact);
QList<CContact> *GetContacts(){return &mContactsList;}
int GetContact(int index, CContact &Contact);
CContact *GetContactPtr(int index);
int DeleteContact(int index);
int GetContactCount(){return mContactsList.size();}
private:
QList<CContact> mContactsList;
};
#endif // CCONTACTREPOSITORY_H