From 973dd79ac82666fa98cb15bff8541ed8c1d34f42 Mon Sep 17 00:00:00 2001 From: doitux Date: Wed, 31 Jan 2007 21:43:33 +0000 Subject: [PATCH] --- pokerth.pro | 4 ++-- src/gui/qt/cards/mycardspixmaplabel.cpp | 1 + src/gui/qt/guiwrapper.cpp | 6 +++--- src/gui/qt/guiwrapper.h | 4 ++-- src/gui/qt/{log.cpp => logwidgetimpl.cpp} | 10 +++++----- src/gui/qt/{log.h => logwidgetimpl.h} | 15 +++++---------- src/gui/qt/mainwindowimpl.cpp | 16 ++++++++-------- src/gui/qt/mainwindowimpl.h | 8 +++++--- 8 files changed, 31 insertions(+), 33 deletions(-) rename src/gui/qt/{log.cpp => logwidgetimpl.cpp} (88%) rename src/gui/qt/{log.h => logwidgetimpl.h} (92%) diff --git a/pokerth.pro b/pokerth.pro index 963dc03f..e9845ea3 100755 --- a/pokerth.pro +++ b/pokerth.pro @@ -17,7 +17,7 @@ HEADERS += tinystr.h \ aboutpokerthimpl.h \ settingsdialogimpl.h \ configfile.h \ - log.h \ + logwidgetimpl.h \ guiinterface.h \ guiwrapper.h \ session.h \ @@ -52,7 +52,7 @@ SOURCES += pokerth.cpp \ aboutpokerthimpl.cpp \ settingsdialogimpl.cpp \ configfile.cpp \ - log.cpp \ + logwidgetimpl.cpp \ guiinterface.cpp \ guiwrapper.cpp \ session.cpp \ diff --git a/src/gui/qt/cards/mycardspixmaplabel.cpp b/src/gui/qt/cards/mycardspixmaplabel.cpp index 1d09a478..e7d03c1e 100644 --- a/src/gui/qt/cards/mycardspixmaplabel.cpp +++ b/src/gui/qt/cards/mycardspixmaplabel.cpp @@ -140,6 +140,7 @@ void MyCardsPixmapLabel::paintEvent(QPaintEvent * event) { QPainter painter(this); // painter.setPen(QColor(74,131,83)); painter.setBrush(QColor(74,131,83)); +// painter.setBrush(palette().color(QPalette::Background)); // painter.setBrush(QColor(0,0,0)); painter.setOpacity(frameOpacity); diff --git a/src/gui/qt/guiwrapper.cpp b/src/gui/qt/guiwrapper.cpp index 121aef0a..3b43f084 100644 --- a/src/gui/qt/guiwrapper.cpp +++ b/src/gui/qt/guiwrapper.cpp @@ -24,14 +24,14 @@ using namespace std; -GuiWrapper::GuiWrapper() : myLog(0), myW(0) +GuiWrapper::GuiWrapper() : myLogWidget(0), myW(0) { myW = new mainWindowImpl; myW->show(); - myLog = new Log(myW); + myLogWidget = new LogWidgetImpl(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 { myLog->showPlayerActionLogMsg(playerName, action, setValue); } +void GuiWrapper::showPlayerActionLogMsg(string playerName, int action, int setValue) const { myLogWidget->showPlayerActionLogMsg(playerName, action, setValue); } diff --git a/src/gui/qt/guiwrapper.h b/src/gui/qt/guiwrapper.h index 002cf7e3..eacbe8f2 100644 --- a/src/gui/qt/guiwrapper.h +++ b/src/gui/qt/guiwrapper.h @@ -22,7 +22,7 @@ #include -#include "log.h" +#include "logwidgetimpl.h" #include "mainwindowimpl.h" #include "configfile.h" @@ -87,7 +87,7 @@ public: private: - Log *myLog; + LogWidgetImpl *myLogWidget; mainWindowImpl *myW; ConfigFile *myConfig; diff --git a/src/gui/qt/log.cpp b/src/gui/qt/logwidgetimpl.cpp similarity index 88% rename from src/gui/qt/log.cpp rename to src/gui/qt/logwidgetimpl.cpp index 627d8c88..6ff295fd 100644 --- a/src/gui/qt/log.cpp +++ b/src/gui/qt/logwidgetimpl.cpp @@ -17,23 +17,23 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include "log.h" +#include "logwidgetimpl.h" #include "mainwindowimpl.h" using namespace std; -Log::Log(mainWindowImpl* w) : myW(w) +LogWidgetImpl::LogWidgetImpl(mainWindowImpl* w) : myW(w) { - myW->setLog(this); + myW->setLogWidgetImpl(this); } -Log::~Log() +LogWidgetImpl::~LogWidgetImpl() { } -void Log::showPlayerActionLogMsg(string playerName, int action, int setValue) const { +void LogWidgetImpl::showPlayerActionLogMsg(string playerName, int action, int setValue) const { QString msg; msg = QString::fromStdString(playerName); diff --git a/src/gui/qt/log.h b/src/gui/qt/logwidgetimpl.h similarity index 92% rename from src/gui/qt/log.h rename to src/gui/qt/logwidgetimpl.h index af1392c8..302cc7bc 100644 --- a/src/gui/qt/log.h +++ b/src/gui/qt/logwidgetimpl.h @@ -17,27 +17,22 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#ifndef LOG_H -#define LOG_H +#ifndef LOGWIDGETIMPL_H +#define LOGWIDGETIMPL_H #include #include -#include - - class mainWindowImpl; -class Log{ +class LogWidgetImpl{ public: - Log(mainWindowImpl*); - - ~Log(); + LogWidgetImpl(mainWindowImpl*); + ~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 9e2135f3..f4eb6b3d 100755 --- a/src/gui/qt/mainwindowimpl.cpp +++ b/src/gui/qt/mainwindowimpl.cpp @@ -33,7 +33,7 @@ #include "game.h" #include "session.h" -#include "log.h" +#include "logwidgetimpl.h" #include "configfile.h" #define FORMATLEFT(X) "

(X)" @@ -537,7 +537,7 @@ void mainWindowImpl::setHand(HandInterface* br) { actualHand = br; } void mainWindowImpl::setSession(Session* s) { mySession = s; } -void mainWindowImpl::setLog(Log* l) { myLog = l; } +void mainWindowImpl::setLogWidgetImpl(LogWidgetImpl* l) { myLogWidget = l; } //refresh-Funktionen void mainWindowImpl::refreshSet() { @@ -1027,7 +1027,7 @@ void mainWindowImpl::myFold(){ actualHand->getPlayerArray()[0]->setMyTurn(0); //Action in LogWindow - myLog->showPlayerActionLogMsg(actualHand->getPlayerArray()[0]->getMyName(), actualHand->getPlayerArray()[0]->getMyAction(), actualHand->getPlayerArray()[0]->getMySet()); + myLogWidget->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 - myLog->showPlayerActionLogMsg(actualHand->getPlayerArray()[0]->getMyName(), actualHand->getPlayerArray()[0]->getMyAction(), actualHand->getPlayerArray()[0]->getMySet()); + myLogWidget->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 - myLog->showPlayerActionLogMsg(actualHand->getPlayerArray()[0]->getMyName(), actualHand->getPlayerArray()[0]->getMyAction(), actualHand->getPlayerArray()[0]->getMySet()); + myLogWidget->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 - myLog->showPlayerActionLogMsg(actualHand->getPlayerArray()[0]->getMyName(), actualHand->getPlayerArray()[0]->getMyAction(), actualHand->getPlayerArray()[0]->getMySet()); + myLogWidget->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 - myLog->showPlayerActionLogMsg(actualHand->getPlayerArray()[0]->getMyName(), actualHand->getPlayerArray()[0]->getMyAction(), actualHand->getPlayerArray()[0]->getMySet()); + myLogWidget->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 365b5432..8d4adf3d 100755 --- a/src/gui/qt/mainwindowimpl.h +++ b/src/gui/qt/mainwindowimpl.h @@ -29,7 +29,7 @@ class Game; class Session; -class Log; +class LogWidgetImpl; class ConfigFile; class BoardInterface; @@ -49,7 +49,7 @@ public: void setGame(Game*); void setHand(HandInterface*); void setSession(Session*); - void setLog(Log*); + void setLogWidgetImpl(LogWidgetImpl*); int getMaxQuantityPlayers() const { return maxQuantityPlayers; } @@ -161,9 +161,11 @@ private: Game *actualGame; HandInterface *actualHand; Session *mySession; - Log *myLog; + ConfigFile *myConfig; + LogWidgetImpl *myLogWidget; + //MyPixmapCardsLabel MyCardsPixmapLabel *pixmapLabel_cardBoard0; MyCardsPixmapLabel *pixmapLabel_cardBoard1;