aboutsummaryrefslogtreecommitdiff
path: root/message.h
diff options
context:
space:
mode:
authorlink2xt <link2xt@testrun.org>2021-05-29 23:40:34 +0300
committerlink2xt <link2xt@testrun.org>2021-05-29 23:40:34 +0300
commit69ff191c83e5277cfe22d3735e9ac2f0256be3c5 (patch)
treea138c9a4b1914d9ef20e19d9f24401ee0179b984 /message.h
parent9c22c6d6a03f620f14f289b464354159b8a76f6b (diff)
downloadkdeltachat-69ff191c83e5277cfe22d3735e9ac2f0256be3c5.tar.gz
kdeltachat-69ff191c83e5277cfe22d3735e9ac2f0256be3c5.zip
Implement message drafts
Diffstat (limited to 'message.h')
-rw-r--r--message.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/message.h b/message.h
index 8f7ec9c..2ce81e2 100644
--- a/message.h
+++ b/message.h
@@ -4,6 +4,8 @@
#include <deltachat.h>
+class Context;
+
class DcMessage : public QObject {
Q_OBJECT
Q_PROPERTY(uint32_t id READ getId CONSTANT)
@@ -11,7 +13,7 @@ class DcMessage : public QObject {
Q_PROPERTY(uint32_t chatId READ getChatId CONSTANT)
Q_PROPERTY(int viewtype READ getViewtype CONSTANT)
Q_PROPERTY(int state READ getState CONSTANT)
- Q_PROPERTY(QString text READ getText CONSTANT)
+ Q_PROPERTY(QString text READ getText WRITE setText)
Q_PROPERTY(QString subject READ getSubject CONSTANT)
Q_PROPERTY(QString file READ getFile CONSTANT)
Q_PROPERTY(QString filename READ getFilename CONSTANT)
@@ -23,6 +25,8 @@ class DcMessage : public QObject {
Q_PROPERTY(bool hasHtml READ hasHtml CONSTANT)
dc_msg_t *m_message{nullptr};
+
+ friend class Context;
public:
explicit DcMessage(QObject *parent = nullptr);
explicit DcMessage(dc_msg_t *msg);
@@ -36,6 +40,7 @@ public:
//Q_INVOKABLE int64_t getTimestamp();
//Q_INVOKABLE int64_t getReceivedTimestamp();
//Q_INVOKABLE int64_t getSortTimestamp();
+ Q_INVOKABLE void setText(QString);
Q_INVOKABLE QString getText();
Q_INVOKABLE QString getSubject();
QString getFile();