Files
pokerth/src/gui/qt/guiwrapper.cpp
T

106 lines
5.3 KiB
C++
Raw Normal View History

/***************************************************************************
* Copyright (C) 2006 by FThauer FHammer *
* f.thauer@web.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "guiwrapper.h"
#include "session.h"
#include "log.h"
#include "mainwindowimpl.h"
#include "configfile.h"
using namespace std;
2007-05-13 12:35:27 +00:00
GuiWrapper::GuiWrapper(ConfigFile *c) : myLog(0), myW(0), myConfig(c)
{
2007-05-13 12:35:27 +00:00
myW = new mainWindowImpl(myConfig);
myW->show();
2007-05-13 12:35:27 +00:00
myLog = new Log(myW, myConfig);
}
GuiWrapper::~GuiWrapper()
{
}
2007-05-02 21:20:54 +00:00
void GuiWrapper::initGui(int speed) { myW->initGui(speed); }
Session &GuiWrapper::getSession() { return myW->getSession(); }
void GuiWrapper::setSession(boost::shared_ptr<Session> session) { myW->setSession(session); }
void GuiWrapper::refreshSet() const { myW->refreshSet(); }
void GuiWrapper::refreshCash() const { myW->refreshCash(); }
void GuiWrapper::refreshAction(int playerID, int playerAction) const { myW->refreshAction(playerID, playerAction); }
void GuiWrapper::refreshChangePlayer() const { myW->refreshChangePlayer(); }
void GuiWrapper::refreshAll() const { myW->refreshAll(); }
void GuiWrapper::refreshPot() const { myW->refreshPot(); }
void GuiWrapper::refreshGroupbox(int playerID, int status) const { myW->refreshGroupbox(playerID, status); }
void GuiWrapper::refreshPlayerName() const { myW->refreshPlayerName(); }
2007-05-14 12:40:42 +00:00
void GuiWrapper::dealHoleCards() { myW->dealHoleCards(); }
void GuiWrapper::dealFlopCards() { myW->dealFlopCards0(); }
void GuiWrapper::dealTurnCard() { myW->dealTurnCards0(); }
void GuiWrapper::dealRiverCard() { myW->dealRiverCards0(); }
void GuiWrapper::highlightRoundLabel(string round) const { myW->highlightRoundLabel(round); }
2007-05-14 12:40:42 +00:00
void GuiWrapper::nextPlayerAnimation() { myW->nextPlayerAnimation(); }
2007-05-14 12:40:42 +00:00
void GuiWrapper::preflopAnimation1() { myW->preflopAnimation1(); }
void GuiWrapper::preflopAnimation2() { myW->preflopAnimation2(); }
2007-05-14 12:40:42 +00:00
void GuiWrapper::flopAnimation1() { myW->flopAnimation1(); }
void GuiWrapper::flopAnimation2() { myW->flopAnimation2(); }
2007-05-14 12:40:42 +00:00
void GuiWrapper::turnAnimation1() { myW->turnAnimation1(); }
void GuiWrapper::turnAnimation2() { myW->turnAnimation2(); }
2007-05-14 12:40:42 +00:00
void GuiWrapper::riverAnimation1() { myW->riverAnimation1(); }
void GuiWrapper::riverAnimation2() { myW->riverAnimation2(); }
2007-05-14 12:40:42 +00:00
void GuiWrapper::postRiverAnimation1() { myW->postRiverAnimation1(); }
void GuiWrapper::postRiverRunAnimation1() { myW->postRiverRunAnimation1(); }
2007-05-14 12:40:42 +00:00
void GuiWrapper::flipHolecardsAllIn() { myW->flipHolecardsAllIn(); }
2007-05-14 12:40:42 +00:00
void GuiWrapper::nextRoundCleanGui() { myW->nextRoundCleanGui(); }
2007-05-14 12:40:42 +00:00
void GuiWrapper::meInAction() { myW->meInAction(); }
void GuiWrapper::logPlayerActionMsg(string playerName, int action, int setValue) { myLog->logPlayerActionMsg(playerName, action, setValue); }
void GuiWrapper::logNewGameHandMsg(int gameID, int handID) { myLog->logNewGameHandMsg(gameID, handID); }
void GuiWrapper::SignalNetClientConnect(int actionID) { myW->SignalNetClientConnect(actionID); }
void GuiWrapper::SignalNetClientGameInfo(int actionID) { myW->SignalNetClientGameInfo(actionID); }
void GuiWrapper::SignalNetClientError(int errorID, int osErrorID) { myW->SignalNetClientError(errorID, osErrorID); }
void GuiWrapper::SignalNetClientPlayerJoined(const string &playerName) { myW->SignalNetClientPlayerJoined(QString::fromUtf8(playerName.c_str())); }
void GuiWrapper::SignalNetClientPlayerLeft(const string &playerName) { myW->SignalNetClientPlayerLeft(QString::fromUtf8(playerName.c_str())); }
void GuiWrapper::SignalNetClientGameStart(const GameData &gameData) { myW->SignalNetClientGameStart(gameData.numberOfPlayers, gameData.startCash, gameData.smallBlind, gameData.handsBeforeRaise); }
void GuiWrapper::SignalNetServerSuccess(int actionID) { }
void GuiWrapper::SignalNetServerError(int errorID, int osErrorID) { }
void GuiWrapper::SignalNetServerPlayerJoined(const string &playerName) { myW->SignalNetServerPlayerJoined(QString::fromUtf8(playerName.c_str())); }
2007-05-02 22:46:29 +00:00
void GuiWrapper::SignalNetServerPlayerLeft(const string &playerName) { myW->SignalNetServerPlayerLeft(QString::fromUtf8(playerName.c_str())); }