7#include "textautogeneratemessage.h"
8#include "core/textautogeneratemessageutils.h"
12using namespace TextAutogenerateText;
13TextAutoGenerateMessage::TextAutoGenerateMessage() =
default;
15TextAutoGenerateMessage::~TextAutoGenerateMessage() =
default;
19 d.
space() <<
"content:" << t.content();
20 d.
space() <<
"htmlGenerated:" << t.htmlGenerated();
21 d.
space() <<
"sender:" << t.sender();
22 d.
space() <<
"dateTime:" << t.dateTime();
23 d.
space() <<
"in progress:" << t.inProgress();
24 d.
space() <<
"uuid:" << t.uuid();
25 d.
space() <<
"answerUuid:" << t.answerUuid();
26 d.
space() <<
"topic:" << t.topic();
27 d.
space() <<
"mouseHover:" << t.mouseHover();
28 d.
space() <<
"archived:" << t.archived();
29 d.
space() <<
"editingMode:" << t.editingMode();
33QString TextAutoGenerateMessage::content()
const
38void TextAutoGenerateMessage::setContent(
const QString &newContent)
40 if (mContent != newContent) {
41 mContent = newContent;
42 mHtmlGenerated = TextAutoGenerateMessageUtils::convertTextToHtml(mContent);
46TextAutoGenerateMessage::Sender TextAutoGenerateMessage::sender()
const
51void TextAutoGenerateMessage::setSender(TextAutoGenerateMessage::Sender newSender)
56qint64 TextAutoGenerateMessage::dateTime()
const
61void TextAutoGenerateMessage::setDateTime(qint64 newDateTime)
63 mDateTime = newDateTime;
68bool TextAutoGenerateMessage::isValid()
const
70 return mSender != TextAutoGenerateMessage::Sender::Unknown;
73bool TextAutoGenerateMessage::inProgress()
const
78void TextAutoGenerateMessage::setInProgress(
bool newInProgress)
80 mInProgress = newInProgress;
85 return other.uuid() == mUuid && other.inProgress() == mInProgress && other.sender() == mSender && other.dateTime() == mDateTime
86 && other.content() == mContent && other.answerUuid() == mAnswerUuid && other.topic() == mTopic && other.mArchived == mArchived
87 && other.editingMode() == mEditingMode;
90QByteArray TextAutoGenerateMessage::uuid()
const
95void TextAutoGenerateMessage::setUuid(
const QByteArray &newUuid)
100QString TextAutoGenerateMessage::htmlGenerated()
const
102 return mHtmlGenerated;
105QByteArray TextAutoGenerateMessage::answerUuid()
const
110void TextAutoGenerateMessage::setAnswerUuid(
const QByteArray &newAnswerUuid)
112 mAnswerUuid = newAnswerUuid;
115QString TextAutoGenerateMessage::topic()
const
120void TextAutoGenerateMessage::setTopic(
const QString &newTopic)
125QString TextAutoGenerateMessage::dateTimeStr()
const
130bool TextAutoGenerateMessage::mouseHover()
const
135void TextAutoGenerateMessage::setMouseHover(
bool newMouseHover)
137 mMouseHover = newMouseHover;
140bool TextAutoGenerateMessage::archived()
const
145void TextAutoGenerateMessage::setArchived(
bool newArchived)
147 mArchived = newArchived;
150bool TextAutoGenerateMessage::editingMode()
const
155void TextAutoGenerateMessage::setEditingMode(
bool newEditingMode)
157 mEditingMode = newEditingMode;
160#include "moc_textautogeneratemessage.cpp"
The TextAutoGenerateMessage class.
QDateTime fromSecsSinceEpoch(qint64 secs)
QString toString(QDate date, FormatType format) const const