diff options
author | link2xt <link2xt@testrun.org> | 2021-05-29 23:40:34 +0300 |
---|---|---|
committer | link2xt <link2xt@testrun.org> | 2021-05-29 23:40:34 +0300 |
commit | 69ff191c83e5277cfe22d3735e9ac2f0256be3c5 (patch) | |
tree | a138c9a4b1914d9ef20e19d9f24401ee0179b984 /message.h | |
parent | 9c22c6d6a03f620f14f289b464354159b8a76f6b (diff) | |
download | kdeltachat-69ff191c83e5277cfe22d3735e9ac2f0256be3c5.tar.gz kdeltachat-69ff191c83e5277cfe22d3735e9ac2f0256be3c5.zip |
Implement message drafts
Diffstat (limited to 'message.h')
-rw-r--r-- | message.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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(); |