7#include "textautogeneratemessage.h"
9using namespace TextAutogenerateText;
10TextAutoGenerateMessage::TextAutoGenerateMessage() =
default;
12TextAutoGenerateMessage::~TextAutoGenerateMessage() =
default;
14QDebug operator<<(
QDebug d,
const TextAutogenerateText::TextAutoGenerateMessage &t)
16 d.
space() <<
"content:" << t.content();
17 d.
space() <<
"htmlGenerated:" << t.htmlGenerated();
18 d.
space() <<
"sender:" << t.sender();
19 d.
space() <<
"dateTime:" << t.dateTime();
20 d.
space() <<
"in progress:" << t.inProgress();
21 d.
space() <<
"uuid:" << t.uuid();
22 d.
space() <<
"answerUuid:" << t.answerUuid();
26QString TextAutoGenerateMessage::content()
const
31void TextAutoGenerateMessage::setContent(
const QString &newContent)
33 if (mContent != newContent) {
34 mContent = newContent;
40TextAutoGenerateMessage::Sender TextAutoGenerateMessage::sender()
const
45void TextAutoGenerateMessage::setSender(TextAutoGenerateMessage::Sender newSender)
50qint64 TextAutoGenerateMessage::dateTime()
const
55void TextAutoGenerateMessage::setDateTime(qint64 newDateTime)
57 mDateTime = newDateTime;
60bool TextAutoGenerateMessage::isValid()
const
62 return mSender != TextAutoGenerateMessage::Sender::Unknown;
65bool TextAutoGenerateMessage::inProgress()
const
70void TextAutoGenerateMessage::setInProgress(
bool newInProgress)
72 mInProgress = newInProgress;
75bool TextAutoGenerateMessage::operator==(
const TextAutoGenerateMessage &other)
const
77 return other.uuid() == mUuid && other.inProgress() == mInProgress && other.sender() == mSender && other.dateTime() == mDateTime
78 && other.content() == mContent && other.answerUuid() == mAnswerUuid;
81QByteArray TextAutoGenerateMessage::uuid()
const
86void TextAutoGenerateMessage::setUuid(
const QByteArray &newUuid)
91QString TextAutoGenerateMessage::htmlGenerated()
const
93 return mHtmlGenerated;
96QByteArray TextAutoGenerateMessage::answerUuid()
const
101void TextAutoGenerateMessage::setAnswerUuid(
const QByteArray &newAnswerUuid)
103 mAnswerUuid = newAnswerUuid;
106#include "moc_textautogeneratemessage.cpp"
KCOREADDONS_EXPORT QString convertToHtml(const QString &plainText, const KTextToHTML::Options &options, int maxUrlLen=4096, int maxAddressLen=255)