From 6d2fc32a423b7b470521c67d94d9b59c168a948f Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 28 Aug 2021 12:03:48 +0000 Subject: Show message timestamps --- message.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'message.h') diff --git a/message.h b/message.h index 2ce81e2..d70703d 100644 --- a/message.h +++ b/message.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include @@ -13,6 +14,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(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) @@ -37,7 +39,7 @@ public: Q_INVOKABLE uint32_t getChatId(); Q_INVOKABLE int getViewtype(); Q_INVOKABLE int getState(); - //Q_INVOKABLE int64_t getTimestamp(); + Q_INVOKABLE QDateTime getTimestamp(); //Q_INVOKABLE int64_t getReceivedTimestamp(); //Q_INVOKABLE int64_t getSortTimestamp(); Q_INVOKABLE void setText(QString); -- cgit v1.2.3-70-g09d2