aboutsummaryrefslogtreecommitdiff
path: root/contact.h
blob: 82a6e00e5013b2a670dc4e0be071dab47415d206 (plain) (blame)
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
#pragma once

#include <QObject>
#include <QColor>

#include <deltachat.h>

class DcContact : public QObject {
    Q_OBJECT
    Q_PROPERTY(uint32_t id READ getId CONSTANT)
    Q_PROPERTY(QString addr READ getAddr CONSTANT)
    Q_PROPERTY(QString name READ getName CONSTANT)
    Q_PROPERTY(QString displayName READ getDisplayName CONSTANT)
    Q_PROPERTY(QColor color READ getColor CONSTANT)

public:
    explicit DcContact(QObject *parent = nullptr);
    explicit DcContact(dc_contact_t *contact);
    ~DcContact();

    uint32_t getId();
    QString getAddr();
    QString getName();
    QString getDisplayName();
    Q_INVOKABLE QString getProfileImage();
    QColor getColor();

private:
    dc_contact_t *m_contact{nullptr};
};