-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontactmodel.h
40 lines (27 loc) · 954 Bytes
/
contactmodel.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
#ifndef CONTACTMODEL_H
#define CONTACTMODEL_H
#include <QObject>
class ContactModel : public QObject
{
Q_OBJECT
Q_PROPERTY(QString fullName READ fullName WRITE setFullName NOTIFY fullNameChanged)
Q_PROPERTY(QString phoneNumber READ phoneNumber WRITE setPhoneNumber NOTIFY phoneNumberChanged)
Q_PROPERTY(QString userImage READ userImage WRITE setUserImage NOTIFY userImageChanged)
QString m_fullName;
QString m_phoneNumber;
QString m_userImage;
public:
explicit ContactModel(QObject *parent = 0);
QString fullName() const;
QString phoneNumber() const;
QString userImage() const;
signals:
void fullNameChanged(QString fullName);
void phoneNumberChanged(QString phoneNumber);
void userImageChanged(QString userImage);
public slots:
void setFullName(QString fullName);
void setPhoneNumber(QString phoneNumber);
void setUserImage(QString userImage);
};
#endif // CONTACTMODEL_H