aboutsummaryrefslogtreecommitdiff
path: root/chat.h
diff options
context:
space:
mode:
authorlink2xt <link2xt@testrun.org>2020-09-12 14:10:13 +0300
committerlink2xt <link2xt@testrun.org>2020-10-03 00:20:03 +0300
commitb8762ddb38dd975b0acb217b793594dfed83a824 (patch)
tree23ccefbba703fed6c07acce82ff72e32ba77c9ba /chat.h
downloadkdeltachat-b8762ddb38dd975b0acb217b793594dfed83a824.tar.gz
kdeltachat-b8762ddb38dd975b0acb217b793594dfed83a824.zip
Initial commit
Diffstat (limited to 'chat.h')
-rw-r--r--chat.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/chat.h b/chat.h
new file mode 100644
index 0000000..1b45e14
--- /dev/null
+++ b/chat.h
@@ -0,0 +1,30 @@
+#pragma once
+
+#include <QObject>
+#include <QColor>
+
+#include <deltachat.h>
+
+class DcChat : public QObject {
+ Q_OBJECT
+ Q_PROPERTY(uint32_t id READ getId CONSTANT)
+ Q_PROPERTY(QString name READ getName CONSTANT);
+ Q_PROPERTY(bool canSend READ canSend CONSTANT)
+ Q_PROPERTY(bool muted READ isMuted CONSTANT)
+
+public:
+ explicit DcChat(QObject *parent = nullptr);
+ explicit DcChat(dc_chat_t *chat);
+ ~DcChat();
+
+ Q_INVOKABLE uint32_t getId();
+ Q_INVOKABLE int getType();
+ Q_INVOKABLE QString getName();
+ // Q_INVOKABLE QString getProfileImage();
+ Q_INVOKABLE QColor getColor();
+ Q_INVOKABLE bool canSend();
+ Q_INVOKABLE bool isMuted();
+
+private:
+ dc_chat_t *m_chat{nullptr};
+};