-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontactmodel.cpp
More file actions
47 lines (39 loc) · 848 Bytes
/
contactmodel.cpp
File metadata and controls
47 lines (39 loc) · 848 Bytes
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
#include "contactmodel.h"
ContactModel::ContactModel(QObject *parent) : QObject(parent)
{
}
//GETTER
QString ContactModel::fullName() const
{
return m_fullName;
}
QString ContactModel::phoneNumber() const
{
return m_phoneNumber;
}
QString ContactModel::userImage() const
{
return m_userImage;
}
//SETTER
void ContactModel::setFullName(QString fullName)
{
if (m_fullName == fullName)
return;
m_fullName = fullName;
emit fullNameChanged(fullName);
}
void ContactModel::setPhoneNumber(QString phoneNumber)
{
if (m_phoneNumber == phoneNumber)
return;
m_phoneNumber = phoneNumber;
emit phoneNumberChanged(phoneNumber);
}
void ContactModel::setUserImage(QString userImage)
{
if (m_userImage == userImage)
return;
m_userImage = userImage;
emit userImageChanged(userImage);
}