Files
pokerth/src/gui/qt/mainwindow/log/log.h
T

84 lines
3.0 KiB
C++
Raw Normal View History

2007-01-13 02:40:33 +00:00
/***************************************************************************
* 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. *
***************************************************************************/
2007-01-31 22:48:44 +00:00
#ifndef LOG_H
#define LOG_H
2007-01-13 02:40:33 +00:00
#include <string>
2007-02-03 22:47:16 +00:00
#include "configfile.h"
2007-02-04 23:58:50 +00:00
2007-01-31 22:48:44 +00:00
#include <QtCore>
2007-01-13 02:40:33 +00:00
class mainWindowImpl;
2007-04-20 23:14:08 +00:00
class Log : public QObject
{
Q_OBJECT
2007-01-13 02:40:33 +00:00
public:
Log(mainWindowImpl*, ConfigFile *c);
2007-01-31 22:48:44 +00:00
~Log();
2007-01-13 02:40:33 +00:00
public slots:
void logPlayerActionMsg(QString playerName, int action, int setValue);
2007-02-04 13:46:27 +00:00
void logNewGameHandMsg(int gameID, int handID);
2007-02-14 23:24:17 +00:00
void logPlayerWinsMsg(int playerID, int pot);
2007-02-13 02:00:11 +00:00
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
2007-06-07 18:41:11 +00:00
void logFlipHoleCardsMsg(QString playerName, int card1, int card2, int cardsValueInt = -1, QString showHas = "shows");
void logPlayerLeftMsg(QString playerName);
2007-06-11 20:13:20 +00:00
void logPlayerWinGame(QString playerName, int gameID);
2007-06-04 07:43:44 +00:00
2007-01-13 02:40:33 +00:00
public:
2007-02-14 01:09:31 +00:00
QStringList translateCardsValueCode(int cardsValueCode);
2007-02-13 02:00:11 +00:00
QStringList translateCardCode(int cardCode);
2007-09-02 18:35:39 +00:00
QString determineHandName(int cardsValueInt);
2007-01-31 22:48:44 +00:00
2007-05-15 23:34:03 +00:00
void writeLogFileStream(QString string);
signals:
void signalLogPlayerActionMsg(QString playerName, int action, int setValue);
void signalLogNewGameHandMsg(int gameID, int handID);
void signalLogPlayerWinsMsg(int playerID, int pot);
void signalLogDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
2007-06-07 18:41:11 +00:00
void signalLogFlipHoleCardsMsg(QString playerName, int card1, int card2, int cardsValueInt = -1, QString showHas = "shows");
void signalLogPlayerLeftMsg(QString playerName);
2007-06-11 20:13:20 +00:00
void signalLogPlayerWinGame(QString playerName, int gameID);
2007-01-13 02:40:33 +00:00
private:
2007-05-15 23:34:03 +00:00
int lastGameID;
2007-01-13 02:40:33 +00:00
mainWindowImpl *myW;
2007-02-03 22:47:16 +00:00
ConfigFile *myConfig;
2007-02-04 23:58:50 +00:00
QTextStream stream;
2007-02-03 22:47:16 +00:00
QDir *myLogDir;
QFile *myLogFile;
2007-05-15 23:34:03 +00:00
QString logFileStreamString;
2007-09-27 09:15:39 +00:00
QString myAppDataPath;
2007-01-13 02:40:33 +00:00
friend class GuiWrapper;
2007-01-13 02:40:33 +00:00
};
#endif