Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
MessageLogWidget Class Reference

#include <message_log_widget.h>

Inheritance diagram for MessageLogWidget:
[legend]
Collaboration diagram for MessageLogWidget:
[legend]

Public Slots

void containerProcessingDone ()
void containerProcessingStarted (const GameEventContext &context)
void logAlwaysRevealTopCard (Player *player, CardZoneLogic *zone, bool reveal)
void logAlwaysLookAtTopCard (Player *player, CardZoneLogic *zone, bool reveal)
void logAttachCard (Player *player, QString cardName, Player *targetPlayer, QString targetCardName)
void logConcede (int playerId)
void logUnconcede (int playerId)
void logConnectionStateChanged (Player *player, bool connectionState)
void logCreateArrow (Player *player, Player *startPlayer, QString startCard, Player *targetPlayer, QString targetCard, bool playerTarget)
void logCreateToken (Player *player, QString cardName, QString pt, bool faceDown)
void logDeckSelect (Player *player, QString deckHash, int sideboardSize)
void logDestroyCard (Player *player, QString cardName)
void logDrawCards (Player *player, int number, bool deckIsEmpty)
void logDumpZone (Player *player, CardZoneLogic *zone, int numberCards, bool isReversed=false)
void logFlipCard (Player *player, QString cardName, bool faceDown)
void logGameClosed ()
void logGameStart ()
void logGameFlooded ()
void logJoin (Player *player)
void logJoinSpectator (QString name)
void logKicked ()
void logLeave (Player *player, QString reason)
void logLeaveSpectator (QString name, QString reason)
void logNotReadyStart (Player *player)
void logMoveCard (Player *player, CardItem *card, CardZoneLogic *startZone, int oldX, CardZoneLogic *targetZone, int newX)
void logMulligan (Player *player, int number)
void logReplayStarted (int gameId)
void logReadyStart (Player *player)
void logRevealCards (Player *player, CardZoneLogic *zone, int cardId, QString cardName, Player *otherPlayer, bool faceDown, int amount, bool isLentToAnotherPlayer)
void logReverseTurn (Player *player, bool reversed)
void logRollDie (Player *player, int sides, const QList< uint > &rolls)
void logSay (Player *player, QString message)
void logSetActivePhase (int phase)
void logSetActivePlayer (Player *player)
void logSetAnnotation (Player *player, CardItem *card, QString newAnnotation)
void logSetCardCounter (Player *player, QString cardName, int counterId, int value, int oldValue)
void logSetCounter (Player *player, QString counterName, int value, int oldValue)
void logSetDoesntUntap (Player *player, CardItem *card, bool doesntUntap)
void logSetPT (Player *player, CardItem *card, QString newPT)
void logSetSideboardLock (Player *player, bool locked)
void logSetTapped (Player *player, CardItem *card, bool tapped)
void logShuffle (Player *player, CardZoneLogic *zone, int start, int end)
void logSpectatorSay (const ServerInfo_User &spectator, QString message)
void logUnattachCard (Player *player, QString cardName)
void logUndoDraw (Player *player, QString cardName)
void setContextJudgeName (QString player)
void appendHtmlServerMessage (const QString &html, bool optionalIsBold=false, QString optionalFontColor=QString()) override

Public Member Functions

void connectToPlayerEventHandler (PlayerEventHandler *player)
 MessageLogWidget (TabSupervisor *_tabSupervisor, AbstractGame *_game, QWidget *parent=nullptr)
Public Member Functions inherited from ChatView
 ChatView (TabSupervisor *_tabSupervisor, AbstractGame *_game, bool _showTimestamps, QWidget *parent=nullptr)
void retranslateUi ()
void appendHtml (const QString &html)
virtual void appendHtmlServerMessage (const QString &html, bool optionalIsBold=false, QString optionalFontColor=QString())
void appendMessage (QString message, RoomMessageTypeFlags messageType={}, const ServerInfo_User &userInfo={}, bool playerBold=false)
void clearChat ()
void redactMessages (const QString &userName, int amount)

Private Types

enum  MessageContext { MessageContext_None , MessageContext_MoveCard , MessageContext_Mulligan }

Static Private Member Functions

static QPair< QString, QString > getFromStr (CardZoneLogic *zone, QString cardName, int position, bool ownerChange)

Private Attributes

MessageContext currentContext
QString messagePrefix
QString messageSuffix

Additional Inherited Members

Signals inherited from ChatView
void openMessageDialog (const QString &userName, bool focus)
void cardNameHovered (QString cardName)
void showCardInfoPopup (const QPoint &pos, const CardRef &cardRef)
void deleteCardInfoPopup (QString cardName)
void addMentionTag (QString mentionTag)
void messageClickedSignal ()
void showMentionPopup (const QString &userName)
Protected Member Functions inherited from ChatView
void enterEvent (QEnterEvent *event) override
void leaveEvent (QEvent *event) override
void mouseMoveEvent (QMouseEvent *event) override
void mousePressEvent (QMouseEvent *event) override
void mouseReleaseEvent (QMouseEvent *event) override
Protected Attributes inherited from ChatView
TabSupervisor *const tabSupervisor
AbstractGame *const game

Member Enumeration Documentation

◆ MessageContext

Enumerator
MessageContext_None 
MessageContext_MoveCard 
MessageContext_Mulligan 

Constructor & Destructor Documentation

◆ MessageLogWidget()

MessageLogWidget::MessageLogWidget ( TabSupervisor * _tabSupervisor,
AbstractGame * _game,
QWidget * parent = nullptr )
Here is the call graph for this function:

Member Function Documentation

◆ appendHtmlServerMessage

void MessageLogWidget::appendHtmlServerMessage ( const QString & html,
bool optionalIsBold = false,
QString optionalFontColor = QString() )
overrideslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ connectToPlayerEventHandler()

void MessageLogWidget::connectToPlayerEventHandler ( PlayerEventHandler * player)
Here is the call graph for this function:

◆ containerProcessingDone

void MessageLogWidget::containerProcessingDone ( )
slot
Here is the caller graph for this function:

◆ containerProcessingStarted

void MessageLogWidget::containerProcessingStarted ( const GameEventContext & context)
slot
Here is the caller graph for this function:

◆ getFromStr()

QPair< QString, QString > MessageLogWidget::getFromStr ( CardZoneLogic * zone,
QString cardName,
int position,
bool ownerChange )
staticprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logAlwaysLookAtTopCard

void MessageLogWidget::logAlwaysLookAtTopCard ( Player * player,
CardZoneLogic * zone,
bool reveal )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logAlwaysRevealTopCard

void MessageLogWidget::logAlwaysRevealTopCard ( Player * player,
CardZoneLogic * zone,
bool reveal )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logAttachCard

void MessageLogWidget::logAttachCard ( Player * player,
QString cardName,
Player * targetPlayer,
QString targetCardName )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logConcede

void MessageLogWidget::logConcede ( int playerId)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logConnectionStateChanged

void MessageLogWidget::logConnectionStateChanged ( Player * player,
bool connectionState )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logCreateArrow

void MessageLogWidget::logCreateArrow ( Player * player,
Player * startPlayer,
QString startCard,
Player * targetPlayer,
QString targetCard,
bool playerTarget )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logCreateToken

void MessageLogWidget::logCreateToken ( Player * player,
QString cardName,
QString pt,
bool faceDown )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logDeckSelect

void MessageLogWidget::logDeckSelect ( Player * player,
QString deckHash,
int sideboardSize )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logDestroyCard

void MessageLogWidget::logDestroyCard ( Player * player,
QString cardName )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logDrawCards

void MessageLogWidget::logDrawCards ( Player * player,
int number,
bool deckIsEmpty )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logDumpZone

void MessageLogWidget::logDumpZone ( Player * player,
CardZoneLogic * zone,
int numberCards,
bool isReversed = false )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logFlipCard

void MessageLogWidget::logFlipCard ( Player * player,
QString cardName,
bool faceDown )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logGameClosed

void MessageLogWidget::logGameClosed ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logGameFlooded

void MessageLogWidget::logGameFlooded ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logGameStart

void MessageLogWidget::logGameStart ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logJoin

void MessageLogWidget::logJoin ( Player * player)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logJoinSpectator

void MessageLogWidget::logJoinSpectator ( QString name)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logKicked

void MessageLogWidget::logKicked ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logLeave

void MessageLogWidget::logLeave ( Player * player,
QString reason )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logLeaveSpectator

void MessageLogWidget::logLeaveSpectator ( QString name,
QString reason )
slot
Here is the call graph for this function:

◆ logMoveCard

void MessageLogWidget::logMoveCard ( Player * player,
CardItem * card,
CardZoneLogic * startZone,
int oldX,
CardZoneLogic * targetZone,
int newX )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logMulligan

void MessageLogWidget::logMulligan ( Player * player,
int number )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logNotReadyStart

void MessageLogWidget::logNotReadyStart ( Player * player)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logReadyStart

void MessageLogWidget::logReadyStart ( Player * player)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logReplayStarted

void MessageLogWidget::logReplayStarted ( int gameId)
slot
Here is the call graph for this function:

◆ logRevealCards

void MessageLogWidget::logRevealCards ( Player * player,
CardZoneLogic * zone,
int cardId,
QString cardName,
Player * otherPlayer,
bool faceDown,
int amount,
bool isLentToAnotherPlayer )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logReverseTurn

void MessageLogWidget::logReverseTurn ( Player * player,
bool reversed )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logRollDie

void MessageLogWidget::logRollDie ( Player * player,
int sides,
const QList< uint > & rolls )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logSay

void MessageLogWidget::logSay ( Player * player,
QString message )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logSetActivePhase

void MessageLogWidget::logSetActivePhase ( int phase)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logSetActivePlayer

void MessageLogWidget::logSetActivePlayer ( Player * player)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logSetAnnotation

void MessageLogWidget::logSetAnnotation ( Player * player,
CardItem * card,
QString newAnnotation )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logSetCardCounter

void MessageLogWidget::logSetCardCounter ( Player * player,
QString cardName,
int counterId,
int value,
int oldValue )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logSetCounter

void MessageLogWidget::logSetCounter ( Player * player,
QString counterName,
int value,
int oldValue )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logSetDoesntUntap

void MessageLogWidget::logSetDoesntUntap ( Player * player,
CardItem * card,
bool doesntUntap )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logSetPT

void MessageLogWidget::logSetPT ( Player * player,
CardItem * card,
QString newPT )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logSetSideboardLock

void MessageLogWidget::logSetSideboardLock ( Player * player,
bool locked )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logSetTapped

void MessageLogWidget::logSetTapped ( Player * player,
CardItem * card,
bool tapped )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logShuffle

void MessageLogWidget::logShuffle ( Player * player,
CardZoneLogic * zone,
int start,
int end )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logSpectatorSay

void MessageLogWidget::logSpectatorSay ( const ServerInfo_User & spectator,
QString message )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logUnattachCard

void MessageLogWidget::logUnattachCard ( Player * player,
QString cardName )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logUnconcede

void MessageLogWidget::logUnconcede ( int playerId)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logUndoDraw

void MessageLogWidget::logUndoDraw ( Player * player,
QString cardName )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setContextJudgeName

void MessageLogWidget::setContextJudgeName ( QString player)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ currentContext

MessageContext MessageLogWidget::currentContext
private

◆ messagePrefix

QString MessageLogWidget::messagePrefix
private

◆ messageSuffix

QString MessageLogWidget::messageSuffix
private

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