-
Notifications
You must be signed in to change notification settings - Fork 0
/
contacts.h
97 lines (81 loc) · 2.41 KB
/
contacts.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#ifndef CONTACTS_H
#define CONTACTS_H
#include "jsonintrepeter.h"
#include <QVector>
#include <QWidget>
#include <QPushButton>
#include <QListWidget>
class Contacts
{
public:
Contacts() {}
static QStringList getQueriedContacts();
static QVector<Contacts> queriedContacts;
QString getID() {return mID;}
QString getFirstName() {return mFirstName;}
QString getLastName() {return mLastName;}
QString getName() {return mFirstName + " " + mLastName;}
QString getAddress() {return mAddress;}
QString getZipCode() {return mZipCode;}
QString getCity() {return mCity;}
QString getPhone() {return mPhone;}
QString getEmail() {return mEmail;}
bool getSepaActive() {return mSepaActive;}
QString getIban() {return mIban;}
QString getBIC() {return mBIC;}
QString getMandateID() {return mMandateID;}
QString getMandateDate() {return mMandateDate;}
void setID(QString id) {mID = id;}
void setFirstName(QString firstName) {mFirstName = firstName;}
void setLastName(QString lastName) {mLastName = lastName;}
void setAddress(QString address) {mAddress = address;}
void setZipCode(QString zipcode) {mZipCode = zipcode;}
void setCity(QString city) {mCity = city;}
void setPhone(QString phone) {mPhone = phone;}
void setEmail(QString email) {mEmail = email;}
void setSepaActive(bool sepaActive) {mSepaActive = sepaActive;}
void setIban(QString iban) {mIban = iban;}
void setBic(QString bic) {mBIC = bic;}
void setMandateID(QString mandateID) {mMandateID = mandateID;}
void setMandateDate(QString date) {mMandateDate = date;}
private:
QString mID = "";
QString mFirstName = "";
QString mLastName = "";
QString mAddress = "";
QString mZipCode = "";
QString mCity = "";
QString mPhone = "";
QString mDeliveryMethod = "Manual";
QString mEmail = "";
bool mEmailUBL = false;
bool mSepaActive = false;
QString mIban = "";
QString mBIC = "";
QString mMandateID = "";
QString mMandateDate = "";
};
class GetQueryContacts : public JSONIntrepeter
{
Q_OBJECT
public:
GetQueryContacts(QString query);
~GetQueryContacts();
void receiveParsedReply(QJsonDocument);
signals:
void queriedContactsReceived();
};
class ShowNameList : public QWidget
{
Q_OBJECT
public:
ShowNameList();
private:
QListWidget *list;
QPushButton *button;
public slots:
void on_select_pressed();
signals:
void contactChosen(int index);
};
#endif // CONTACTS_H