Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
TabRoom Class Reference

#include <tab_room.h>

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

Signals

void roomClosing (TabRoom *tab)
void openMessageDialog (const QString &userName, bool focus)
void maximizeClient ()
void notIdle ()
void gameListUpdated ()
Signals inherited from Tab
void userEvent (bool globalEvent=true)
void tabTextChanged (Tab *tab, const QString &newTabText)
void cockatriceLinkActivated (const QString &url)

Public Member Functions

 TabRoom (TabSupervisor *_tabSupervisor, AbstractClient *_client, ServerInfo_User *_ownUser, const ServerInfo_Room &info)
void retranslateUi () override
void tabActivated () override
void processRoomEvent (const RoomEvent &event)
int getRoomId () const
QString getRoomName () const
const QMap< int, QString > & getGameTypes () const
QString getChannelName () const
QString getTabText () const override
const ServerInfo_User * getUserInfo () const
GameSelector * getGameSelector () const
PendingCommand * prepareRoomCommand (const ::google::protobuf::Message &cmd)
void sendRoomCommand (PendingCommand *pend)
Public Member Functions inherited from Tab
 Tab (TabSupervisor *_tabSupervisor)
const QList< QMenu * > & getTabMenus () const
TabSupervisor * getTabSupervisor () const
bool getContentsChanged () const
void setContentsChanged (bool _contentsChanged)
virtual bool closeRequest ()

Protected Slots

void closeEvent (QCloseEvent *event) override
Protected Slots inherited from Tab
void showCardInfoPopup (const QPoint &pos, const CardRef &cardRef)
void deleteCardInfoPopup (const QString &cardName)

Private Slots

void sendMessage ()
void onChannelChanged (int index)
void onChannelTabClicked (int index)
void setChatCollapsed (bool collapsed)
void actClearChat ()
void actOpenChatSettings ()
void addMentionTag (QString mentionTag)
void focusTab ()
void actShowMentionPopup (const QString &sender)
void actShowPopup (const QString &message)
void actCompleterChanged ()
void processListGamesEvent (const Event_ListGames &event)
void processJoinRoomEvent (const Event_JoinRoom &event)
void processLeaveRoomEvent (const Event_LeaveRoom &event)
void processRoomSayEvent (const Event_RoomSay &event)
void processRoomChannelSayEvent (const Event_RoomChannelSay &event)
void processRemoveMessagesEvent (const Event_RemoveMessages &event)
void refreshShortcuts ()
ChatView * makeChatView ()
void updateChannelTab (const QString &channelId)
void updateSayEnabled ()
void markChannelMessage (const QString &channelId, const QString &message, const ServerInfo_User &senderInfo)
bool messageContainsMention (const QString &message, const ServerInfo_User &senderInfo) const
bool isRoomMessageIgnored (const QString &senderName, ServerInfo_User &userInfoOut) const
static QColor parseColorHex (const QString &hex, const QColor &fallback)

Private Member Functions

QString sanitizeHtml (QString dirty) const

Private Attributes

AbstractClient * client
int roomId
QString roomName
ServerInfo_User * ownUser
QMap< int, QString > gameTypes
GameSelector * gameSelector
UserListPanelWidget * userListPanel
UserListWidget * userList
const UserListProxy * userListProxy
ChatView * chatView
QStackedWidget * chatViewStack
QTabBar * channelTabBar
QWidget * sayWidget
QMap< QString, ChatView * > channelViews
QMap< QString, QString > channelDisplayNames
QMap< QString, int > channelUnreadCounts
QMap< QString, bool > channelMentioned
QMap< QString, bool > channelWritable
QStringList channelIds
QString activeChannelId
bool chatCollapsed
QLabel * sayLabel
LineEditCompleter * sayEdit
QStringListModel * mentionModel
QGroupBox * chatGroupBox
QSplitter * chatSplitter
QList< int > savedSplitterSizes
QMenu * roomMenu
QAction * aLeaveRoom
QAction * aOpenChatSettings
QAction * aClearChat
QStringList autocompleteUserList
QCompleter * mentionCompleter

Additional Inherited Members

Protected Member Functions inherited from Tab
void addTabMenu (QMenu *menu)
Protected Attributes inherited from Tab
TabSupervisor * tabSupervisor

Constructor & Destructor Documentation

◆ TabRoom()

TabRoom::TabRoom ( TabSupervisor * _tabSupervisor,
AbstractClient * _client,
ServerInfo_User * _ownUser,
const ServerInfo_Room & info )
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ actClearChat

void TabRoom::actClearChat ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ actCompleterChanged

void TabRoom::actCompleterChanged ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ actOpenChatSettings

void TabRoom::actOpenChatSettings ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ actShowMentionPopup

void TabRoom::actShowMentionPopup ( const QString & sender)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ actShowPopup

void TabRoom::actShowPopup ( const QString & message)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addMentionTag

void TabRoom::addMentionTag ( QString mentionTag)
privateslot
Here is the caller graph for this function:

◆ closeEvent

void TabRoom::closeEvent ( QCloseEvent * event)
overrideprotectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ focusTab

void TabRoom::focusTab ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gameListUpdated

void TabRoom::gameListUpdated ( )
signal
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getChannelName()

QString TabRoom::getChannelName ( ) const
inlinenodiscard

◆ getGameSelector()

GameSelector * TabRoom::getGameSelector ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ getGameTypes()

const QMap< int, QString > & TabRoom::getGameTypes ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ getRoomId()

int TabRoom::getRoomId ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ getRoomName()

QString TabRoom::getRoomName ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ getTabText()

QString TabRoom::getTabText ( ) const
inlinenodiscardoverridevirtual

Implements Tab.

◆ getUserInfo()

const ServerInfo_User * TabRoom::getUserInfo ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ isRoomMessageIgnored

bool TabRoom::isRoomMessageIgnored ( const QString & senderName,
ServerInfo_User & userInfoOut ) const
nodiscardprivateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeChatView

ChatView * TabRoom::makeChatView ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ markChannelMessage

void TabRoom::markChannelMessage ( const QString & channelId,
const QString & message,
const ServerInfo_User & senderInfo )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ maximizeClient

void TabRoom::maximizeClient ( )
signal
Here is the caller graph for this function:

◆ messageContainsMention

bool TabRoom::messageContainsMention ( const QString & message,
const ServerInfo_User & senderInfo ) const
nodiscardprivateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ notIdle

void TabRoom::notIdle ( )
signal

◆ onChannelChanged

void TabRoom::onChannelChanged ( int index)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onChannelTabClicked

void TabRoom::onChannelTabClicked ( int index)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ openMessageDialog

void TabRoom::openMessageDialog ( const QString & userName,
bool focus )
signal
Here is the caller graph for this function:

◆ parseColorHex

QColor TabRoom::parseColorHex ( const QString & hex,
const QColor & fallback )
staticprivateslot
Here is the caller graph for this function:

◆ prepareRoomCommand()

PendingCommand * TabRoom::prepareRoomCommand ( const ::google::protobuf::Message & cmd)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ processJoinRoomEvent

void TabRoom::processJoinRoomEvent ( const Event_JoinRoom & event)
privateslot
Here is the caller graph for this function:

◆ processLeaveRoomEvent

void TabRoom::processLeaveRoomEvent ( const Event_LeaveRoom & event)
privateslot
Here is the caller graph for this function:

◆ processListGamesEvent

void TabRoom::processListGamesEvent ( const Event_ListGames & event)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ processRemoveMessagesEvent

void TabRoom::processRemoveMessagesEvent ( const Event_RemoveMessages & event)
privateslot
Here is the caller graph for this function:

◆ processRoomChannelSayEvent

void TabRoom::processRoomChannelSayEvent ( const Event_RoomChannelSay & event)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ processRoomEvent()

void TabRoom::processRoomEvent ( const RoomEvent & event)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ processRoomSayEvent

void TabRoom::processRoomSayEvent ( const Event_RoomSay & event)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ refreshShortcuts

void TabRoom::refreshShortcuts ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ retranslateUi()

void TabRoom::retranslateUi ( )
overridevirtual

Implements Tab.

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

◆ roomClosing

void TabRoom::roomClosing ( TabRoom * tab)
signal
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sanitizeHtml()

QString TabRoom::sanitizeHtml ( QString dirty) const
nodiscardprivate

◆ sendMessage

void TabRoom::sendMessage ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendRoomCommand()

void TabRoom::sendRoomCommand ( PendingCommand * pend)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setChatCollapsed

void TabRoom::setChatCollapsed ( bool collapsed)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tabActivated()

void TabRoom::tabActivated ( )
overridevirtual

Reimplemented from Tab.

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

◆ updateChannelTab

void TabRoom::updateChannelTab ( const QString & channelId)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSayEnabled

void TabRoom::updateSayEnabled ( )
privateslot
Here is the caller graph for this function:

Member Data Documentation

◆ aClearChat

QAction* TabRoom::aClearChat
private

◆ activeChannelId

QString TabRoom::activeChannelId
private

◆ aLeaveRoom

QAction* TabRoom::aLeaveRoom
private

◆ aOpenChatSettings

QAction* TabRoom::aOpenChatSettings
private

◆ autocompleteUserList

QStringList TabRoom::autocompleteUserList
private

◆ channelDisplayNames

QMap<QString, QString> TabRoom::channelDisplayNames
private

◆ channelIds

QStringList TabRoom::channelIds
private

◆ channelMentioned

QMap<QString, bool> TabRoom::channelMentioned
private

◆ channelTabBar

QTabBar* TabRoom::channelTabBar
private

◆ channelUnreadCounts

QMap<QString, int> TabRoom::channelUnreadCounts
private

◆ channelViews

QMap<QString, ChatView *> TabRoom::channelViews
private

◆ channelWritable

QMap<QString, bool> TabRoom::channelWritable
private

◆ chatCollapsed

bool TabRoom::chatCollapsed
private

◆ chatGroupBox

QGroupBox* TabRoom::chatGroupBox
private

◆ chatSplitter

QSplitter* TabRoom::chatSplitter
private

◆ chatView

ChatView* TabRoom::chatView
private

◆ chatViewStack

QStackedWidget* TabRoom::chatViewStack
private

◆ client

AbstractClient* TabRoom::client
private

◆ gameSelector

GameSelector* TabRoom::gameSelector
private

◆ gameTypes

QMap<int, QString> TabRoom::gameTypes
private

◆ mentionCompleter

QCompleter* TabRoom::mentionCompleter
private

◆ mentionModel

QStringListModel* TabRoom::mentionModel
private

◆ ownUser

ServerInfo_User* TabRoom::ownUser
private

◆ roomId

int TabRoom::roomId
private

◆ roomMenu

QMenu* TabRoom::roomMenu
private

◆ roomName

QString TabRoom::roomName
private

◆ savedSplitterSizes

QList<int> TabRoom::savedSplitterSizes
private

◆ sayEdit

LineEditCompleter* TabRoom::sayEdit
private

◆ sayLabel

QLabel* TabRoom::sayLabel
private

◆ sayWidget

QWidget* TabRoom::sayWidget
private

◆ userList

UserListWidget* TabRoom::userList
private

◆ userListPanel

UserListPanelWidget* TabRoom::userListPanel
private

◆ userListProxy

const UserListProxy* TabRoom::userListProxy
private

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