mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-09 15:54:47 -07:00
blah
This commit is contained in:
parent
55482246dd
commit
59e9416f57
29 changed files with 332 additions and 187 deletions
|
|
@ -103,19 +103,37 @@ void TabSupervisor::updatePingTime(int value, int max)
|
|||
void TabSupervisor::gameJoined(Event_GameJoined *event)
|
||||
{
|
||||
TabGame *tab = new TabGame(client, event->getGameId(), event->getPlayerId(), event->getSpectator());
|
||||
connect(tab, SIGNAL(gameClosing(TabGame *)), this, SLOT(gameLeft(TabGame *)));
|
||||
addTab(tab, tr("Game %1").arg(event->getGameId()));
|
||||
gameTabs.insert(event->getGameId(), tab);
|
||||
setCurrentWidget(tab);
|
||||
}
|
||||
|
||||
void TabSupervisor::gameLeft(TabGame *tab)
|
||||
{
|
||||
emit setMenu(0);
|
||||
|
||||
gameTabs.remove(tab->getGameId());
|
||||
removeTab(indexOf(tab));
|
||||
}
|
||||
|
||||
void TabSupervisor::addChatChannelTab(const QString &channelName)
|
||||
{
|
||||
TabChatChannel *tab = new TabChatChannel(client, channelName);
|
||||
connect(tab, SIGNAL(channelClosing(TabChatChannel *)), this, SLOT(chatChannelLeft(TabChatChannel *)));
|
||||
addTab(tab, channelName);
|
||||
chatChannelTabs.insert(channelName, tab);
|
||||
setCurrentWidget(tab);
|
||||
}
|
||||
|
||||
void TabSupervisor::chatChannelLeft(TabChatChannel *tab)
|
||||
{
|
||||
emit setMenu(0);
|
||||
|
||||
chatChannelTabs.remove(tab->getChannelName());
|
||||
removeTab(indexOf(tab));
|
||||
}
|
||||
|
||||
void TabSupervisor::processChatEvent(ChatEvent *event)
|
||||
{
|
||||
TabChatChannel *tab = chatChannelTabs.value(event->getChannel(), 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue