mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
7df7da70cb
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
69 lines
1.6 KiB
C++
69 lines
1.6 KiB
C++
#pragma once
|
|
|
|
#include "messages/message.hpp"
|
|
#include "messages/messageparseargs.hpp"
|
|
#include "messages/word.hpp"
|
|
#include "messages/wordpart.hpp"
|
|
|
|
#include <IrcMessage>
|
|
#include <QVector>
|
|
|
|
#include <chrono>
|
|
#include <memory>
|
|
|
|
namespace chatterino {
|
|
|
|
class Channel;
|
|
|
|
namespace messages {
|
|
class Message;
|
|
|
|
typedef std::shared_ptr<Message> SharedMessage;
|
|
|
|
class Message
|
|
{
|
|
public:
|
|
// explicit Message(const QString &text);
|
|
explicit Message(const QString &text, const std::vector<messages::Word> &words);
|
|
|
|
bool getCanHighlightTab() const;
|
|
const QString &getTimeoutUser() const;
|
|
int getTimeoutCount() const;
|
|
const QString &getUserName() const;
|
|
const QString &getDisplayName() const;
|
|
const QString &getContent() const;
|
|
const std::chrono::time_point<std::chrono::system_clock> &getParseTime() const;
|
|
std::vector<Word> &getWords();
|
|
bool isDisabled() const;
|
|
const QString &getId() const;
|
|
|
|
const QString text;
|
|
|
|
private:
|
|
static LazyLoadedImage *badgeStaff;
|
|
static LazyLoadedImage *badgeAdmin;
|
|
static LazyLoadedImage *badgeGlobalmod;
|
|
static LazyLoadedImage *badgeModerator;
|
|
static LazyLoadedImage *badgeTurbo;
|
|
static LazyLoadedImage *badgeBroadcaster;
|
|
static LazyLoadedImage *badgePremium;
|
|
|
|
static QRegularExpression *cheerRegex;
|
|
|
|
bool highlightTab = false;
|
|
QString timeoutUser = "";
|
|
int timeoutCount = 0;
|
|
bool disabled = false;
|
|
std::chrono::time_point<std::chrono::system_clock> parseTime;
|
|
|
|
QString userName = "";
|
|
QString displayName = "";
|
|
QString content;
|
|
QString id = "";
|
|
|
|
std::vector<Word> words;
|
|
};
|
|
|
|
} // namespace messages
|
|
} // namespace chatterino
|