additional log in sqlite-db + preparation for replay mode
This commit is contained in:
+6
-3
@@ -10,6 +10,7 @@ CONFIG += qt \
|
|||||||
stl \
|
stl \
|
||||||
warn_on
|
warn_on
|
||||||
include(src/third_party/qtsingleapplication/qtsingleapplication.pri)
|
include(src/third_party/qtsingleapplication/qtsingleapplication.pri)
|
||||||
|
QT += sql
|
||||||
|
|
||||||
# ####Uncomment this for RELEASE on Linux/Unix/BSD (only for static Qt)
|
# ####Uncomment this for RELEASE on Linux/Unix/BSD (only for static Qt)
|
||||||
# QTPLUGIN += qjpeg qgif
|
# QTPLUGIN += qjpeg qgif
|
||||||
@@ -193,7 +194,8 @@ HEADERS += src/game.h \
|
|||||||
src/gui/qt/gametable/mynamelabel.h \
|
src/gui/qt/gametable/mynamelabel.h \
|
||||||
src/gui/qt/settingsdialog/mystylelistitem.h \
|
src/gui/qt/settingsdialog/mystylelistitem.h \
|
||||||
src/gui/qt/gamelobbydialog/mygamelistsortfilterproxymodel.h \
|
src/gui/qt/gamelobbydialog/mygamelistsortfilterproxymodel.h \
|
||||||
src/gui/qt/internetgamelogindialog/internetgamelogindialogimpl.h
|
src/gui/qt/internetgamelogindialog/internetgamelogindialogimpl.h \
|
||||||
|
src/engine/local_engine/replay.h
|
||||||
FORMS += src/gui/qt/gametable.ui \
|
FORMS += src/gui/qt/gametable.ui \
|
||||||
src/gui/qt/aboutpokerth.ui \
|
src/gui/qt/aboutpokerth.ui \
|
||||||
src/gui/qt/connecttoserverdialog.ui \
|
src/gui/qt/connecttoserverdialog.ui \
|
||||||
@@ -259,7 +261,8 @@ SOURCES += src/pokerth.cpp \
|
|||||||
src/gui/qt/gametable/mynamelabel.cpp \
|
src/gui/qt/gametable/mynamelabel.cpp \
|
||||||
src/gui/qt/settingsdialog/mystylelistitem.cpp \
|
src/gui/qt/settingsdialog/mystylelistitem.cpp \
|
||||||
src/gui/qt/gamelobbydialog/mygamelistsortfilterproxymodel.cpp \
|
src/gui/qt/gamelobbydialog/mygamelistsortfilterproxymodel.cpp \
|
||||||
src/gui/qt/internetgamelogindialog/internetgamelogindialogimpl.cpp
|
src/gui/qt/internetgamelogindialog/internetgamelogindialogimpl.cpp \
|
||||||
|
src/engine/local_engine/replay.cpp
|
||||||
TRANSLATIONS = ts/pokerth_bg.ts \
|
TRANSLATIONS = ts/pokerth_bg.ts \
|
||||||
ts/pokerth_ca.ts \
|
ts/pokerth_ca.ts \
|
||||||
ts/pokerth_cz.ts \
|
ts/pokerth_cz.ts \
|
||||||
@@ -408,7 +411,7 @@ unix:!mac {
|
|||||||
LIBS += -lSDL_mixer \
|
LIBS += -lSDL_mixer \
|
||||||
-lcurl \
|
-lcurl \
|
||||||
-lgsasl
|
-lgsasl
|
||||||
!isEmpty( BSD ): isEmpty( kFreeBSD ):LIBS += -lcrypto
|
!isEmpty( BSD ):isEmpty( kFreeBSD ):LIBS += -lcrypto
|
||||||
else:LIBS += -lgnutls-openssl \
|
else:LIBS += -lgnutls-openssl \
|
||||||
-lgcrypt
|
-lgcrypt
|
||||||
TARGETDEPS += ./lib/libpokerth_lib.a \
|
TARGETDEPS += ./lib/libpokerth_lib.a \
|
||||||
|
|||||||
@@ -98,6 +98,20 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
|
|||||||
|
|
||||||
if(DEBUG_MODE) {
|
if(DEBUG_MODE) {
|
||||||
|
|
||||||
|
//QSqlDatabase *mySqliteLogDb;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// myGui->getMyW()->getSession();
|
||||||
|
|
||||||
|
//QSqlDatabase * test = myGui->getMyLog()->getMySqliteLogDb();
|
||||||
|
|
||||||
|
// if(!mySqliteLogDb->open()) {
|
||||||
|
// QMessageBox::critical(0, tr("ERROR"),mySqliteLogDb->lastError().text().toUtf8().data(), QMessageBox::Cancel);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int temp5Array[5];
|
int temp5Array[5];
|
||||||
|
|
||||||
switch(myID) {
|
switch(myID) {
|
||||||
@@ -108,7 +122,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
|
|||||||
tempBoardArray[1] = 21;
|
tempBoardArray[1] = 21;
|
||||||
tempBoardArray[2] = 50;
|
tempBoardArray[2] = 50;
|
||||||
tempBoardArray[3] = 15;
|
tempBoardArray[3] = 15;
|
||||||
tempBoardArray[4] = 12;
|
tempBoardArray[4] = -1;
|
||||||
|
|
||||||
myBoard->setMyCards(tempBoardArray);
|
myBoard->setMyCards(tempBoardArray);
|
||||||
|
|
||||||
@@ -121,8 +135,8 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
|
|||||||
// player0
|
// player0
|
||||||
it = seatsList->begin();
|
it = seatsList->begin();
|
||||||
|
|
||||||
tempPlayerArray[0] = 13;
|
tempPlayerArray[0] = 0;
|
||||||
tempPlayerArray[1] = 22;
|
tempPlayerArray[1] = 1;
|
||||||
tempPlayerAndBoardArray[0] = tempPlayerArray[0];
|
tempPlayerAndBoardArray[0] = tempPlayerArray[0];
|
||||||
tempPlayerAndBoardArray[1] = tempPlayerArray[1];
|
tempPlayerAndBoardArray[1] = tempPlayerArray[1];
|
||||||
|
|
||||||
@@ -174,7 +188,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
|
|||||||
it++;
|
it++;
|
||||||
|
|
||||||
tempPlayerArray[0] = 48;
|
tempPlayerArray[0] = 48;
|
||||||
tempPlayerArray[1] = 7;
|
tempPlayerArray[1] = 2;
|
||||||
tempPlayerAndBoardArray[0] = tempPlayerArray[0];
|
tempPlayerAndBoardArray[0] = tempPlayerArray[0];
|
||||||
tempPlayerAndBoardArray[1] = tempPlayerArray[1];
|
tempPlayerAndBoardArray[1] = tempPlayerArray[1];
|
||||||
|
|
||||||
@@ -347,7 +361,7 @@ void LocalHand::start() {
|
|||||||
it_sB = getActivePlayerIt(getCurrentBeRo()->getSmallBlindPositionId());
|
it_sB = getActivePlayerIt(getCurrentBeRo()->getSmallBlindPositionId());
|
||||||
it_bB = getActivePlayerIt(getCurrentBeRo()->getBigBlindPositionId());
|
it_bB = getActivePlayerIt(getCurrentBeRo()->getBigBlindPositionId());
|
||||||
if(it_sB != getActivePlayerList()->end() && it_bB != getActivePlayerList()->end()) {
|
if(it_sB != getActivePlayerList()->end() && it_bB != getActivePlayerList()->end()) {
|
||||||
myGui->logNewBlindsSetsMsg((*it_sB)->getMySet(), (*it_bB)->getMySet(), (*it_sB)->getMyName().c_str(), (*it_bB)->getMyName().c_str());
|
myGui->logNewBlindsSetsMsg((*it_sB)->getMySet(), (*it_bB)->getMySet(), (*it_sB)->getMyName().c_str(), (*it_bB)->getMyName().c_str());
|
||||||
}
|
}
|
||||||
else { LOG_ERROR(__FILE__ << " (" << __LINE__ << "): Log Error: cannot find sBID or bBID"); }
|
else { LOG_ERROR(__FILE__ << " (" << __LINE__ << "): Log Error: cannot find sBID or bBID"); }
|
||||||
myGui->flushLogAtHand();
|
myGui->flushLogAtHand();
|
||||||
|
|||||||
@@ -856,6 +856,8 @@ LocalPlayer::LocalPlayer(ConfigFile *c, BoardInterface *b, int id, unsigned uniq
|
|||||||
// !!!!!!!!!!!!!!!!!!!!!!!! testing !!!!!!!!!!!!!!!!!!!!!!!!
|
// !!!!!!!!!!!!!!!!!!!!!!!! testing !!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
if(DEBUG_MODE) {
|
if(DEBUG_MODE) {
|
||||||
|
|
||||||
|
//cout << myConfig->readConfigString("LogDir").c_str() << endl;
|
||||||
|
|
||||||
switch(myUniqueID) {
|
switch(myUniqueID) {
|
||||||
|
|
||||||
case 0: {
|
case 0: {
|
||||||
@@ -874,19 +876,19 @@ LocalPlayer::LocalPlayer(ConfigFile *c, BoardInterface *b, int id, unsigned uniq
|
|||||||
myCash=9395;
|
myCash=9395;
|
||||||
} break;
|
} break;
|
||||||
case 5: {
|
case 5: {
|
||||||
myCash=0;
|
myCash=100;
|
||||||
} break;
|
} break;
|
||||||
case 6: {
|
case 6: {
|
||||||
myCash=0;
|
myCash=0;
|
||||||
} break;
|
} break;
|
||||||
case 7: {
|
case 7: {
|
||||||
myCash=0;
|
myCash=0;
|
||||||
} break;
|
} break;
|
||||||
case 8: {
|
case 8: {
|
||||||
myCash=0;
|
myCash=0;
|
||||||
} break;
|
} break;
|
||||||
case 9: {
|
case 9: {
|
||||||
myCash=0;
|
myCash=0;
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
@@ -1048,7 +1050,7 @@ void LocalPlayer::action() {
|
|||||||
//set that i was the last active player. need this for unhighlighting groupbox
|
//set that i was the last active player. need this for unhighlighting groupbox
|
||||||
currentHand->setLastPlayersTurn(myID);
|
currentHand->setLastPlayersTurn(myID);
|
||||||
|
|
||||||
currentHand->getGuiInterface()->logPlayerActionMsg(myName, myAction, mySet);
|
currentHand->getGuiInterface()->logPlayerActionMsg(myName, myID, myAction, mySet);
|
||||||
currentHand->getGuiInterface()->nextPlayerAnimation();
|
currentHand->getGuiInterface()->nextPlayerAnimation();
|
||||||
|
|
||||||
// cout << "playerID in action(): " << (*(currentHand->getCurrentBeRo()->getCurrentPlayersTurnIt()))->getMyID() << endl;
|
// cout << "playerID in action(): " << (*(currentHand->getCurrentBeRo()->getCurrentPlayersTurnIt()))->getMyID() << endl;
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public:
|
|||||||
void setMyAction(int theValue, bool blind = 0) {
|
void setMyAction(int theValue, bool blind = 0) {
|
||||||
myAction = theValue;
|
myAction = theValue;
|
||||||
// logging for human player
|
// logging for human player
|
||||||
if(myAction && !blind) currentHand->getGuiInterface()->logPlayerActionMsg(myName, myAction, mySet);
|
if(myAction && !blind) currentHand->getGuiInterface()->logPlayerActionMsg(myName, myID, myAction, mySet);
|
||||||
}
|
}
|
||||||
int getMyAction() const { return myAction; }
|
int getMyAction() const { return myAction; }
|
||||||
|
|
||||||
@@ -91,11 +91,11 @@ public:
|
|||||||
// log flipping cards
|
// log flipping cards
|
||||||
if(myCardsFlip) {
|
if(myCardsFlip) {
|
||||||
switch(state) {
|
switch(state) {
|
||||||
case 1: currentHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myCards[0], myCards[1], myCardsValueInt);
|
case 1: currentHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myID, myCards[0], myCards[1], myCardsValueInt);
|
||||||
break;
|
break;
|
||||||
case 2: currentHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myCards[0], myCards[1]);
|
case 2: currentHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myID, myCards[0], myCards[1]);
|
||||||
break;
|
break;
|
||||||
case 3: currentHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myCards[0], myCards[1], myCardsValueInt, "has");
|
case 3: currentHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myID, myCards[0], myCards[1], myCardsValueInt, "has");
|
||||||
break;
|
break;
|
||||||
default: ;
|
default: ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* 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 "replay.h"
|
||||||
|
|
||||||
|
Replay::Replay() : replaySqliteLogDb(0)
|
||||||
|
{
|
||||||
|
|
||||||
|
replaySqliteLogDb = new QSqlDatabase();
|
||||||
|
|
||||||
|
*replaySqliteLogDb = QSqlDatabase::addDatabase("QSQLITE");
|
||||||
|
//replaySqliteLogDb->setDatabaseName(myLogDir->absolutePath()+"/pokerth-log-"+currentTime.toString("yyyy-MM-dd_hh.mm.ss")+".db");
|
||||||
|
//if(!mySqliteLogDb->open()) {
|
||||||
|
// QMessageBox::critical(0, tr("ERROR"),mySqliteLogDb->lastError().text().toUtf8().data(), QMessageBox::Cancel);
|
||||||
|
//}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Replay::~Replay()
|
||||||
|
{
|
||||||
|
|
||||||
|
delete replaySqliteLogDb;
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* 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. *
|
||||||
|
***************************************************************************/
|
||||||
|
#ifndef REPLAY_H
|
||||||
|
#define REPLAY_H
|
||||||
|
|
||||||
|
#include <QtSql>
|
||||||
|
|
||||||
|
class Replay
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Replay();
|
||||||
|
~Replay();
|
||||||
|
|
||||||
|
private:
|
||||||
|
QSqlDatabase *replaySqliteLogDb;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // REPLAY_H
|
||||||
@@ -258,11 +258,11 @@ ClientPlayer::setMyCardsFlip(bool theValue, int state)
|
|||||||
// log flipping cards
|
// log flipping cards
|
||||||
if (myCardsFlip) {
|
if (myCardsFlip) {
|
||||||
switch(state) {
|
switch(state) {
|
||||||
case 1: currentHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myCards[0], myCards[1], myCardsValueInt);
|
case 1: currentHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myID, myCards[0], myCards[1], myCardsValueInt);
|
||||||
break;
|
break;
|
||||||
case 2: currentHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myCards[0], myCards[1]);
|
case 2: currentHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myID, myCards[0], myCards[1]);
|
||||||
break;
|
break;
|
||||||
case 3: currentHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myCards[0], myCards[1], myCardsValueInt, "has");
|
case 3: currentHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myID, myCards[0], myCards[1], myCardsValueInt, "has");
|
||||||
break;
|
break;
|
||||||
default: ;
|
default: ;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-3
@@ -40,9 +40,12 @@ Game::Game(GuiInterface* gui, boost::shared_ptr<EngineFactory> factory,
|
|||||||
|
|
||||||
blindsList = myGameData.manualBlindsList;
|
blindsList = myGameData.manualBlindsList;
|
||||||
|
|
||||||
|
dealerPosition = startData.startDealerPlayerId;
|
||||||
|
|
||||||
if(DEBUG_MODE) {
|
if(DEBUG_MODE) {
|
||||||
startSmallBlind = 10;
|
startSmallBlind = 10;
|
||||||
currentSmallBlind = startSmallBlind;
|
currentSmallBlind = startSmallBlind;
|
||||||
|
dealerPosition = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
@@ -53,15 +56,13 @@ Game::Game(GuiInterface* gui, boost::shared_ptr<EngineFactory> factory,
|
|||||||
|
|
||||||
while (player_i != player_end)
|
while (player_i != player_end)
|
||||||
{
|
{
|
||||||
if ((*player_i)->GetUniqueId() == startData.startDealerPlayerId)
|
if ((*player_i)->GetUniqueId() == dealerPosition)
|
||||||
break;
|
break;
|
||||||
++player_i;
|
++player_i;
|
||||||
}
|
}
|
||||||
if (player_i == player_end)
|
if (player_i == player_end)
|
||||||
throw LocalException(__FILE__, __LINE__, ERR_DEALER_NOT_FOUND);
|
throw LocalException(__FILE__, __LINE__, ERR_DEALER_NOT_FOUND);
|
||||||
|
|
||||||
dealerPosition = startData.startDealerPlayerId;
|
|
||||||
|
|
||||||
// create board
|
// create board
|
||||||
currentBoard = myFactory->createBoard();
|
currentBoard = myFactory->createBoard();
|
||||||
|
|
||||||
|
|||||||
@@ -74,6 +74,8 @@ public:
|
|||||||
void setCurrentHandID(int theValue) { currentHandID = theValue; }
|
void setCurrentHandID(int theValue) { currentHandID = theValue; }
|
||||||
int getCurrentHandID() const { return currentHandID; }
|
int getCurrentHandID() const { return currentHandID; }
|
||||||
|
|
||||||
|
unsigned getDealerPosition() const { return dealerPosition; }
|
||||||
|
|
||||||
boost::shared_ptr<PlayerInterface> getPlayerByUniqueId(unsigned id);
|
boost::shared_ptr<PlayerInterface> getPlayerByUniqueId(unsigned id);
|
||||||
boost::shared_ptr<PlayerInterface> getCurrentPlayer();
|
boost::shared_ptr<PlayerInterface> getCurrentPlayer();
|
||||||
|
|
||||||
|
|||||||
@@ -106,14 +106,14 @@ void ServerGuiWrapper::changeVoteOnKickButtonsState(bool /*showHide*/) {}
|
|||||||
void ServerGuiWrapper::refreshVotesMonitor(int /*currentVotes*/, int /*numVotesNeededToKick*/) {}
|
void ServerGuiWrapper::refreshVotesMonitor(int /*currentVotes*/, int /*numVotesNeededToKick*/) {}
|
||||||
void ServerGuiWrapper::endVoteOnKick() {}
|
void ServerGuiWrapper::endVoteOnKick() {}
|
||||||
|
|
||||||
void ServerGuiWrapper::logPlayerActionMsg(string /*playerName*/, int /*action*/, int /*setValue*/) {}
|
void ServerGuiWrapper::logPlayerActionMsg(string /*playerName*/, int /*playerID*/, int /*action*/, int /*setValue*/) {}
|
||||||
void ServerGuiWrapper::logNewGameHandMsg(int /*gameID*/, int /*handID*/) {}
|
void ServerGuiWrapper::logNewGameHandMsg(int /*gameID*/, int /*handID*/) {}
|
||||||
void ServerGuiWrapper::logPlayerWinsMsg(std::string /*playerName*/, int /*pot*/, bool /*main*/) {}
|
void ServerGuiWrapper::logPlayerWinsMsg(std::string /*playerName*/, int /*pot*/, bool /*main*/) {}
|
||||||
void ServerGuiWrapper::logPlayerSitsOut(std::string /*playerName*/) {}
|
void ServerGuiWrapper::logPlayerSitsOut(std::string /*playerName*/) {}
|
||||||
void ServerGuiWrapper::logNewBlindsSetsMsg(int /*sbSet*/, int /*bbSet*/, std::string /*sbName*/, std::string /*bbName*/) {}
|
void ServerGuiWrapper::logNewBlindsSetsMsg(int /*sbSet*/, int /*bbSet*/, std::string /*sbName*/, std::string /*bbName*/) {}
|
||||||
|
|
||||||
void ServerGuiWrapper::logDealBoardCardsMsg(int /*roundID*/, int /*card1*/, int /*card2*/, int /*card3*/, int /*card4*/, int /*card5*/) {}
|
void ServerGuiWrapper::logDealBoardCardsMsg(int /*roundID*/, int /*card1*/, int /*card2*/, int /*card3*/, int /*card4*/, int /*card5*/) {}
|
||||||
void ServerGuiWrapper::logFlipHoleCardsMsg(std::string /*playerName*/, int /*card1*/, int /*card2*/, int /*cardsValueInt*/, std::string /*showHas*/) {}
|
void ServerGuiWrapper::logFlipHoleCardsMsg(std::string /*playerName*/, int /*playerID*/, int /*card1*/, int /*card2*/, int /*cardsValueInt*/, std::string /*showHas*/) {}
|
||||||
void ServerGuiWrapper::logPlayerWinGame(std::string /*playerName*/, int /*gameID*/) {}
|
void ServerGuiWrapper::logPlayerWinGame(std::string /*playerName*/, int /*gameID*/) {}
|
||||||
void ServerGuiWrapper::flushLogAtGame(int /*gameID*/) {}
|
void ServerGuiWrapper::flushLogAtGame(int /*gameID*/) {}
|
||||||
void ServerGuiWrapper::flushLogAtHand() {}
|
void ServerGuiWrapper::flushLogAtHand() {}
|
||||||
|
|||||||
@@ -93,13 +93,13 @@ public:
|
|||||||
void refreshVotesMonitor(int currentVotes, int numVotesNeededToKick);
|
void refreshVotesMonitor(int currentVotes, int numVotesNeededToKick);
|
||||||
void endVoteOnKick();
|
void endVoteOnKick();
|
||||||
|
|
||||||
void logPlayerActionMsg(std::string playerName, int action, int setValue) ;
|
void logPlayerActionMsg(std::string playerName, int playerID, int action, int setValue) ;
|
||||||
void logNewGameHandMsg(int gameID, int handID) ;
|
void logNewGameHandMsg(int gameID, int handID) ;
|
||||||
void logPlayerWinsMsg(std::string playerName, int pot, bool main);
|
void logPlayerWinsMsg(std::string playerName, int pot, bool main);
|
||||||
void logPlayerSitsOut(std::string playerName);
|
void logPlayerSitsOut(std::string playerName);
|
||||||
void logNewBlindsSetsMsg(int sbSet, int bbSet, std::string sbName, std::string bbName);
|
void logNewBlindsSetsMsg(int sbSet, int bbSet, std::string sbName, std::string bbName);
|
||||||
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1) ;
|
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1) ;
|
||||||
void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows") ;
|
void logFlipHoleCardsMsg(std::string playerName, int playerID, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows") ;
|
||||||
void logPlayerWinGame(std::string playerName, int gameID);
|
void logPlayerWinGame(std::string playerName, int gameID);
|
||||||
void flushLogAtGame(int gameID);
|
void flushLogAtGame(int gameID);
|
||||||
void flushLogAtHand();
|
void flushLogAtHand();
|
||||||
|
|||||||
@@ -97,13 +97,13 @@ public:
|
|||||||
virtual void endVoteOnKick() =0;
|
virtual void endVoteOnKick() =0;
|
||||||
|
|
||||||
//log.cpp
|
//log.cpp
|
||||||
virtual void logPlayerActionMsg(std::string playName, int action, int setValue) =0;
|
virtual void logPlayerActionMsg(std::string playName, int playerID, int action, int setValue) =0;
|
||||||
virtual void logNewGameHandMsg(int gameID, int HandID) =0;
|
virtual void logNewGameHandMsg(int gameID, int HandID) =0;
|
||||||
virtual void logPlayerWinsMsg(std::string playerName, int pot, bool main) = 0;
|
virtual void logPlayerWinsMsg(std::string playerName, int pot, bool main) = 0;
|
||||||
virtual void logPlayerSitsOut(std::string playerName) = 0;
|
virtual void logPlayerSitsOut(std::string playerName) = 0;
|
||||||
virtual void logNewBlindsSetsMsg(int sbSet, int bbSet, std::string sbName, std::string bbName) =0;
|
virtual void logNewBlindsSetsMsg(int sbSet, int bbSet, std::string sbName, std::string bbName) =0;
|
||||||
virtual void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1) = 0;
|
virtual void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1) = 0;
|
||||||
virtual void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows") = 0;
|
virtual void logFlipHoleCardsMsg(std::string playerName, int playerID, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows") = 0;
|
||||||
virtual void logPlayerWinGame(std::string playerName, int gameID) =0;
|
virtual void logPlayerWinGame(std::string playerName, int gameID) =0;
|
||||||
virtual void flushLogAtGame(int gameID) =0;
|
virtual void flushLogAtGame(int gameID) =0;
|
||||||
virtual void flushLogAtHand() =0;
|
virtual void flushLogAtHand() =0;
|
||||||
|
|||||||
@@ -28,20 +28,20 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
Log::Log(gameTableImpl* w, ConfigFile *c) : myW(w), myConfig(c), myLogDir(0), myLogFile(0)
|
Log::Log(gameTableImpl* w, ConfigFile *c) : myW(w), myConfig(c), myLogDir(0), myHtmlLogFile(0), mySqliteLogDb(0)
|
||||||
{
|
{
|
||||||
myW->setLog(this);
|
myW->setLog(this);
|
||||||
myStyle = myW->getMyGameTableStyle();
|
myStyle = myW->getMyGameTableStyle();
|
||||||
|
|
||||||
myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str());
|
myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str());
|
||||||
|
|
||||||
connect(this, SIGNAL(signalLogPlayerActionMsg(QString, int, int)), this, SLOT(logPlayerActionMsg(QString, int, int)));
|
connect(this, SIGNAL(signalLogPlayerActionMsg(QString, int, int, int)), this, SLOT(logPlayerActionMsg(QString, int, int, int)));
|
||||||
connect(this, SIGNAL(signalLogNewGameHandMsg(int, int)), this, SLOT(logNewGameHandMsg(int, int)));
|
connect(this, SIGNAL(signalLogNewGameHandMsg(int, int)), this, SLOT(logNewGameHandMsg(int, int)));
|
||||||
connect(this, SIGNAL(signalLogNewBlindsSetsMsg(int, int, QString, QString)), this, SLOT(logNewBlindsSetsMsg(int, int, QString, QString)));
|
connect(this, SIGNAL(signalLogNewBlindsSetsMsg(int, int, QString, QString)), this, SLOT(logNewBlindsSetsMsg(int, int, QString, QString)));
|
||||||
connect(this, SIGNAL(signalLogPlayerWinsMsg(QString, int, bool)), this, SLOT(logPlayerWinsMsg(QString, int, bool)));
|
connect(this, SIGNAL(signalLogPlayerWinsMsg(QString, int, bool)), this, SLOT(logPlayerWinsMsg(QString, int, bool)));
|
||||||
connect(this, SIGNAL(signalLogPlayerSitsOut(QString)), this, SLOT(logPlayerSitsOut(QString)));
|
connect(this, SIGNAL(signalLogPlayerSitsOut(QString)), this, SLOT(logPlayerSitsOut(QString)));
|
||||||
connect(this, SIGNAL(signalLogDealBoardCardsMsg(int, int, int, int, int, int)), this, SLOT(logDealBoardCardsMsg(int, int, int, int, int, int)));
|
connect(this, SIGNAL(signalLogDealBoardCardsMsg(int, int, int, int, int, int)), this, SLOT(logDealBoardCardsMsg(int, int, int, int, int, int)));
|
||||||
connect(this, SIGNAL(signalLogFlipHoleCardsMsg(QString, int, int, int, QString)), this, SLOT(logFlipHoleCardsMsg(QString, int, int, int, QString)));
|
connect(this, SIGNAL(signalLogFlipHoleCardsMsg(QString, int, int, int, int, QString)), this, SLOT(logFlipHoleCardsMsg(QString, int, int, int, int, QString)));
|
||||||
connect(this, SIGNAL(signalLogPlayerLeftMsg(QString, int)), this, SLOT(logPlayerLeftMsg(QString, int)));
|
connect(this, SIGNAL(signalLogPlayerLeftMsg(QString, int)), this, SLOT(logPlayerLeftMsg(QString, int)));
|
||||||
connect(this, SIGNAL(signalLogNewGameAdminMsg(QString)), this, SLOT(logNewGameAdminMsg(QString)));
|
connect(this, SIGNAL(signalLogNewGameAdminMsg(QString)), this, SLOT(logNewGameAdminMsg(QString)));
|
||||||
connect(this, SIGNAL(signalLogPlayerWinGame(QString, int)), this, SLOT(logPlayerWinGame(QString, int)));
|
connect(this, SIGNAL(signalLogPlayerWinGame(QString, int)), this, SLOT(logPlayerWinGame(QString, int)));
|
||||||
@@ -58,16 +58,19 @@ Log::Log(gameTableImpl* w, ConfigFile *c) : myW(w), myConfig(c), myLogDir(0), my
|
|||||||
if(myConfig->readConfigString("LogDir") != "" && logDir.exists()) {
|
if(myConfig->readConfigString("LogDir") != "" && logDir.exists()) {
|
||||||
|
|
||||||
myLogDir = new QDir(QString::fromUtf8(myConfig->readConfigString("LogDir").c_str()));
|
myLogDir = new QDir(QString::fromUtf8(myConfig->readConfigString("LogDir").c_str()));
|
||||||
myLogFile = new QFile(myLogDir->absolutePath()+"/pokerth-log-"+QDateTime::currentDateTime().toString("yyyy-MM-dd_hh.mm.ss")+".html");
|
QDateTime currentTime = QDateTime::currentDateTime();
|
||||||
|
myHtmlLogFile = new QFile(myLogDir->absolutePath()+"/pokerth-log-"+currentTime.toString("yyyy-MM-dd_hh.mm.ss")+".html");
|
||||||
|
mySqliteLogDb = new QSqlDatabase();
|
||||||
|
|
||||||
//Logo-Pixmap extrahieren
|
//Logo-Pixmap extrahieren
|
||||||
QPixmap logoChipPixmapFile(":/gfx/logoChip3D.png");
|
QPixmap logoChipPixmapFile(":/gfx/logoChip3D.png");
|
||||||
logoChipPixmapFile.save(myLogDir->absolutePath()+"/logo.png");
|
logoChipPixmapFile.save(myLogDir->absolutePath()+"/logo.png");
|
||||||
|
|
||||||
// myW->textBrowser_Log->append(myLogFile->fileName());
|
// myW->textBrowser_Log->append(myHtmlLogFile->fileName());
|
||||||
|
|
||||||
myLogFile->open( QIODevice::WriteOnly );
|
// erstelle html-Datei
|
||||||
QTextStream stream( myLogFile );
|
myHtmlLogFile->open( QIODevice::WriteOnly );
|
||||||
|
QTextStream stream( myHtmlLogFile );
|
||||||
stream << "<html>\n";
|
stream << "<html>\n";
|
||||||
stream << "<head>\n";
|
stream << "<head>\n";
|
||||||
stream << "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf8\">";
|
stream << "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf8\">";
|
||||||
@@ -75,11 +78,83 @@ Log::Log(gameTableImpl* w, ConfigFile *c) : myW(w), myConfig(c), myLogDir(0), my
|
|||||||
stream << "<body style=\"font-size:smaller\">\n";
|
stream << "<body style=\"font-size:smaller\">\n";
|
||||||
stream << "<img src='logo.png'>\n";
|
stream << "<img src='logo.png'>\n";
|
||||||
stream << QString("<h3><b>Log-File for PokerTH %1 Session started on ").arg(POKERTH_BETA_RELEASE_STRING)+QDate::currentDate().toString("yyyy-MM-dd")+" at "+QTime::currentTime().toString("hh:mm:ss")+"</b></h3>\n";
|
stream << QString("<h3><b>Log-File for PokerTH %1 Session started on ").arg(POKERTH_BETA_RELEASE_STRING)+QDate::currentDate().toString("yyyy-MM-dd")+" at "+QTime::currentTime().toString("hh:mm:ss")+"</b></h3>\n";
|
||||||
myLogFile->close();
|
myHtmlLogFile->close();
|
||||||
|
|
||||||
|
int i;
|
||||||
|
// lege sqlite-Datenbank
|
||||||
|
*mySqliteLogDb = QSqlDatabase::addDatabase("QSQLITE");
|
||||||
|
mySqliteLogDb->setDatabaseName(myLogDir->absolutePath()+"/pokerth-log-"+currentTime.toString("yyyy-MM-dd_hh.mm.ss")+".db");
|
||||||
|
if(!mySqliteLogDb->open()) {
|
||||||
|
QMessageBox::critical(0, tr("ERROR"),mySqliteLogDb->lastError().text().toUtf8().data(), QMessageBox::Cancel);
|
||||||
|
}
|
||||||
|
|
||||||
|
QString sql;
|
||||||
|
QSqlQuery query;
|
||||||
|
|
||||||
|
// Session-Tabelle
|
||||||
|
sql = "CREATE TABLE Session (Version TEXT,Date TEXT,Time TEXT, PRIMARY KEY(Date,Time))";
|
||||||
|
if(!query.exec(sql)) {
|
||||||
|
QMessageBox::critical(0, tr("ERROR"),query.lastError().text().toUtf8().data(), QMessageBox::Cancel);
|
||||||
|
}
|
||||||
|
sql = "INSERT INTO Session (Version,Date,Time) VALUES (";
|
||||||
|
sql += "'"+QString("%1").arg(POKERTH_BETA_RELEASE_STRING)+"',";
|
||||||
|
sql += "'"+currentTime.toString("yyyy-MM-dd")+"',";
|
||||||
|
sql += "'"+currentTime.toString("hh:mm:ss")+"')";
|
||||||
|
if(!query.exec(sql)) {
|
||||||
|
QMessageBox::critical(0, tr("ERROR"),query.lastError().text().toUtf8().data(), QMessageBox::Cancel);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Game-Tabelle
|
||||||
|
sql = "CREATE TABLE Game (";
|
||||||
|
sql += "GameID INTEGER NOT NULL PRIMARY KEY,";
|
||||||
|
sql += "Startmoney INTEGER NOT NULL,";
|
||||||
|
sql += "StartSb INTEGER NOT NULL,";
|
||||||
|
sql += "DealerPos INTEGER NOT NULL";
|
||||||
|
for(i=1; i<=MAX_NUMBER_OF_PLAYERS; i++) {
|
||||||
|
sql += ",Seat_" + QString("%1").arg(i);
|
||||||
|
}
|
||||||
|
sql += ")";
|
||||||
|
if(!query.exec(sql)) {
|
||||||
|
QMessageBox::critical(0, tr("ERROR"),query.lastError().text().toUtf8().data(), QMessageBox::Cancel);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hand-Tabelle
|
||||||
|
sql = "CREATE TABLE Hand (";
|
||||||
|
sql += "HandID INTEGER NOT NULL,";
|
||||||
|
sql += "GameID INTEGER NOT NULL,";
|
||||||
|
for(i=1; i<=MAX_NUMBER_OF_PLAYERS; i++) {
|
||||||
|
sql += "Seat_" + QString("%1").arg(i) + "_Cash INTEGER,";
|
||||||
|
sql += "Seat_" + QString("%1").arg(i) + "_Card_1 INTEGER,";
|
||||||
|
sql += "Seat_" + QString("%1").arg(i) + "_Card_2 INTEGER,";
|
||||||
|
}
|
||||||
|
for(i=1; i<=5; i++) {
|
||||||
|
sql += "BoardCard_" + QString("%1").arg(i) + " INTEGER,";
|
||||||
|
}
|
||||||
|
sql += "PRIMARY KEY(HandID,GameID))";
|
||||||
|
if(!query.exec(sql)) {
|
||||||
|
QMessageBox::critical(0, tr("ERROR"),query.lastError().text().toUtf8().data(), QMessageBox::Cancel);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Action-Tabelle
|
||||||
|
sql = "CREATE TABLE Action (";
|
||||||
|
sql += "ActionID INTEGER PRIMARY KEY AUTOINCREMENT,";
|
||||||
|
sql += "HandID INTEGER NOT NULL,";
|
||||||
|
sql += "GameID INTEGER NOT NULL,";
|
||||||
|
sql += "BeRo INTEGER NOT NULL,";
|
||||||
|
sql += "Player INTEGER NOT NULL,";
|
||||||
|
sql += "Action INTEGER NOT NULL,";
|
||||||
|
sql += "Amount INTEGER)";
|
||||||
|
if(!query.exec(sql)) {
|
||||||
|
QMessageBox::critical(0, tr("ERROR"),query.lastError().text().toUtf8().data(), QMessageBox::Cancel);
|
||||||
|
}
|
||||||
|
|
||||||
|
query.clear();
|
||||||
|
|
||||||
|
// Datenbank schließen
|
||||||
|
mySqliteLogDb->close();
|
||||||
|
|
||||||
//Zu alte Dateien löschen!!!
|
//Zu alte Dateien löschen!!!
|
||||||
int daysUntilWaste = myConfig->readConfigInt("LogStoreDuration");
|
int daysUntilWaste = myConfig->readConfigInt("LogStoreDuration");
|
||||||
int i;
|
|
||||||
|
|
||||||
QStringList filters("pokerth-log*");
|
QStringList filters("pokerth-log*");
|
||||||
QStringList logFileList = myLogDir->entryList(filters, QDir::Files);
|
QStringList logFileList = myLogDir->entryList(filters, QDir::Files);
|
||||||
@@ -113,13 +188,17 @@ Log::Log(gameTableImpl* w, ConfigFile *c) : myW(w), myConfig(c), myLogDir(0), my
|
|||||||
|
|
||||||
Log::~Log()
|
Log::~Log()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
delete myConfig;
|
delete myConfig;
|
||||||
delete myLogDir;
|
delete myLogDir;
|
||||||
delete myLogFile;
|
delete myHtmlLogFile;
|
||||||
|
delete mySqliteLogDb;
|
||||||
myConfig = 0;
|
myConfig = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Log::logPlayerActionMsg(QString msg, int action, int setValue) {
|
void Log::logPlayerActionMsg(QString msg, int playerID, int action, int setValue) {
|
||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
|
|
||||||
@@ -151,6 +230,31 @@ void Log::logPlayerActionMsg(QString msg, int action, int setValue) {
|
|||||||
logFileStreamString = "";
|
logFileStreamString = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!mySqliteLogDb->open()) {
|
||||||
|
QMessageBox::critical(0, tr("ERROR"),mySqliteLogDb->lastError().text().toUtf8().data(), QMessageBox::Cancel);
|
||||||
|
}
|
||||||
|
|
||||||
|
QString sql;
|
||||||
|
QSqlQuery query;
|
||||||
|
|
||||||
|
sql = "INSERT INTO Action (HandID,GameID,BeRo,Player,Action,Amount) VALUES (";
|
||||||
|
sql += QString::number(myW->getSession()->getCurrentGame()->getCurrentHandID(),10);
|
||||||
|
sql += "," + QString::number(myW->getSession()->getCurrentGame()->getMyGameID(),10);
|
||||||
|
sql += "," + QString::number(myW->getSession()->getCurrentGame()->getCurrentHand()->getCurrentBeRo()->getMyBeRoID(),10);
|
||||||
|
sql += "," + QString::number(playerID,10);
|
||||||
|
sql += "," + QString::number(action,10);
|
||||||
|
sql += "," + QString::number(setValue,10);
|
||||||
|
sql += ")";
|
||||||
|
|
||||||
|
if(!query.exec(sql)) {
|
||||||
|
QMessageBox::critical(0, tr("ERROR"),query.lastError().text().toUtf8().data(), QMessageBox::Cancel);
|
||||||
|
}
|
||||||
|
|
||||||
|
query.clear();
|
||||||
|
|
||||||
|
mySqliteLogDb->close();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,15 +268,74 @@ void Log::logNewGameHandMsg(int gameID, int handID) {
|
|||||||
if(myConfig->readConfigInt("LogOnOff")) {
|
if(myConfig->readConfigInt("LogOnOff")) {
|
||||||
//if write logfiles is enabled
|
//if write logfiles is enabled
|
||||||
|
|
||||||
|
int i;
|
||||||
|
|
||||||
logFileStreamString += "<table><tr><td width=\"600\" align=\"center\"><hr noshade size=\"3\"><b>Game: "+QString::number(gameID,10)+" | Hand: "+QString::number(handID,10)+"</b></td><td></td></tr></table>";
|
logFileStreamString += "<table><tr><td width=\"600\" align=\"center\"><hr noshade size=\"3\"><b>Game: "+QString::number(gameID,10)+" | Hand: "+QString::number(handID,10)+"</b></td><td></td></tr></table>";
|
||||||
logFileStreamString += "BLIND LEVEL: $"+QString::number(currentHand->getSmallBlind())+" / $"+QString::number(currentHand->getSmallBlind()*2)+"</br>";
|
logFileStreamString += "BLIND LEVEL: $"+QString::number(currentHand->getSmallBlind())+" / $"+QString::number(currentHand->getSmallBlind()*2)+"</br>";
|
||||||
|
|
||||||
|
if(!mySqliteLogDb->open()) {
|
||||||
|
QMessageBox::critical(0, tr("ERROR"),mySqliteLogDb->lastError().text().toUtf8().data(), QMessageBox::Cancel);
|
||||||
|
}
|
||||||
|
|
||||||
|
// bei Beginn eines Games
|
||||||
|
QString sql;
|
||||||
|
QSqlQuery query;
|
||||||
|
if(handID == 1) {
|
||||||
|
sql = "INSERT INTO Game (GameID,Startmoney,StartSb,DealerPos";
|
||||||
|
for(i=1;i<=MAX_NUMBER_OF_PLAYERS; i++) {
|
||||||
|
sql += ",Seat_" + QString::number(i,10);
|
||||||
|
}
|
||||||
|
sql += ") VALUES (";
|
||||||
|
sql += QString::number(gameID,10) + ",";
|
||||||
|
sql += QString::number(myW->getSession()->getCurrentGame()->getStartCash(),10) + ",";
|
||||||
|
sql += QString::number(myW->getSession()->getCurrentGame()->getStartSmallBlind(),10) + ",";
|
||||||
|
sql += QString::number(myW->getSession()->getCurrentGame()->getDealerPosition(),10);
|
||||||
|
for(it_c = currentHand->getSeatsList()->begin();it_c!=currentHand->getSeatsList()->end();it_c++) {
|
||||||
|
if((*it_c)->getMyActiveStatus()) {
|
||||||
|
sql += ",'" + QString::fromUtf8((*it_c)->getMyName().c_str()) +"'";
|
||||||
|
} else {
|
||||||
|
sql += ",NULL";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sql += ")";
|
||||||
|
if(!query.exec(sql)) {
|
||||||
|
QMessageBox::critical(0, tr("ERROR"),query.lastError().text().toUtf8().data(), QMessageBox::Cancel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sql = "INSERT INTO Hand (HandID,GameID";
|
||||||
|
for(i=1;i<=MAX_NUMBER_OF_PLAYERS; i++) {
|
||||||
|
sql += ",Seat_" + QString("%1").arg(i) + "_Cash";
|
||||||
|
}
|
||||||
|
sql += ") VALUES (";
|
||||||
|
sql += QString::number(handID,10);
|
||||||
|
sql += "," + QString::number(gameID,10);
|
||||||
|
for(it_c = currentHand->getSeatsList()->begin();it_c!=currentHand->getSeatsList()->end();it_c++) {
|
||||||
|
if((*it_c)->getMyActiveStatus()) {
|
||||||
|
sql += "," + QString::number((*it_c)->getMyCash()+(*it_c)->getMySet(),10);
|
||||||
|
} else {
|
||||||
|
sql += ",NULL";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sql += ")";
|
||||||
|
|
||||||
|
if(!query.exec(sql)) {
|
||||||
|
QMessageBox::critical(0, tr("ERROR"),query.lastError().text().toUtf8().data(), QMessageBox::Cancel);
|
||||||
|
}
|
||||||
|
|
||||||
|
query.clear();
|
||||||
|
|
||||||
|
mySqliteLogDb->close();
|
||||||
|
|
||||||
|
|
||||||
//print cash only for active players
|
//print cash only for active players
|
||||||
for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); it_c++) {
|
for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); it_c++) {
|
||||||
|
|
||||||
logFileStreamString += "Seat " + QString::number((*it_c)->getMyID()+1,10) + ": <b>" + QString::fromUtf8((*it_c)->getMyName().c_str()) + "</b> ($" + QString::number((*it_c)->getMyCash()+(*it_c)->getMySet(),10)+")</br>";
|
logFileStreamString += "Seat " + QString::number((*it_c)->getMyID()+1,10) + ": <b>" + QString::fromUtf8((*it_c)->getMyName().c_str()) + "</b> ($" + QString::number((*it_c)->getMyCash()+(*it_c)->getMySet(),10)+")</br>";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -272,16 +435,24 @@ void Log::logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int
|
|||||||
if(myConfig->readConfigInt("LogOnOff")) {
|
if(myConfig->readConfigInt("LogOnOff")) {
|
||||||
//if write logfiles is enabled
|
//if write logfiles is enabled
|
||||||
|
|
||||||
|
QString sql;
|
||||||
|
sql = "UPDATE Hand SET ";
|
||||||
|
|
||||||
switch (roundID) {
|
switch (roundID) {
|
||||||
|
|
||||||
case 1: round = "Flop";
|
case 1: round = "Flop";
|
||||||
logFileStreamString += "</br><b>"+round.toUpper()+"</b> [board cards <b>"+translateCardCode(card1).at(0)+"</b>"+translateCardCode(card1).at(1)+",<b>"+translateCardCode(card2).at(0)+"</b>"+translateCardCode(card2).at(1)+",<b>"+translateCardCode(card3).at(0)+"</b>"+translateCardCode(card3).at(1)+"]"+"</br>\n";
|
logFileStreamString += "</br><b>"+round.toUpper()+"</b> [board cards <b>"+translateCardCode(card1).at(0)+"</b>"+translateCardCode(card1).at(1)+",<b>"+translateCardCode(card2).at(0)+"</b>"+translateCardCode(card2).at(1)+",<b>"+translateCardCode(card3).at(0)+"</b>"+translateCardCode(card3).at(1)+"]"+"</br>\n";
|
||||||
|
sql += "BoardCard_1 = " + QString::number(card1,10) + ",";
|
||||||
|
sql += "BoardCard_2 = " + QString::number(card2,10) + ",";
|
||||||
|
sql += "BoardCard_3 = " + QString::number(card3,10);
|
||||||
break;
|
break;
|
||||||
case 2: round = "Turn";
|
case 2: round = "Turn";
|
||||||
logFileStreamString += "</br><b>"+round.toUpper()+"</b> [board cards <b>"+translateCardCode(card1).at(0)+"</b>"+translateCardCode(card1).at(1)+",<b>"+translateCardCode(card2).at(0)+"</b>"+translateCardCode(card2).at(1)+",<b>"+translateCardCode(card3).at(0)+"</b>"+translateCardCode(card3).at(1)+",<b>"+translateCardCode(card4).at(0)+"</b>"+translateCardCode(card4).at(1)+"]"+"</br>\n";
|
logFileStreamString += "</br><b>"+round.toUpper()+"</b> [board cards <b>"+translateCardCode(card1).at(0)+"</b>"+translateCardCode(card1).at(1)+",<b>"+translateCardCode(card2).at(0)+"</b>"+translateCardCode(card2).at(1)+",<b>"+translateCardCode(card3).at(0)+"</b>"+translateCardCode(card3).at(1)+",<b>"+translateCardCode(card4).at(0)+"</b>"+translateCardCode(card4).at(1)+"]"+"</br>\n";
|
||||||
|
sql += "BoardCard_4 = " + QString::number(card4,10);
|
||||||
break;
|
break;
|
||||||
case 3: round = "River";
|
case 3: round = "River";
|
||||||
logFileStreamString += "</br><b>"+round.toUpper()+"</b> [board cards <b>"+translateCardCode(card1).at(0)+"</b>"+translateCardCode(card1).at(1)+",<b>"+translateCardCode(card2).at(0)+"</b>"+translateCardCode(card2).at(1)+",<b>"+translateCardCode(card3).at(0)+"</b>"+translateCardCode(card3).at(1)+",<b>"+translateCardCode(card4).at(0)+"</b>"+translateCardCode(card4).at(1)+",<b>"+translateCardCode(card5).at(0)+"</b>"+translateCardCode(card5).at(1)+"]"+"</br>\n";
|
logFileStreamString += "</br><b>"+round.toUpper()+"</b> [board cards <b>"+translateCardCode(card1).at(0)+"</b>"+translateCardCode(card1).at(1)+",<b>"+translateCardCode(card2).at(0)+"</b>"+translateCardCode(card2).at(1)+",<b>"+translateCardCode(card3).at(0)+"</b>"+translateCardCode(card3).at(1)+",<b>"+translateCardCode(card4).at(0)+"</b>"+translateCardCode(card4).at(1)+",<b>"+translateCardCode(card5).at(0)+"</b>"+translateCardCode(card5).at(1)+"]"+"</br>\n";
|
||||||
|
sql += "BoardCard_5 = " + QString::number(card5,10);
|
||||||
break;
|
break;
|
||||||
default: round = "ERROR";
|
default: round = "ERROR";
|
||||||
}
|
}
|
||||||
@@ -290,10 +461,29 @@ void Log::logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int
|
|||||||
logFileStreamString = "";
|
logFileStreamString = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sql += " WHERE ";
|
||||||
|
sql += "HandID = " + QString::number(myW->getSession()->getCurrentGame()->getCurrentHandID(),10) + " AND ";
|
||||||
|
sql += "GameID = " + QString::number(myW->getSession()->getCurrentGame()->getMyGameID(),10);
|
||||||
|
|
||||||
|
if(roundID <= 3) {
|
||||||
|
if(!mySqliteLogDb->open()) {
|
||||||
|
QMessageBox::critical(0, tr("ERROR"),mySqliteLogDb->lastError().text().toUtf8().data(), QMessageBox::Cancel);
|
||||||
|
}
|
||||||
|
|
||||||
|
QSqlQuery query;
|
||||||
|
if(!query.exec(sql)) {
|
||||||
|
QMessageBox::critical(0, tr("ERROR"),query.lastError().text().toUtf8().data(), QMessageBox::Cancel);
|
||||||
|
}
|
||||||
|
|
||||||
|
query.clear();
|
||||||
|
|
||||||
|
mySqliteLogDb->close();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Log::logFlipHoleCardsMsg(QString playerName, int card1, int card2, int cardsValueInt, QString showHas) {
|
void Log::logFlipHoleCardsMsg(QString playerName, int playerID, int card1, int card2, int cardsValueInt, QString showHas) {
|
||||||
|
|
||||||
if (cardsValueInt != -1) {
|
if (cardsValueInt != -1) {
|
||||||
|
|
||||||
@@ -327,6 +517,27 @@ void Log::logFlipHoleCardsMsg(QString playerName, int card1, int card2, int card
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString sql = "UPDATE Hand SET ";
|
||||||
|
sql += "Seat_" + QString::number(playerID+1,10) + "_Card_1 = " + QString::number(card1,10) + ",";
|
||||||
|
sql += "Seat_" + QString::number(playerID+1,10) + "_Card_2 = " + QString::number(card2,10);
|
||||||
|
sql += " WHERE ";
|
||||||
|
sql += "HandID = " + QString::number(myW->getSession()->getCurrentGame()->getCurrentHandID(),10) + " AND ";
|
||||||
|
sql += "GameID = " + QString::number(myW->getSession()->getCurrentGame()->getMyGameID(),10);
|
||||||
|
|
||||||
|
if(!mySqliteLogDb->open()) {
|
||||||
|
QMessageBox::critical(0, tr("ERROR"),mySqliteLogDb->lastError().text().toUtf8().data(), QMessageBox::Cancel);
|
||||||
|
}
|
||||||
|
|
||||||
|
QSqlQuery query;
|
||||||
|
if(!query.exec(sql)) {
|
||||||
|
QMessageBox::critical(0, tr("ERROR"),query.lastError().text().toUtf8().data(), QMessageBox::Cancel);
|
||||||
|
}
|
||||||
|
|
||||||
|
query.clear();
|
||||||
|
|
||||||
|
mySqliteLogDb->close();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Log::logPlayerLeftMsg(QString playerName, int wasKicked) {
|
void Log::logPlayerLeftMsg(QString playerName, int wasKicked) {
|
||||||
@@ -1647,12 +1858,12 @@ QString Log::determineHandName(int myCardsValueInt) {
|
|||||||
|
|
||||||
void Log::writeLogFileStream(QString streamString) {
|
void Log::writeLogFileStream(QString streamString) {
|
||||||
|
|
||||||
if(myLogFile) {
|
if(myHtmlLogFile) {
|
||||||
if(myLogFile->open( QIODevice::ReadWrite )) {
|
if(myHtmlLogFile->open( QIODevice::ReadWrite )) {
|
||||||
QTextStream stream( myLogFile );
|
QTextStream stream( myHtmlLogFile );
|
||||||
stream.readAll();
|
stream.readAll();
|
||||||
stream << streamString;
|
stream << streamString;
|
||||||
myLogFile->close();
|
myHtmlLogFile->close();
|
||||||
}
|
}
|
||||||
else { cout << "Could not open log-file to write log-messages!" << endl; }
|
else { cout << "Could not open log-file to write log-messages!" << endl; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,8 +24,8 @@
|
|||||||
|
|
||||||
#include "configfile.h"
|
#include "configfile.h"
|
||||||
|
|
||||||
|
|
||||||
#include <QtCore>
|
#include <QtCore>
|
||||||
|
#include <QtSql>
|
||||||
|
|
||||||
class gameTableImpl;
|
class gameTableImpl;
|
||||||
class GameTableStyleReader;
|
class GameTableStyleReader;
|
||||||
@@ -40,13 +40,13 @@ public:
|
|||||||
~Log();
|
~Log();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void logPlayerActionMsg(QString playerName, int action, int setValue);
|
void logPlayerActionMsg(QString playerName, int playerID, int action, int setValue);
|
||||||
void logNewGameHandMsg(int gameID, int handID);
|
void logNewGameHandMsg(int gameID, int handID);
|
||||||
void logNewBlindsSetsMsg(int sbSet, int bbSet, QString sbName, QString bbName);
|
void logNewBlindsSetsMsg(int sbSet, int bbSet, QString sbName, QString bbName);
|
||||||
void logPlayerWinsMsg(QString playerName, int pot, bool main);
|
void logPlayerWinsMsg(QString playerName, int pot, bool main);
|
||||||
void logPlayerSitsOut(QString playerName);
|
void logPlayerSitsOut(QString playerName);
|
||||||
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
|
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
|
||||||
void logFlipHoleCardsMsg(QString playerName, int card1, int card2, int cardsValueInt = -1, QString showHas = "shows");
|
void logFlipHoleCardsMsg(QString playerName, int playerID, int card1, int card2, int cardsValueInt = -1, QString showHas = "shows");
|
||||||
void logPlayerLeftMsg(QString playerName, int wasKicked);
|
void logPlayerLeftMsg(QString playerName, int wasKicked);
|
||||||
void logNewGameAdminMsg(QString playerName);
|
void logNewGameAdminMsg(QString playerName);
|
||||||
void logPlayerWinGame(QString playerName, int gameID);
|
void logPlayerWinGame(QString playerName, int gameID);
|
||||||
@@ -62,13 +62,13 @@ public:
|
|||||||
void writeLogFileStream(QString string);
|
void writeLogFileStream(QString string);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void signalLogPlayerActionMsg(QString playerName, int action, int setValue);
|
void signalLogPlayerActionMsg(QString playerName, int playerID, int action, int setValue);
|
||||||
void signalLogNewGameHandMsg(int gameID, int handID);
|
void signalLogNewGameHandMsg(int gameID, int handID);
|
||||||
void signalLogNewBlindsSetsMsg(int sbSet, int bbSet, QString sbName, QString bbName);
|
void signalLogNewBlindsSetsMsg(int sbSet, int bbSet, QString sbName, QString bbName);
|
||||||
void signalLogPlayerWinsMsg(QString playerName, int pot, bool main);
|
void signalLogPlayerWinsMsg(QString playerName, int pot, bool main);
|
||||||
void signalLogPlayerSitsOut(QString playerName);
|
void signalLogPlayerSitsOut(QString playerName);
|
||||||
void signalLogDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
|
void signalLogDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
|
||||||
void signalLogFlipHoleCardsMsg(QString playerName, int card1, int card2, int cardsValueInt = -1, QString showHas = "shows");
|
void signalLogFlipHoleCardsMsg(QString playerName, int playerID, int card1, int card2, int cardsValueInt = -1, QString showHas = "shows");
|
||||||
void signalLogPlayerLeftMsg(QString playerName, int wasKicked);
|
void signalLogPlayerLeftMsg(QString playerName, int wasKicked);
|
||||||
void signalLogNewGameAdminMsg(QString playerName);
|
void signalLogNewGameAdminMsg(QString playerName);
|
||||||
void signalLogPlayerWinGame(QString playerName, int gameID);
|
void signalLogPlayerWinGame(QString playerName, int gameID);
|
||||||
@@ -83,7 +83,8 @@ private:
|
|||||||
ConfigFile *myConfig;
|
ConfigFile *myConfig;
|
||||||
QTextStream stream;
|
QTextStream stream;
|
||||||
QDir *myLogDir;
|
QDir *myLogDir;
|
||||||
QFile *myLogFile;
|
QFile *myHtmlLogFile;
|
||||||
|
QSqlDatabase *mySqliteLogDb;
|
||||||
QString logFileStreamString;
|
QString logFileStreamString;
|
||||||
QString myAppDataPath;
|
QString myAppDataPath;
|
||||||
|
|
||||||
|
|||||||
@@ -111,13 +111,13 @@ void GuiWrapper::changeVoteOnKickButtonsState(bool showHide) { myW->signalChange
|
|||||||
void GuiWrapper::refreshVotesMonitor(int currentVotes, int numVotesNeededToKick) { myW->refreshVotesMonitor(currentVotes, numVotesNeededToKick); }
|
void GuiWrapper::refreshVotesMonitor(int currentVotes, int numVotesNeededToKick) { myW->refreshVotesMonitor(currentVotes, numVotesNeededToKick); }
|
||||||
void GuiWrapper::endVoteOnKick() { myW->signalEndVoteOnKick(); }
|
void GuiWrapper::endVoteOnKick() { myW->signalEndVoteOnKick(); }
|
||||||
|
|
||||||
void GuiWrapper::logPlayerActionMsg(string playerName, int action, int setValue) { myLog->signalLogPlayerActionMsg(QString::fromUtf8(playerName.c_str()), action, setValue); }
|
void GuiWrapper::logPlayerActionMsg(string playerName, int playerID, int action, int setValue) { myLog->signalLogPlayerActionMsg(QString::fromUtf8(playerName.c_str()), playerID, action, setValue); }
|
||||||
void GuiWrapper::logNewGameHandMsg(int gameID, int handID) { myLog->signalLogNewGameHandMsg(gameID, handID); }
|
void GuiWrapper::logNewGameHandMsg(int gameID, int handID) { myLog->signalLogNewGameHandMsg(gameID, handID); }
|
||||||
void GuiWrapper::logNewBlindsSetsMsg(int sbSet, int bbSet, std::string sbName, std::string bbName) { myLog->signalLogNewBlindsSetsMsg(sbSet, bbSet, QString::fromUtf8(sbName.c_str()), QString::fromUtf8(bbName.c_str())); }
|
void GuiWrapper::logNewBlindsSetsMsg(int sbSet, int bbSet, std::string sbName, std::string bbName) { myLog->signalLogNewBlindsSetsMsg(sbSet, bbSet, QString::fromUtf8(sbName.c_str()), QString::fromUtf8(bbName.c_str())); }
|
||||||
void GuiWrapper::logPlayerWinsMsg(std::string playerName, int pot, bool main) { myLog->signalLogPlayerWinsMsg(QString::fromUtf8(playerName.c_str()), pot, main); }
|
void GuiWrapper::logPlayerWinsMsg(std::string playerName, int pot, bool main) { myLog->signalLogPlayerWinsMsg(QString::fromUtf8(playerName.c_str()), pot, main); }
|
||||||
void GuiWrapper::logPlayerSitsOut(std::string playerName) { myLog->signalLogPlayerSitsOut(QString::fromUtf8(playerName.c_str())); }
|
void GuiWrapper::logPlayerSitsOut(std::string playerName) { myLog->signalLogPlayerSitsOut(QString::fromUtf8(playerName.c_str())); }
|
||||||
void GuiWrapper::logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4, int card5) { myLog->signalLogDealBoardCardsMsg(roundID, card1, card2, card3, card4, card5); }
|
void GuiWrapper::logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4, int card5) { myLog->signalLogDealBoardCardsMsg(roundID, card1, card2, card3, card4, card5); }
|
||||||
void GuiWrapper::logFlipHoleCardsMsg(string playerName, int card1, int card2, int cardsValueInt, string showHas) { myLog->signalLogFlipHoleCardsMsg(QString::fromUtf8(playerName.c_str()), card1, card2, cardsValueInt, QString::fromUtf8(showHas.c_str())); }
|
void GuiWrapper::logFlipHoleCardsMsg(string playerName, int playerID, int card1, int card2, int cardsValueInt, string showHas) { myLog->signalLogFlipHoleCardsMsg(QString::fromUtf8(playerName.c_str()), playerID, card1, card2, cardsValueInt, QString::fromUtf8(showHas.c_str())); }
|
||||||
void GuiWrapper::logPlayerWinGame(std::string playerName, int gameID) { myLog->signalLogPlayerWinGame(QString::fromUtf8(playerName.c_str()), gameID); }
|
void GuiWrapper::logPlayerWinGame(std::string playerName, int gameID) { myLog->signalLogPlayerWinGame(QString::fromUtf8(playerName.c_str()), gameID); }
|
||||||
void GuiWrapper::flushLogAtGame(int gameID) { myLog->signalFlushLogAtGame(gameID); }
|
void GuiWrapper::flushLogAtGame(int gameID) { myLog->signalFlushLogAtGame(gameID); }
|
||||||
void GuiWrapper::flushLogAtHand() { myLog->signalFlushLogAtHand(); }
|
void GuiWrapper::flushLogAtHand() { myLog->signalFlushLogAtHand(); }
|
||||||
|
|||||||
@@ -100,13 +100,13 @@ public:
|
|||||||
void refreshVotesMonitor(int currentVotes, int numVotesNeededToKick);
|
void refreshVotesMonitor(int currentVotes, int numVotesNeededToKick);
|
||||||
void endVoteOnKick();
|
void endVoteOnKick();
|
||||||
|
|
||||||
void logPlayerActionMsg(std::string playerName, int action, int setValue) ;
|
void logPlayerActionMsg(std::string playerName, int playerID, int action, int setValue) ;
|
||||||
void logNewGameHandMsg(int gameID, int handID) ;
|
void logNewGameHandMsg(int gameID, int handID) ;
|
||||||
void logNewBlindsSetsMsg(int sbSet, int bbSet, std::string sbName, std::string bbName);
|
void logNewBlindsSetsMsg(int sbSet, int bbSet, std::string sbName, std::string bbName);
|
||||||
void logPlayerWinsMsg(std::string playerName, int pot, bool main);
|
void logPlayerWinsMsg(std::string playerName, int pot, bool main);
|
||||||
void logPlayerSitsOut(std::string playerName);
|
void logPlayerSitsOut(std::string playerName);
|
||||||
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
|
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
|
||||||
void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows");
|
void logFlipHoleCardsMsg(std::string playerName, int playerID, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows");
|
||||||
void logPlayerWinGame(std::string playerName, int gameID);
|
void logPlayerWinGame(std::string playerName, int gameID);
|
||||||
void flushLogAtGame(int gameID);
|
void flushLogAtGame(int gameID);
|
||||||
void flushLogAtHand();
|
void flushLogAtHand();
|
||||||
|
|||||||
@@ -273,9 +273,9 @@ void startWindowImpl::startNewLocalGame(newGameDialogImpl *v) {
|
|||||||
int tmpDealerPos = 0;
|
int tmpDealerPos = 0;
|
||||||
startData.numberOfPlayers = gameData.maxNumberOfPlayers;
|
startData.numberOfPlayers = gameData.maxNumberOfPlayers;
|
||||||
Tools::getRandNumber(0, startData.numberOfPlayers-1, 1, &tmpDealerPos, 0);
|
Tools::getRandNumber(0, startData.numberOfPlayers-1, 1, &tmpDealerPos, 0);
|
||||||
if(DEBUG_MODE) {
|
//if(DEBUG_MODE) {
|
||||||
tmpDealerPos = 4;
|
// tmpDealerPos = 4;
|
||||||
}
|
//}
|
||||||
startData.startDealerPlayerId = static_cast<unsigned>(tmpDealerPos);
|
startData.startDealerPlayerId = static_cast<unsigned>(tmpDealerPos);
|
||||||
|
|
||||||
//some gui modifications
|
//some gui modifications
|
||||||
|
|||||||
@@ -1776,6 +1776,7 @@ ClientStateRunHand::InternalHandlePacket(boost::shared_ptr<ClientThread> client,
|
|||||||
assert(netActionDone->totalPlayerBet >= (long)tmpPlayer->getMySet());
|
assert(netActionDone->totalPlayerBet >= (long)tmpPlayer->getMySet());
|
||||||
client->GetGui().logPlayerActionMsg(
|
client->GetGui().logPlayerActionMsg(
|
||||||
tmpPlayer->getMyName(),
|
tmpPlayer->getMyName(),
|
||||||
|
tmpPlayer->getMyID(),
|
||||||
netActionDone->playerAction,
|
netActionDone->playerAction,
|
||||||
netActionDone->totalPlayerBet - tmpPlayer->getMySet());
|
netActionDone->totalPlayerBet - tmpPlayer->getMySet());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,7 @@
|
|||||||
//Q_IMPORT_PLUGIN(qjpeg)
|
//Q_IMPORT_PLUGIN(qjpeg)
|
||||||
//Q_IMPORT_PLUGIN(qgif)
|
//Q_IMPORT_PLUGIN(qgif)
|
||||||
|
|
||||||
|
|
||||||
#ifdef _WIN32 // Always use static Qt on Windows.
|
#ifdef _WIN32 // Always use static Qt on Windows.
|
||||||
#include <QtPlugin>
|
#include <QtPlugin>
|
||||||
Q_IMPORT_PLUGIN(qjpeg)
|
Q_IMPORT_PLUGIN(qjpeg)
|
||||||
|
|||||||
Reference in New Issue
Block a user