diff options
author | link2xt <link2xt@testrun.org> | 2020-09-12 14:10:13 +0300 |
---|---|---|
committer | link2xt <link2xt@testrun.org> | 2020-10-03 00:20:03 +0300 |
commit | b8762ddb38dd975b0acb217b793594dfed83a824 (patch) | |
tree | 23ccefbba703fed6c07acce82ff72e32ba77c9ba /contact.h | |
download | kdeltachat-b8762ddb38dd975b0acb217b793594dfed83a824.tar.gz kdeltachat-b8762ddb38dd975b0acb217b793594dfed83a824.zip |
Initial commit
Diffstat (limited to 'contact.h')
-rw-r--r-- | contact.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/contact.h b/contact.h new file mode 100644 index 0000000..e309b43 --- /dev/null +++ b/contact.h @@ -0,0 +1,29 @@ +#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(); + QColor getColor(); + +private: + dc_contact_t *m_contact{nullptr}; +}; |