2011-07-02 23:03:18 +00:00
|
|
|
/*****************************************************************************
|
|
|
|
|
* PokerTH - The open source texas holdem engine *
|
|
|
|
|
* Copyright (C) 2006-2011 Felix Hammer, Florian Thauer, Lothar May *
|
|
|
|
|
* *
|
|
|
|
|
* This program is free software: you can redistribute it and/or modify *
|
|
|
|
|
* it under the terms of the GNU Affero General Public License as *
|
|
|
|
|
* published by the Free Software Foundation, either version 3 of the *
|
|
|
|
|
* License, or (at your option) any later version. *
|
|
|
|
|
* *
|
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
|
* GNU Affero General Public License for more details. *
|
|
|
|
|
* *
|
|
|
|
|
* You should have received a copy of the GNU Affero General Public License *
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
|
|
|
|
*****************************************************************************/
|
2007-05-26 17:06:03 +00:00
|
|
|
#include "guiwrapper.h"
|
|
|
|
|
#include "session.h"
|
2010-12-14 21:14:49 +00:00
|
|
|
#include "guilog.h"
|
2008-05-05 07:46:19 +00:00
|
|
|
#include "gametableimpl.h"
|
2008-06-08 10:50:08 +00:00
|
|
|
#include "startwindowimpl.h"
|
2007-05-26 17:06:03 +00:00
|
|
|
#include "configfile.h"
|
2008-11-25 23:19:34 +00:00
|
|
|
#include <net/socket_msg.h>
|
|
|
|
|
|
2007-05-26 17:06:03 +00:00
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
|
2010-12-18 23:10:10 +00:00
|
|
|
GuiWrapper::GuiWrapper(ConfigFile *c, startWindowImpl *s) : myGuiLog(NULL), myW(NULL), myConfig(c), myStartWindow(s)
|
2007-05-26 17:06:03 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
myW = new gameTableImpl(myConfig);
|
|
|
|
|
myGuiLog = new guiLog(myW, myConfig);
|
2008-06-08 10:50:08 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
myW->setStartWindow(myStartWindow);
|
2007-05-26 17:06:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GuiWrapper::~GuiWrapper()
|
|
|
|
|
{
|
2011-02-11 20:02:08 +00:00
|
|
|
delete myGuiLog;
|
2010-07-11 20:36:50 +00:00
|
|
|
|
2007-05-26 17:06:03 +00:00
|
|
|
}
|
|
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::initGui(int speed)
|
|
|
|
|
{
|
|
|
|
|
myW->signalInitGui(speed);
|
|
|
|
|
}
|
2007-05-26 17:06:03 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
boost::shared_ptr<Session> GuiWrapper::getSession()
|
|
|
|
|
{
|
|
|
|
|
return myStartWindow->getSession();
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::setSession(boost::shared_ptr<Session> /*session*/)
|
|
|
|
|
{
|
|
|
|
|
/*myStartWindow->setSession(session);*/
|
|
|
|
|
}
|
2007-05-26 17:06:03 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::refreshSet() const
|
|
|
|
|
{
|
|
|
|
|
myW->signalRefreshSet();
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::refreshCash() const
|
|
|
|
|
{
|
|
|
|
|
myW->signalRefreshCash();
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::refreshAction(int playerID, int playerAction) const
|
|
|
|
|
{
|
|
|
|
|
myW->signalRefreshAction(playerID, playerAction);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::refreshChangePlayer() const
|
|
|
|
|
{
|
|
|
|
|
myW->signalRefreshChangePlayer();
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::refreshAll() const
|
|
|
|
|
{
|
|
|
|
|
myW->signalRefreshAll();
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::refreshPot() const
|
|
|
|
|
{
|
|
|
|
|
myW->signalRefreshPot();
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::refreshGroupbox(int playerID, int status) const
|
|
|
|
|
{
|
|
|
|
|
myW->signalRefreshGroupbox(playerID, status);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::refreshPlayerName() const
|
|
|
|
|
{
|
|
|
|
|
myW->signalRefreshPlayerName();
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::refreshButton() const
|
|
|
|
|
{
|
|
|
|
|
myW->signalRefreshButton();
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::refreshGameLabels(GameState state) const
|
|
|
|
|
{
|
|
|
|
|
myW->signalRefreshGameLabels(state);
|
|
|
|
|
}
|
2007-05-26 17:06:03 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::setPlayerAvatar(int myUniqueID, const std::string &myAvatar) const
|
|
|
|
|
{
|
|
|
|
|
myW->signalSetPlayerAvatar(myUniqueID, QString::fromUtf8(myAvatar.c_str()));
|
|
|
|
|
}
|
2007-11-01 00:28:32 +00:00
|
|
|
|
|
|
|
|
|
2007-06-10 12:46:29 +00:00
|
|
|
void GuiWrapper::waitForGuiUpdateDone() const
|
|
|
|
|
{
|
2011-02-11 20:02:08 +00:00
|
|
|
myW->signalGuiUpdateDone();
|
|
|
|
|
myW->waitForGuiUpdateDone();
|
2007-06-10 12:46:29 +00:00
|
|
|
}
|
|
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::dealBeRoCards(int myBeRoID)
|
|
|
|
|
{
|
|
|
|
|
myW->signalDealBeRoCards(myBeRoID);
|
|
|
|
|
}
|
2007-08-07 00:05:29 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::dealHoleCards()
|
|
|
|
|
{
|
|
|
|
|
myW->signalDealHoleCards();
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::dealFlopCards()
|
|
|
|
|
{
|
|
|
|
|
myW->signalDealFlopCards0();
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::dealTurnCard()
|
|
|
|
|
{
|
|
|
|
|
myW->signalDealTurnCards0();
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::dealRiverCard()
|
|
|
|
|
{
|
|
|
|
|
myW->signalDealRiverCards0();
|
|
|
|
|
}
|
2007-05-26 17:06:03 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::nextPlayerAnimation()
|
|
|
|
|
{
|
|
|
|
|
myW->signalNextPlayerAnimation();
|
|
|
|
|
}
|
2007-05-26 17:06:03 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::beRoAnimation2(int myBeRoID)
|
|
|
|
|
{
|
|
|
|
|
myW->signalBeRoAnimation2(myBeRoID);
|
|
|
|
|
}
|
2007-08-07 13:07:39 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::preflopAnimation1()
|
|
|
|
|
{
|
|
|
|
|
myW->signalPreflopAnimation1();
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::preflopAnimation2()
|
|
|
|
|
{
|
|
|
|
|
myW->signalPreflopAnimation2();
|
|
|
|
|
}
|
2007-05-26 17:06:03 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::flopAnimation1()
|
|
|
|
|
{
|
|
|
|
|
myW->signalFlopAnimation1();
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::flopAnimation2()
|
|
|
|
|
{
|
|
|
|
|
myW->signalFlopAnimation2();
|
|
|
|
|
}
|
2007-05-26 17:06:03 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::turnAnimation1()
|
|
|
|
|
{
|
|
|
|
|
myW->signalTurnAnimation1();
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::turnAnimation2()
|
|
|
|
|
{
|
|
|
|
|
myW->signalTurnAnimation2();
|
|
|
|
|
}
|
2007-05-26 17:06:03 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::riverAnimation1()
|
|
|
|
|
{
|
|
|
|
|
myW->signalRiverAnimation1();
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::riverAnimation2()
|
|
|
|
|
{
|
|
|
|
|
myW->signalRiverAnimation2();
|
|
|
|
|
}
|
2007-05-26 17:06:03 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::postRiverAnimation1()
|
|
|
|
|
{
|
|
|
|
|
myW->signalPostRiverAnimation1();
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::postRiverRunAnimation1()
|
|
|
|
|
{
|
|
|
|
|
myW->signalPostRiverRunAnimation1();
|
|
|
|
|
}
|
2007-05-26 17:06:03 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::flipHolecardsAllIn()
|
|
|
|
|
{
|
|
|
|
|
myW->signalFlipHolecardsAllIn();
|
|
|
|
|
}
|
2007-05-26 17:06:03 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::nextRoundCleanGui()
|
|
|
|
|
{
|
|
|
|
|
myW->signalNextRoundCleanGui();
|
|
|
|
|
}
|
2007-05-26 17:06:03 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::meInAction()
|
|
|
|
|
{
|
|
|
|
|
myW->signalMeInAction();
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::updateMyButtonsState()
|
|
|
|
|
{
|
|
|
|
|
myW->signalUpdateMyButtonsState();
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::disableMyButtons()
|
|
|
|
|
{
|
|
|
|
|
myW->signalDisableMyButtons();
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::startTimeoutAnimation(int playerNum, int timeoutSec)
|
|
|
|
|
{
|
|
|
|
|
myW->signalStartTimeoutAnimation(playerNum, timeoutSec);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::stopTimeoutAnimation(int playerNum)
|
|
|
|
|
{
|
|
|
|
|
myW->signalStopTimeoutAnimation(playerNum);
|
|
|
|
|
}
|
2007-05-26 17:06:03 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::startVoteOnKick(unsigned playerId, unsigned voteStarterPlayerId, int timeoutSec, int numVotesNeededToKick)
|
|
|
|
|
{
|
|
|
|
|
myW->signalStartVoteOnKick(playerId, voteStarterPlayerId, timeoutSec, numVotesNeededToKick);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::changeVoteOnKickButtonsState(bool showHide)
|
|
|
|
|
{
|
|
|
|
|
myW->signalChangeVoteOnKickButtonsState(showHide);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::refreshVotesMonitor(int currentVotes, int numVotesNeededToKick)
|
|
|
|
|
{
|
|
|
|
|
myW->refreshVotesMonitor(currentVotes, numVotesNeededToKick);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::endVoteOnKick()
|
|
|
|
|
{
|
|
|
|
|
myW->signalEndVoteOnKick();
|
|
|
|
|
}
|
2008-10-12 20:46:40 +00:00
|
|
|
|
2011-02-27 16:34:39 +00:00
|
|
|
void GuiWrapper::logPlayerActionMsg(string playerName, int action, int setValue)
|
2011-02-11 20:02:08 +00:00
|
|
|
{
|
2011-02-27 16:34:39 +00:00
|
|
|
myGuiLog->signalLogPlayerActionMsg(QString::fromUtf8(playerName.c_str()), action, setValue);
|
2011-02-11 20:02:08 +00:00
|
|
|
}
|
|
|
|
|
void GuiWrapper::logNewGameHandMsg(int gameID, int handID)
|
|
|
|
|
{
|
|
|
|
|
myGuiLog->signalLogNewGameHandMsg(gameID, handID);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::logNewBlindsSetsMsg(int sbSet, int bbSet, std::string sbName, std::string bbName)
|
|
|
|
|
{
|
|
|
|
|
myGuiLog->signalLogNewBlindsSetsMsg(sbSet, bbSet, QString::fromUtf8(sbName.c_str()), QString::fromUtf8(bbName.c_str()));
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::logPlayerWinsMsg(std::string playerName, int pot, bool main)
|
|
|
|
|
{
|
|
|
|
|
myGuiLog->signalLogPlayerWinsMsg(QString::fromUtf8(playerName.c_str()), pot, main);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::logPlayerSitsOut(std::string playerName)
|
|
|
|
|
{
|
|
|
|
|
myGuiLog->signalLogPlayerSitsOut(QString::fromUtf8(playerName.c_str()));
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4, int card5)
|
|
|
|
|
{
|
|
|
|
|
myGuiLog->signalLogDealBoardCardsMsg(roundID, card1, card2, card3, card4, card5);
|
|
|
|
|
}
|
2011-02-27 16:34:39 +00:00
|
|
|
void GuiWrapper::logFlipHoleCardsMsg(string playerName, int card1, int card2, int cardsValueInt, string showHas)
|
2011-02-11 20:02:08 +00:00
|
|
|
{
|
2011-02-27 16:34:39 +00:00
|
|
|
myGuiLog->signalLogFlipHoleCardsMsg(QString::fromUtf8(playerName.c_str()), card1, card2, cardsValueInt, QString::fromUtf8(showHas.c_str()));
|
2011-02-11 20:02:08 +00:00
|
|
|
}
|
|
|
|
|
void GuiWrapper::logPlayerWinGame(std::string playerName, int gameID)
|
|
|
|
|
{
|
|
|
|
|
myGuiLog->signalLogPlayerWinGame(QString::fromUtf8(playerName.c_str()), gameID);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::flushLogAtGame(int gameID)
|
|
|
|
|
{
|
|
|
|
|
myGuiLog->signalFlushLogAtGame(gameID);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::flushLogAtHand()
|
|
|
|
|
{
|
|
|
|
|
myGuiLog->signalFlushLogAtHand();
|
|
|
|
|
}
|
2007-10-03 22:42:24 +00:00
|
|
|
|
2009-04-05 12:32:16 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::SignalNetClientConnect(int actionID)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientConnect(actionID);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalNetClientServerListAdd(unsigned serverId)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientServerListAdd(serverId);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalNetClientServerListShow()
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientServerListShow();
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalNetClientLoginShow()
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientLoginShow();
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalNetClientPostRiverShowCards(unsigned playerId)
|
|
|
|
|
{
|
|
|
|
|
myW->signalPostRiverShowCards(playerId);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalNetClientServerListClear()
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientServerListClear();
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalNetClientGameInfo(int actionID)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientGameInfo(actionID);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalNetClientError(int errorID, int osErrorID)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientError(errorID, osErrorID);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalNetClientNotification(int notificationId)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientNotification(notificationId);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalNetClientStatsUpdate(const ServerStats &stats)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientStatsUpdate(stats);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalNetClientShowTimeoutDialog(NetTimeoutReason reason, unsigned remainingSec)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientShowTimeoutDialog(reason, remainingSec);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalNetClientRemovedFromGame(int notificationId)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientRemovedFromGame(notificationId);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalNetClientSelfJoined(unsigned playerId, const string &playerName, bool isGameAdmin)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientSelfJoined(playerId, QString::fromUtf8(playerName.c_str()), isGameAdmin);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalNetClientPlayerJoined(unsigned playerId, const string &playerName, bool isGameAdmin)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientPlayerJoined(playerId, QString::fromUtf8(playerName.c_str()), isGameAdmin);
|
|
|
|
|
}
|
2007-09-02 16:36:52 +00:00
|
|
|
void GuiWrapper::SignalNetClientPlayerChanged(unsigned playerId, const string &newPlayerName)
|
2007-08-26 22:41:37 +00:00
|
|
|
{
|
2011-02-11 20:02:08 +00:00
|
|
|
myStartWindow->signalNetClientPlayerChanged(playerId, QString::fromUtf8(newPlayerName.c_str()));
|
2007-08-26 22:41:37 +00:00
|
|
|
}
|
2008-11-25 23:19:34 +00:00
|
|
|
void GuiWrapper::SignalNetClientPlayerLeft(unsigned playerId, const string &playerName, int removeReason)
|
2007-06-15 10:38:41 +00:00
|
|
|
{
|
2011-02-11 20:02:08 +00:00
|
|
|
QString tmpName(QString::fromUtf8(playerName.c_str()));
|
|
|
|
|
myStartWindow->signalNetClientPlayerLeft(playerId, tmpName);
|
|
|
|
|
myW->signalNetClientPlayerLeft(playerId);
|
|
|
|
|
if (!playerName.empty() && playerName[0] != '#')
|
|
|
|
|
myGuiLog->signalLogPlayerLeftMsg(tmpName, removeReason == NTF_NET_REMOVED_KICKED);
|
2007-06-15 10:38:41 +00:00
|
|
|
}
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::SignalNetClientNewGameAdmin(unsigned playerId, const string &playerName)
|
|
|
|
|
{
|
2007-10-28 18:40:24 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
myStartWindow->signalNetClientNewGameAdmin(playerId, QString::fromUtf8(playerName.c_str()));
|
|
|
|
|
if (!playerName.empty() && playerName[0] != '#')
|
|
|
|
|
myGuiLog->signalLogNewGameAdminMsg(QString::fromUtf8(playerName.c_str()));
|
2007-10-28 18:40:24 +00:00
|
|
|
|
|
|
|
|
}
|
2007-08-21 12:34:33 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::SignalNetClientGameListNew(unsigned gameId)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientGameListNew(gameId);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalNetClientGameListRemove(unsigned gameId)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientGameListRemove(gameId);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalNetClientGameListUpdateMode(unsigned gameId, GameMode mode)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientGameListUpdateMode(gameId, mode);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalNetClientGameListUpdateAdmin(unsigned gameId, unsigned adminPlayerId)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientGameListUpdateAdmin(gameId, adminPlayerId);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalNetClientGameListPlayerJoined(unsigned gameId, unsigned playerId)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientGameListPlayerJoined(gameId, playerId);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalNetClientGameListPlayerLeft(unsigned gameId, unsigned playerId)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientGameListPlayerLeft(gameId, playerId);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalNetClientGameStart(boost::shared_ptr<Game> game)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientGameStart(game);
|
|
|
|
|
}
|
2007-08-21 12:34:33 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::SignalNetClientWaitDialog()
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalShowClientDialog();
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalNetClientWarningAutoFoldInRankingGame(unsigned remainingAutoFolds)
|
|
|
|
|
{
|
|
|
|
|
myW->signalWarningAutoFoldInRankingGame(remainingAutoFolds);
|
|
|
|
|
}
|
2010-09-05 13:13:42 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::SignalNetClientGameChatMsg(const string &playerName, const string &msg)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientGameChatMsg(QString::fromUtf8(playerName.c_str()), QString::fromUtf8(msg.c_str()));
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalNetClientLobbyChatMsg(const string &playerName, const string &msg)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientLobbyChatMsg(QString::fromUtf8(playerName.c_str()), QString::fromUtf8(msg.c_str()));
|
|
|
|
|
}
|
2011-02-11 23:02:29 +00:00
|
|
|
void GuiWrapper::SignalNetClientPrivateChatMsg(const std::string &playerName, const std::string &msg)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientPrivateChatMsg(QString::fromUtf8(playerName.c_str()), QString::fromUtf8(msg.c_str()));
|
|
|
|
|
}
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::SignalNetClientMsgBox(const string &msg)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientMsgBox(QString::fromUtf8(msg.c_str()));
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalNetClientMsgBox(unsigned msgId)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetClientMsgBox(msgId);
|
|
|
|
|
}
|
2008-09-13 20:40:08 +00:00
|
|
|
|
2007-10-12 14:32:25 +00:00
|
|
|
void GuiWrapper::SignalNetServerSuccess(int /*actionID*/) { }
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::SignalNetServerError(int errorID, int osErrorID)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalNetServerError(errorID, osErrorID);
|
|
|
|
|
}
|
2007-05-26 17:06:03 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::SignalIrcConnect(const string &/*server*/)
|
|
|
|
|
{
|
|
|
|
|
/*myStartWindow->signalIrcConnect(QString::fromUtf8(server.c_str()));*/
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalIrcSelfJoined(const string &/*nickName*/, const string &/*channel*/)
|
|
|
|
|
{
|
|
|
|
|
/*myStartWindow->signalIrcSelfJoined(QString::fromUtf8(nickName.c_str()), QString::fromUtf8(channel.c_str()));*/
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalIrcPlayerJoined(const string &/*nickName*/)
|
|
|
|
|
{
|
|
|
|
|
/*myStartWindow->signalIrcPlayerJoined(QString::fromUtf8(nickName.c_str()));*/
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalIrcPlayerChanged(const string &/*oldNick*/, const string &/*newNick*/)
|
|
|
|
|
{
|
|
|
|
|
/* myStartWindow->signalIrcPlayerChanged(QString::fromUtf8(oldNick.c_str()), QString::fromUtf8(newNick.c_str()));*/
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalIrcPlayerKicked(const std::string &/*nickName*/, const std::string &/*byWhom*/, const std::string &/*reason*/)
|
|
|
|
|
{
|
|
|
|
|
/*myStartWindow->signalIrcPlayerKicked(QString::fromUtf8(nickName.c_str()), QString::fromUtf8(byWhom.c_str()), QString::fromUtf8(reason.c_str()));*/
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalIrcPlayerLeft(const std::string &/*nickName*/)
|
|
|
|
|
{
|
|
|
|
|
/*myStartWindow->signalIrcPlayerLeft(QString::fromUtf8(nickName.c_str()));*/
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalIrcChatMsg(const std::string &/*nickName*/, const std::string &/*msg*/)
|
|
|
|
|
{
|
|
|
|
|
/*myStartWindow->signalIrcChatMessage(QString::fromUtf8(nickName.c_str()), QString::fromUtf8(msg.c_str()));*/
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalIrcError(int /*errorCode*/)
|
|
|
|
|
{
|
|
|
|
|
/*myStartWindow->signalIrcError(errorCode);*/
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalIrcServerError(int /*errorCode*/)
|
|
|
|
|
{
|
|
|
|
|
/*myStartWindow->signalIrcServerError(errorCode);*/
|
|
|
|
|
}
|
2009-08-15 21:07:14 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::SignalLobbyPlayerJoined(unsigned playerId, const string &nickName)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalLobbyPlayerJoined(playerId, QString::fromUtf8(nickName.c_str()));
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalLobbyPlayerKicked(const std::string &nickName, const std::string &byWhom, const std::string &reason)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalLobbyPlayerKicked(QString::fromUtf8(nickName.c_str()), QString::fromUtf8(byWhom.c_str()), QString::fromUtf8(reason.c_str()));
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalLobbyPlayerLeft(unsigned playerId)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalLobbyPlayerLeft(playerId);
|
|
|
|
|
}
|
2010-03-29 13:08:59 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void GuiWrapper::SignalSelfGameInvitation(unsigned gameId, unsigned playerIdFrom)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalSelfGameInvitation(gameId, playerIdFrom);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalPlayerGameInvitation(unsigned gameId, unsigned playerIdWho, unsigned playerIdFrom)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalPlayerGameInvitation(gameId, playerIdWho, playerIdFrom);
|
|
|
|
|
}
|
|
|
|
|
void GuiWrapper::SignalRejectedGameInvitation(unsigned gameId, unsigned playerIdWho, DenyGameInvitationReason reason)
|
|
|
|
|
{
|
|
|
|
|
myStartWindow->signalRejectedGameInvitation(gameId, playerIdWho, reason);
|
|
|
|
|
}
|