diff --git a/src/gui/qt/guiwrapper.cpp b/src/gui/qt/guiwrapper.cpp index 3b43f084..121aef0a 100644 --- a/src/gui/qt/guiwrapper.cpp +++ b/src/gui/qt/guiwrapper.cpp @@ -24,14 +24,14 @@ using namespace std; -GuiWrapper::GuiWrapper() : myLogWidget(0), myW(0) +GuiWrapper::GuiWrapper() : myLog(0), myW(0) { myW = new mainWindowImpl; myW->show(); - myLogWidget = new LogWidgetImpl(myW); + myLog = new Log(myW); myConfig = new ConfigFile; @@ -86,7 +86,7 @@ void GuiWrapper::nextRoundCleanGui() const { myW->nextRoundCleanGui(); } void GuiWrapper::meInAction() const { myW->meInAction(); } -void GuiWrapper::showPlayerActionLogMsg(string playerName, int action, int setValue) const { myLogWidget->showPlayerActionLogMsg(playerName, action, setValue); } +void GuiWrapper::showPlayerActionLogMsg(string playerName, int action, int setValue) const { myLog->showPlayerActionLogMsg(playerName, action, setValue); } diff --git a/src/gui/qt/guiwrapper.h b/src/gui/qt/guiwrapper.h index eacbe8f2..002cf7e3 100644 --- a/src/gui/qt/guiwrapper.h +++ b/src/gui/qt/guiwrapper.h @@ -22,7 +22,7 @@ #include -#include "logwidgetimpl.h" +#include "log.h" #include "mainwindowimpl.h" #include "configfile.h" @@ -87,7 +87,7 @@ public: private: - LogWidgetImpl *myLogWidget; + Log *myLog; mainWindowImpl *myW; ConfigFile *myConfig; diff --git a/src/gui/qt/logwidgetimpl.cpp b/src/gui/qt/log.cpp similarity index 88% rename from src/gui/qt/logwidgetimpl.cpp rename to src/gui/qt/log.cpp index 6ff295fd..627d8c88 100644 --- a/src/gui/qt/logwidgetimpl.cpp +++ b/src/gui/qt/log.cpp @@ -17,23 +17,23 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include "logwidgetimpl.h" +#include "log.h" #include "mainwindowimpl.h" using namespace std; -LogWidgetImpl::LogWidgetImpl(mainWindowImpl* w) : myW(w) +Log::Log(mainWindowImpl* w) : myW(w) { - myW->setLogWidgetImpl(this); + myW->setLog(this); } -LogWidgetImpl::~LogWidgetImpl() +Log::~Log() { } -void LogWidgetImpl::showPlayerActionLogMsg(string playerName, int action, int setValue) const { +void Log::showPlayerActionLogMsg(string playerName, int action, int setValue) const { QString msg; msg = QString::fromStdString(playerName); diff --git a/src/gui/qt/logwidgetimpl.h b/src/gui/qt/log.h similarity index 92% rename from src/gui/qt/logwidgetimpl.h rename to src/gui/qt/log.h index 302cc7bc..af1392c8 100644 --- a/src/gui/qt/logwidgetimpl.h +++ b/src/gui/qt/log.h @@ -17,22 +17,27 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#ifndef LOGWIDGETIMPL_H -#define LOGWIDGETIMPL_H +#ifndef LOG_H +#define LOG_H #include #include +#include + + class mainWindowImpl; -class LogWidgetImpl{ +class Log{ public: - LogWidgetImpl(mainWindowImpl*); + Log(mainWindowImpl*); + + ~Log(); - ~LogWidgetImpl(); void showPlayerActionLogMsg(std::string playName, int action, int setValue) const; + private: mainWindowImpl *myW; diff --git a/src/gui/qt/mainwindowimpl.cpp b/src/gui/qt/mainwindowimpl.cpp index adc8d635..9e2135f3 100755 --- a/src/gui/qt/mainwindowimpl.cpp +++ b/src/gui/qt/mainwindowimpl.cpp @@ -33,7 +33,7 @@ #include "game.h" #include "session.h" -#include "logwidgetimpl.h" +#include "log.h" #include "configfile.h" #define FORMATLEFT(X) "

(X)" @@ -57,12 +57,12 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent, const char *name) QFont tmpFont("Nimbus Sans L",9); QApplication::setFont(tmpFont); -// // Programmverzeichnis erstellen -// QDir progDir1; -// QDir progDir2; -// progDir1.setPath(QDir::home().absPath()+"/.pokerth/"); -// -// if ( !progDir1.exists() ) { progDir1.mkdir(progDir1.absPath()); } + // Programmverzeichnis erstellen + QDir progDir1; + QDir progDir2; + progDir1.setPath(QDir::home().absPath()+"/.pokerth/"); + + if ( !progDir1.exists() ) { progDir1.mkdir(progDir1.absPath()); } myConfig = new ConfigFile; @@ -537,7 +537,7 @@ void mainWindowImpl::setHand(HandInterface* br) { actualHand = br; } void mainWindowImpl::setSession(Session* s) { mySession = s; } -void mainWindowImpl::setLogWidgetImpl(LogWidgetImpl* l) { myLogWidget = l; } +void mainWindowImpl::setLog(Log* l) { myLog = l; } //refresh-Funktionen void mainWindowImpl::refreshSet() { @@ -1027,7 +1027,7 @@ void mainWindowImpl::myFold(){ actualHand->getPlayerArray()[0]->setMyTurn(0); //Action in LogWindow - myLogWidget->showPlayerActionLogMsg(actualHand->getPlayerArray()[0]->getMyName(), actualHand->getPlayerArray()[0]->getMyAction(), actualHand->getPlayerArray()[0]->getMySet()); + myLog->showPlayerActionLogMsg(actualHand->getPlayerArray()[0]->getMyName(), actualHand->getPlayerArray()[0]->getMyAction(), actualHand->getPlayerArray()[0]->getMySet()); disableMyButtons(); @@ -1041,7 +1041,7 @@ void mainWindowImpl::myCheck() { actualHand->getPlayerArray()[0]->setMyTurn(0); //Action in LogWindow - myLogWidget->showPlayerActionLogMsg(actualHand->getPlayerArray()[0]->getMyName(), actualHand->getPlayerArray()[0]->getMyAction(), actualHand->getPlayerArray()[0]->getMySet()); + myLog->showPlayerActionLogMsg(actualHand->getPlayerArray()[0]->getMyName(), actualHand->getPlayerArray()[0]->getMyAction(), actualHand->getPlayerArray()[0]->getMySet()); disableMyButtons(); @@ -1081,7 +1081,7 @@ void mainWindowImpl::myCall(){ refreshPot(); //Action in LogWindow - myLogWidget->showPlayerActionLogMsg(actualHand->getPlayerArray()[0]->getMyName(), actualHand->getPlayerArray()[0]->getMyAction(), actualHand->getPlayerArray()[0]->getMySet()); + myLog->showPlayerActionLogMsg(actualHand->getPlayerArray()[0]->getMyName(), actualHand->getPlayerArray()[0]->getMyAction(), actualHand->getPlayerArray()[0]->getMySet()); disableMyButtons(); @@ -1184,7 +1184,7 @@ void mainWindowImpl::mySet(){ refreshPot(); //Action in LogWindow - myLogWidget->showPlayerActionLogMsg(actualHand->getPlayerArray()[0]->getMyName(), actualHand->getPlayerArray()[0]->getMyAction(), actualHand->getPlayerArray()[0]->getMySet()); + myLog->showPlayerActionLogMsg(actualHand->getPlayerArray()[0]->getMyName(), actualHand->getPlayerArray()[0]->getMyAction(), actualHand->getPlayerArray()[0]->getMySet()); disableMyButtons(); @@ -1217,7 +1217,7 @@ void mainWindowImpl::myAllIn(){ refreshPot(); //Action in LogWindow - myLogWidget->showPlayerActionLogMsg(actualHand->getPlayerArray()[0]->getMyName(), actualHand->getPlayerArray()[0]->getMyAction(), actualHand->getPlayerArray()[0]->getMySet()); + myLog->showPlayerActionLogMsg(actualHand->getPlayerArray()[0]->getMyName(), actualHand->getPlayerArray()[0]->getMyAction(), actualHand->getPlayerArray()[0]->getMySet()); disableMyButtons(); @@ -1725,7 +1725,7 @@ void mainWindowImpl::paintStartSplash() { void mainWindowImpl::keyPressEvent ( QKeyEvent * event ) { -// cout << event->key() << endl; + cout << event->key() << endl; if (event->key() == 16777220) { if(spinBox_set->hasFocus()) pushButton_set->click(); } //ENTER if (event->key() == 16777265) { switchToolBox(); } //F2 diff --git a/src/gui/qt/mainwindowimpl.h b/src/gui/qt/mainwindowimpl.h index 8d4adf3d..365b5432 100755 --- a/src/gui/qt/mainwindowimpl.h +++ b/src/gui/qt/mainwindowimpl.h @@ -29,7 +29,7 @@ class Game; class Session; -class LogWidgetImpl; +class Log; class ConfigFile; class BoardInterface; @@ -49,7 +49,7 @@ public: void setGame(Game*); void setHand(HandInterface*); void setSession(Session*); - void setLogWidgetImpl(LogWidgetImpl*); + void setLog(Log*); int getMaxQuantityPlayers() const { return maxQuantityPlayers; } @@ -161,11 +161,9 @@ private: Game *actualGame; HandInterface *actualHand; Session *mySession; - + Log *myLog; ConfigFile *myConfig; - LogWidgetImpl *myLogWidget; - //MyPixmapCardsLabel MyCardsPixmapLabel *pixmapLabel_cardBoard0; MyCardsPixmapLabel *pixmapLabel_cardBoard1;