Chatterino
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
chatterino::MessageBuilder Class Reference

#include <MessageBuilder.hpp>

Inheritance diagram for chatterino::MessageBuilder:
[legend]
Collaboration diagram for chatterino::MessageBuilder:
[legend]

Public Member Functions

 MessageBuilder ()
 
 MessageBuilder (SystemMessageTag, const QString &text, const QTime &time=QTime::currentTime())
 
 MessageBuilder (TimeoutMessageTag, const QString &timeoutUser, const QString &sourceUser, const QString &systemMessageText, int times, const QTime &time=QTime::currentTime())
 
 MessageBuilder (TimeoutMessageTag, const QString &username, const QString &durationInSeconds, bool multipleTimes, const QTime &time=QTime::currentTime())
 
 MessageBuilder (const BanAction &action, uint32_t count=1)
 
 MessageBuilder (const UnbanAction &action)
 
 MessageBuilder (const AutomodUserAction &action)
 
 MessageBuilder (LiveUpdatesAddEmoteMessageTag, const QString &platform, const QString &actor, const std::vector< QString > &emoteNames)
 
 MessageBuilder (LiveUpdatesRemoveEmoteMessageTag, const QString &platform, const QString &actor, const std::vector< QString > &emoteNames)
 
 MessageBuilder (LiveUpdatesUpdateEmoteMessageTag, const QString &platform, const QString &actor, const QString &emoteName, const QString &oldEmoteName)
 
 MessageBuilder (LiveUpdatesUpdateEmoteSetMessageTag, const QString &platform, const QString &actor, const QString &emoteSetName)
 
virtual ~MessageBuilder ()=default
 
Messageoperator-> ()
 
Messagemessage ()
 
MessagePtr release ()
 
std::weak_ptr< MessageweakOf ()
 
void append (std::unique_ptr< MessageElement > element)
 
QString matchLink (const QString &string)
 
void addLink (const QString &origLink, const QString &matchedLink)
 
void addIrcMessageText (const QString &text)
 
template<typename T , typename... Args>
T * emplace (Args &&...args)
 

Protected Member Functions

virtual void addTextOrEmoji (EmotePtr emote)
 
virtual void addTextOrEmoji (const QString &value)
 

Protected Attributes

MessageColor textColor_ = MessageColor::Text
 

Constructor & Destructor Documentation

◆ MessageBuilder() [1/11]

chatterino::MessageBuilder::MessageBuilder ( )

◆ MessageBuilder() [2/11]

chatterino::MessageBuilder::MessageBuilder ( SystemMessageTag  ,
const QString &  text,
const QTime &  time = QTime::currentTime() 
)
Here is the call graph for this function:

◆ MessageBuilder() [3/11]

chatterino::MessageBuilder::MessageBuilder ( TimeoutMessageTag  ,
const QString &  timeoutUser,
const QString &  sourceUser,
const QString &  systemMessageText,
int  times,
const QTime &  time = QTime::currentTime() 
)
Here is the call graph for this function:

◆ MessageBuilder() [4/11]

chatterino::MessageBuilder::MessageBuilder ( TimeoutMessageTag  ,
const QString &  username,
const QString &  durationInSeconds,
bool  multipleTimes,
const QTime &  time = QTime::currentTime() 
)
Here is the call graph for this function:

◆ MessageBuilder() [5/11]

chatterino::MessageBuilder::MessageBuilder ( const BanAction action,
uint32_t  count = 1 
)
Here is the call graph for this function:

◆ MessageBuilder() [6/11]

chatterino::MessageBuilder::MessageBuilder ( const UnbanAction action)
Here is the call graph for this function:

◆ MessageBuilder() [7/11]

chatterino::MessageBuilder::MessageBuilder ( const AutomodUserAction action)
Here is the call graph for this function:

◆ MessageBuilder() [8/11]

chatterino::MessageBuilder::MessageBuilder ( LiveUpdatesAddEmoteMessageTag  ,
const QString &  platform,
const QString &  actor,
const std::vector< QString > &  emoteNames 
)
Here is the call graph for this function:

◆ MessageBuilder() [9/11]

chatterino::MessageBuilder::MessageBuilder ( LiveUpdatesRemoveEmoteMessageTag  ,
const QString &  platform,
const QString &  actor,
const std::vector< QString > &  emoteNames 
)
Here is the call graph for this function:

◆ MessageBuilder() [10/11]

chatterino::MessageBuilder::MessageBuilder ( LiveUpdatesUpdateEmoteMessageTag  ,
const QString &  platform,
const QString &  actor,
const QString &  emoteName,
const QString &  oldEmoteName 
)
Here is the call graph for this function:

◆ MessageBuilder() [11/11]

chatterino::MessageBuilder::MessageBuilder ( LiveUpdatesUpdateEmoteSetMessageTag  ,
const QString &  platform,
const QString &  actor,
const QString &  emoteSetName 
)
Here is the call graph for this function:

◆ ~MessageBuilder()

virtual chatterino::MessageBuilder::~MessageBuilder ( )
virtualdefault

Member Function Documentation

◆ addIrcMessageText()

void chatterino::MessageBuilder::addIrcMessageText ( const QString &  text)

Adds the text, applies irc colors, adds links, and updates the message's messageText. See https://modern.ircdocs.horse/formatting.html

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addLink()

void chatterino::MessageBuilder::addLink ( const QString &  origLink,
const QString &  matchedLink 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addTextOrEmoji() [1/2]

void chatterino::MessageBuilder::addTextOrEmoji ( EmotePtr  emote)
protectedvirtual
Here is the caller graph for this function:

◆ addTextOrEmoji() [2/2]

void chatterino::MessageBuilder::addTextOrEmoji ( const QString &  value)
protectedvirtual
Here is the call graph for this function:

◆ append()

void chatterino::MessageBuilder::append ( std::unique_ptr< MessageElement element)
Here is the call graph for this function:

◆ emplace()

template<typename T , typename... Args>
T* chatterino::MessageBuilder::emplace ( Args &&...  args)
inline
Here is the caller graph for this function:

◆ matchLink()

QString chatterino::MessageBuilder::matchLink ( const QString &  string)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ message()

Message & chatterino::MessageBuilder::message ( )
Here is the caller graph for this function:

◆ operator->()

Message * chatterino::MessageBuilder::operator-> ( )

◆ release()

MessagePtr chatterino::MessageBuilder::release ( )
Here is the caller graph for this function:

◆ weakOf()

std::weak_ptr< Message > chatterino::MessageBuilder::weakOf ( )
Here is the caller graph for this function:

Member Data Documentation

◆ textColor_

MessageColor chatterino::MessageBuilder::textColor_ = MessageColor::Text
protected

The documentation for this class was generated from the following files: