mirror-chatterino2/src/messages/messagebuilder.hpp
Rasmus Karlsson 626002c8ff reformat code
2017-07-31 00:57:42 +02:00

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