]> ruin.nu Git - adress.git/blob - contact.h
Have fixed the saving..
[adress.git] / contact.h
1 #ifndef __contacth__
2 #define __contacth__
3
4 #include <qstring.h>
5 #include <algorithm>
6 #include <cctype>
7
8 class CContact
9 {
10 public:
11         CContact(QString &firstname, QString &lastname, QString &adress, QString &phonenumber);
12         ~CContact();
13
14         QString firstname();
15         QString lastname();
16         QString adress();
17         QString phoneNumber();
18         
19         bool search(int i, QString s);
20         void modify(int i, QString s);
21
22         //Static funktions
23         static CContact* getFirst();
24         static int getNum();
25
26         CContact* getNext();
27         CContact* getPrev();
28
29
30 protected:
31         QString strings[4];
32                                 
33         //Linked list
34         static CContact* first;
35         static int num;
36         CContact* next;
37         CContact* prev;
38         void sort();
39         void remove();
40 };
41 #endif