This commit is contained in:
+2
-2
@@ -17,7 +17,7 @@ HEADERS += tinystr.h \
|
|||||||
aboutpokerthimpl.h \
|
aboutpokerthimpl.h \
|
||||||
settingsdialogimpl.h \
|
settingsdialogimpl.h \
|
||||||
configfile.h \
|
configfile.h \
|
||||||
log.h \
|
logwidgetimpl.h \
|
||||||
guiinterface.h \
|
guiinterface.h \
|
||||||
guiwrapper.h \
|
guiwrapper.h \
|
||||||
session.h \
|
session.h \
|
||||||
@@ -52,7 +52,7 @@ SOURCES += pokerth.cpp \
|
|||||||
aboutpokerthimpl.cpp \
|
aboutpokerthimpl.cpp \
|
||||||
settingsdialogimpl.cpp \
|
settingsdialogimpl.cpp \
|
||||||
configfile.cpp \
|
configfile.cpp \
|
||||||
log.cpp \
|
logwidgetimpl.cpp \
|
||||||
guiinterface.cpp \
|
guiinterface.cpp \
|
||||||
guiwrapper.cpp \
|
guiwrapper.cpp \
|
||||||
session.cpp \
|
session.cpp \
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ void MyCardsPixmapLabel::paintEvent(QPaintEvent * event) {
|
|||||||
QPainter painter(this);
|
QPainter painter(this);
|
||||||
// painter.setPen(QColor(74,131,83));
|
// painter.setPen(QColor(74,131,83));
|
||||||
painter.setBrush(QColor(74,131,83));
|
painter.setBrush(QColor(74,131,83));
|
||||||
|
// painter.setBrush(palette().color(QPalette::Background));
|
||||||
// painter.setBrush(QColor(0,0,0));
|
// painter.setBrush(QColor(0,0,0));
|
||||||
|
|
||||||
painter.setOpacity(frameOpacity);
|
painter.setOpacity(frameOpacity);
|
||||||
|
|||||||
@@ -24,14 +24,14 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
GuiWrapper::GuiWrapper() : myLog(0), myW(0)
|
GuiWrapper::GuiWrapper() : myLogWidget(0), myW(0)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
myW = new mainWindowImpl;
|
myW = new mainWindowImpl;
|
||||||
myW->show();
|
myW->show();
|
||||||
|
|
||||||
myLog = new Log(myW);
|
myLogWidget = new LogWidgetImpl(myW);
|
||||||
|
|
||||||
myConfig = new ConfigFile;
|
myConfig = new ConfigFile;
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ void GuiWrapper::nextRoundCleanGui() const { myW->nextRoundCleanGui(); }
|
|||||||
|
|
||||||
void GuiWrapper::meInAction() const { myW->meInAction(); }
|
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); }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include <guiinterface.h>
|
#include <guiinterface.h>
|
||||||
|
|
||||||
#include "log.h"
|
#include "logwidgetimpl.h"
|
||||||
#include "mainwindowimpl.h"
|
#include "mainwindowimpl.h"
|
||||||
#include "configfile.h"
|
#include "configfile.h"
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
Log *myLog;
|
LogWidgetImpl *myLogWidget;
|
||||||
mainWindowImpl *myW;
|
mainWindowImpl *myW;
|
||||||
ConfigFile *myConfig;
|
ConfigFile *myConfig;
|
||||||
|
|
||||||
|
|||||||
@@ -17,23 +17,23 @@
|
|||||||
* Free Software Foundation, Inc., *
|
* Free Software Foundation, Inc., *
|
||||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
#include "log.h"
|
#include "logwidgetimpl.h"
|
||||||
|
|
||||||
#include "mainwindowimpl.h"
|
#include "mainwindowimpl.h"
|
||||||
|
|
||||||
using namespace std;
|
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;
|
QString msg;
|
||||||
msg = QString::fromStdString(playerName);
|
msg = QString::fromStdString(playerName);
|
||||||
@@ -17,27 +17,22 @@
|
|||||||
* Free Software Foundation, Inc., *
|
* Free Software Foundation, Inc., *
|
||||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
#ifndef LOG_H
|
#ifndef LOGWIDGETIMPL_H
|
||||||
#define LOG_H
|
#define LOGWIDGETIMPL_H
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <QtCore>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class mainWindowImpl;
|
class mainWindowImpl;
|
||||||
|
|
||||||
class Log{
|
class LogWidgetImpl{
|
||||||
public:
|
public:
|
||||||
Log(mainWindowImpl*);
|
LogWidgetImpl(mainWindowImpl*);
|
||||||
|
|
||||||
~Log();
|
|
||||||
|
|
||||||
|
~LogWidgetImpl();
|
||||||
|
|
||||||
void showPlayerActionLogMsg(std::string playName, int action, int setValue) const;
|
void showPlayerActionLogMsg(std::string playName, int action, int setValue) const;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
mainWindowImpl *myW;
|
mainWindowImpl *myW;
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
#include "game.h"
|
#include "game.h"
|
||||||
#include "session.h"
|
#include "session.h"
|
||||||
|
|
||||||
#include "log.h"
|
#include "logwidgetimpl.h"
|
||||||
#include "configfile.h"
|
#include "configfile.h"
|
||||||
|
|
||||||
#define FORMATLEFT(X) "<p align='center'>(X)"
|
#define FORMATLEFT(X) "<p align='center'>(X)"
|
||||||
@@ -537,7 +537,7 @@ void mainWindowImpl::setHand(HandInterface* br) { actualHand = br; }
|
|||||||
|
|
||||||
void mainWindowImpl::setSession(Session* s) { mySession = s; }
|
void mainWindowImpl::setSession(Session* s) { mySession = s; }
|
||||||
|
|
||||||
void mainWindowImpl::setLog(Log* l) { myLog = l; }
|
void mainWindowImpl::setLogWidgetImpl(LogWidgetImpl* l) { myLogWidget = l; }
|
||||||
|
|
||||||
//refresh-Funktionen
|
//refresh-Funktionen
|
||||||
void mainWindowImpl::refreshSet() {
|
void mainWindowImpl::refreshSet() {
|
||||||
@@ -1027,7 +1027,7 @@ void mainWindowImpl::myFold(){
|
|||||||
actualHand->getPlayerArray()[0]->setMyTurn(0);
|
actualHand->getPlayerArray()[0]->setMyTurn(0);
|
||||||
|
|
||||||
//Action in LogWindow
|
//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();
|
disableMyButtons();
|
||||||
|
|
||||||
@@ -1041,7 +1041,7 @@ void mainWindowImpl::myCheck() {
|
|||||||
actualHand->getPlayerArray()[0]->setMyTurn(0);
|
actualHand->getPlayerArray()[0]->setMyTurn(0);
|
||||||
|
|
||||||
//Action in LogWindow
|
//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();
|
disableMyButtons();
|
||||||
|
|
||||||
@@ -1081,7 +1081,7 @@ void mainWindowImpl::myCall(){
|
|||||||
refreshPot();
|
refreshPot();
|
||||||
|
|
||||||
//Action in LogWindow
|
//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();
|
disableMyButtons();
|
||||||
|
|
||||||
@@ -1184,7 +1184,7 @@ void mainWindowImpl::mySet(){
|
|||||||
refreshPot();
|
refreshPot();
|
||||||
|
|
||||||
//Action in LogWindow
|
//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();
|
disableMyButtons();
|
||||||
|
|
||||||
@@ -1217,7 +1217,7 @@ void mainWindowImpl::myAllIn(){
|
|||||||
refreshPot();
|
refreshPot();
|
||||||
|
|
||||||
//Action in LogWindow
|
//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();
|
disableMyButtons();
|
||||||
|
|
||||||
@@ -1725,7 +1725,7 @@ void mainWindowImpl::paintStartSplash() {
|
|||||||
|
|
||||||
void mainWindowImpl::keyPressEvent ( QKeyEvent * event ) {
|
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() == 16777220) { if(spinBox_set->hasFocus()) pushButton_set->click(); } //ENTER
|
||||||
if (event->key() == 16777265) { switchToolBox(); } //F2
|
if (event->key() == 16777265) { switchToolBox(); } //F2
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
class Game;
|
class Game;
|
||||||
class Session;
|
class Session;
|
||||||
class Log;
|
class LogWidgetImpl;
|
||||||
class ConfigFile;
|
class ConfigFile;
|
||||||
|
|
||||||
class BoardInterface;
|
class BoardInterface;
|
||||||
@@ -49,7 +49,7 @@ public:
|
|||||||
void setGame(Game*);
|
void setGame(Game*);
|
||||||
void setHand(HandInterface*);
|
void setHand(HandInterface*);
|
||||||
void setSession(Session*);
|
void setSession(Session*);
|
||||||
void setLog(Log*);
|
void setLogWidgetImpl(LogWidgetImpl*);
|
||||||
|
|
||||||
int getMaxQuantityPlayers() const { return maxQuantityPlayers; }
|
int getMaxQuantityPlayers() const { return maxQuantityPlayers; }
|
||||||
|
|
||||||
@@ -161,9 +161,11 @@ private:
|
|||||||
Game *actualGame;
|
Game *actualGame;
|
||||||
HandInterface *actualHand;
|
HandInterface *actualHand;
|
||||||
Session *mySession;
|
Session *mySession;
|
||||||
Log *myLog;
|
|
||||||
ConfigFile *myConfig;
|
ConfigFile *myConfig;
|
||||||
|
|
||||||
|
LogWidgetImpl *myLogWidget;
|
||||||
|
|
||||||
//MyPixmapCardsLabel
|
//MyPixmapCardsLabel
|
||||||
MyCardsPixmapLabel *pixmapLabel_cardBoard0;
|
MyCardsPixmapLabel *pixmapLabel_cardBoard0;
|
||||||
MyCardsPixmapLabel *pixmapLabel_cardBoard1;
|
MyCardsPixmapLabel *pixmapLabel_cardBoard1;
|
||||||
|
|||||||
Reference in New Issue
Block a user