mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
03958420be
Changed the login name in autocompletion to the display name Autocompletion model is now only updated on the "first completion"
70 lines
1.6 KiB
C++
70 lines
1.6 KiB
C++
#pragma once
|
|
|
|
#include "messages/word.hpp"
|
|
|
|
#include <chrono>
|
|
#include <memory>
|
|
#include <vector>
|
|
|
|
namespace chatterino {
|
|
|
|
class Channel;
|
|
|
|
namespace messages {
|
|
class Message;
|
|
|
|
typedef std::shared_ptr<Message> SharedMessage;
|
|
|
|
class Message
|
|
{
|
|
public:
|
|
bool getCanHighlightTab() const;
|
|
void setHighlight(bool value);
|
|
const QString &getTimeoutUser() const;
|
|
int getTimeoutCount() 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;
|
|
|
|
QString loginName;
|
|
QString displayName;
|
|
QString localizedName;
|
|
|
|
const QString text;
|
|
bool centered = false;
|
|
|
|
static Message *createSystemMessage(const QString &text);
|
|
|
|
static Message *createTimeoutMessage(const QString &username, const QString &durationInSeconds,
|
|
const QString &reason);
|
|
|
|
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;
|
|
|
|
// what is highlightTab?
|
|
bool highlightTab = false;
|
|
|
|
QString timeoutUser = "";
|
|
int timeoutCount = 0;
|
|
bool disabled = false;
|
|
std::chrono::time_point<std::chrono::system_clock> parseTime;
|
|
|
|
QString content;
|
|
QString id = "";
|
|
|
|
std::vector<Word> words;
|
|
};
|
|
|
|
} // namespace messages
|
|
} // namespace chatterino
|