mirror-chatterino2/src/messages/message.cpp
Rasmus Karlsson 7df7da70cb A lot of changes
Remove unused constructor of messages::Message
Fixed LimitedQueueSnapshot _-prefixes
Changed LimitedQueueSnapshot's usage of int to std::size_t
ColorScheme is no longer a singleton
Created a "BaseWidget" class which is pretty much a QWidget except it
has a reference of ColorScheme since most widgets will need a reference
to the style they should use.
BaseWidget can be implemented either with a BaseWidget parent (which
will copy the ColorScheme reference from the parent) or with a
normal QWidget parent and an explicit ColorScheme reference.
Save main window geometry on close
Fix font changing in the Settings Dialog
Update settings library version
2017-06-26 19:53:31 +02:00

90 lines
1.5 KiB
C++

#include "messages/message.hpp"
#include "channel.hpp"
#include "colorscheme.hpp"
#include "emojis.hpp"
#include "emotemanager.hpp"
#include "fontmanager.hpp"
#include "ircmanager.hpp"
#include "messages/link.hpp"
#include "resources.hpp"
#include "settingsmanager.hpp"
#include <QColor>
#include <QObjectUserData>
#include <QStringList>
#include <ctime>
#include <list>
#include <tuple>
namespace chatterino {
namespace messages {
/*
Message::Message(const QString &text)
: text(text)
{
this->words.push_back(
Word(text, Word::Text, ColorScheme::getInstance().SystemMessageColor, text, QString()));
}
*/
Message::Message(const QString &text, const std::vector<Word> &words)
: text(text)
, words(words)
{
}
bool Message::getCanHighlightTab() const
{
return this->highlightTab;
}
const QString &Message::getTimeoutUser() const
{
return this->timeoutUser;
}
int Message::getTimeoutCount() const
{
return this->timeoutCount;
}
const QString &Message::getUserName() const
{
return this->userName;
}
const QString &Message::getDisplayName() const
{
return this->displayName;
}
const QString &Message::getContent() const
{
return this->content;
}
const std::chrono::time_point<std::chrono::system_clock> &Message::getParseTime() const
{
return this->parseTime;
}
std::vector<Word> &Message::getWords()
{
return this->words;
}
bool Message::isDisabled() const
{
return this->disabled;
}
const QString &Message::getId() const
{
return this->id;
}
} // namespace messages
} // namespace chatterino