28 lines
618 B
C++
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
|