mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
37 lines
674 B
C++
37 lines
674 B
C++
#pragma once
|
|
|
|
#include "messages/message.hpp"
|
|
|
|
#include <QRegularExpression>
|
|
|
|
#include <ctime>
|
|
|
|
namespace chatterino {
|
|
namespace messages {
|
|
|
|
class MessageBuilder
|
|
{
|
|
public:
|
|
MessageBuilder();
|
|
|
|
SharedMessage build();
|
|
|
|
void appendWord(const Word &word);
|
|
void appendTimestamp();
|
|
void appendTimestamp(std::time_t time);
|
|
void setHighlight(const bool &value);
|
|
|
|
QString matchLink(const QString &string);
|
|
QRegularExpression regex;
|
|
|
|
QString originalMessage;
|
|
|
|
private:
|
|
std::vector<Word> _words;
|
|
bool highlight = false;
|
|
std::chrono::time_point<std::chrono::system_clock> _parseTime;
|
|
};
|
|
|
|
} // namespace messages
|
|
} // namespace chatterino
|