aboutsummaryrefslogtreecommitdiff
path: root/contact.h
diff options
context:
space:
mode:
Diffstat (limited to 'contact.h')
-rw-r--r--contact.h29
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};
+};