From 166d17e61da080ee7b83317b1a97ec2046960706 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 22 May 2021 15:23:11 +0300 Subject: Implement libdeltachat API for HTML view HTML API: - Context::getMessageHtml() - DcMessage::getSubject() - DcMessage::hasHtml() Also implemented: - DcMessage::getFilemime() - DcMessage::getShowPadlock() - DcMessage::getError() --- message.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'message.h') diff --git a/message.h b/message.h index d9f4253..8f7ec9c 100644 --- a/message.h +++ b/message.h @@ -12,6 +12,7 @@ class DcMessage : public QObject { Q_PROPERTY(int viewtype READ getViewtype CONSTANT) Q_PROPERTY(int state READ getState CONSTANT) Q_PROPERTY(QString text READ getText CONSTANT) + Q_PROPERTY(QString subject READ getSubject CONSTANT) Q_PROPERTY(QString file READ getFile CONSTANT) Q_PROPERTY(QString filename READ getFilename CONSTANT) Q_PROPERTY(int width READ getWidth CONSTANT) @@ -19,6 +20,7 @@ class DcMessage : public QObject { Q_PROPERTY(bool isInfo READ isInfo CONSTANT) Q_PROPERTY(QString quotedText READ getQuotedText CONSTANT) Q_PROPERTY(DcMessage *quotedMessage READ getQuotedMessage CONSTANT) + Q_PROPERTY(bool hasHtml READ hasHtml CONSTANT) dc_msg_t *m_message{nullptr}; public: @@ -35,14 +37,15 @@ public: //Q_INVOKABLE int64_t getReceivedTimestamp(); //Q_INVOKABLE int64_t getSortTimestamp(); Q_INVOKABLE QString getText(); + Q_INVOKABLE QString getSubject(); QString getFile(); QString getFilename(); - //QString getFilemime(); + QString getFilemime(); //uint64_t getFilebytes(); int getWidth(); int getHeight(); //int getDuration(); - //bool showPadlock(); + bool getShowPadlock(); //uint32_t getEphemeralTimer(); //int64_t getEphemeralTimestamp(); //... getsummary ... @@ -53,6 +56,8 @@ public: //isStarred //isForwarded bool isInfo(); + Q_INVOKABLE QString getError(); + bool hasHtml(); //isIncreation //isSetupmessage Q_INVOKABLE QString getQuotedText(); -- cgit v1.2.3-70-g09d2