aboutsummaryrefslogtreecommitdiff
path: root/message.h
diff options
context:
space:
mode:
authorlink2xt <link2xt@testrun.org>1970-01-01 00:00:00 +0000
committerlink2xt <link2xt@testrun.org>1970-01-01 00:00:00 +0000
commit021d00d9d9148be3c5969ac7834403c695f9258d (patch)
tree7f3da0eeeb9b7f56b333af0fca5dd2a4795322b9 /message.h
parentd4c66cd1341084b37dfabe3126d13ff8f062fd59 (diff)
downloadkdeltachat-021d00d9d9148be3c5969ac7834403c695f9258d.tar.gz
kdeltachat-021d00d9d9148be3c5969ac7834403c695f9258d.zip
Add Message.setFile method
This allows setting file from JavaScript, so C++ remains a thin wrapper to Delta Chat core API. sendMessage only calls dc_send_msg, and all the attachment logic goes to the JavaScript code.
Diffstat (limited to 'message.h')
-rw-r--r--message.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/message.h b/message.h
index 8930f02..217bba4 100644
--- a/message.h
+++ b/message.h
@@ -17,7 +17,7 @@ class DcMessage : public QObject {
Q_PROPERTY(QDateTime timestamp READ getTimestamp 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 file READ getFile WRITE setFile)
Q_PROPERTY(QString filename READ getFilename CONSTANT)
Q_PROPERTY(int width READ getWidth CONSTANT)
Q_PROPERTY(int height READ getHeight CONSTANT)
@@ -45,6 +45,7 @@ public:
//Q_INVOKABLE int64_t getReceivedTimestamp();
//Q_INVOKABLE int64_t getSortTimestamp();
Q_INVOKABLE void setText(QString);
+ Q_INVOKABLE void setFile(QString);
Q_INVOKABLE QString getText();
Q_INVOKABLE QString getSubject();
QString getFile();